├── Docker ├── Dockerfile └── server-config-docker.pl ├── README.md ├── cgi-bin ├── cdhit.cgi ├── delay-exec.sh ├── get_plot.cgi ├── get_tree.cgi ├── index.cgi ├── result.cgi ├── server-config.pl └── service-local.pl ├── css ├── images │ ├── coverage.gif │ ├── help.gif │ ├── minus.png │ ├── pg-first.gif │ ├── pg-last.gif │ ├── pg-next.gif │ ├── pg-prev.gif │ ├── plus.png │ ├── view-nextpage.gif │ └── view-prevpage.gif ├── main.css └── main1.css ├── etc └── apache2 │ ├── apache2.conf │ ├── apache2.conf.dist │ └── sites-available │ ├── 000-default.conf │ └── 000-default.conf.dist ├── index.html ├── js └── util.js └── output.README /Docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:18.04 2 | 3 | WORKDIR /opt 4 | 5 | #### get necessary packages 6 | RUN apt-get -y update && apt-get install -y wget build-essential zlib1g zlib1g-dev apache2 git rsync \ 7 | libcgi-pm-perl libswitch-perl 8 | 9 | 10 | #### download and compile cd-hit 4.8.1 11 | RUN wget https://github.com/weizhongli/cdhit/releases/download/V4.8.1/cd-hit-v4.8.1-2019-0228.tar.gz && \ 12 | tar xvf cd-hit-v4.8.1-2019-0228.tar.gz && \ 13 | mv cd-hit-v4.8.1-2019-0228 cd-hit && \ 14 | cd /opt/cd-hit && \ 15 | make && \ 16 | cd /opt/cd-hit/cd-hit-auxtools && \ 17 | make 18 | 19 | 20 | #### get NCBI BLAST+ 2.8.1 21 | RUN wget ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/2.8.1/ncbi-blast-2.8.1+-x64-linux.tar.gz && \ 22 | tar xvf ncbi-blast-2.8.1+-x64-linux.tar.gz && \ 23 | rm -f ncbi-blast-2.8.1+-x64-linux.tar.gz 24 | 25 | #### get cd-hit webserver 26 | RUN git clone https://github.com/weizhongli/cdhit-web-server.git && \ 27 | mkdir www && \ 28 | mv cdhit-web-server www && \ 29 | cd /opt/www/cdhit-web-server && \ 30 | cp -f Docker/server-config-docker.pl cgi-bin/server-config.pl && \ 31 | ln -sf /opt/data output && \ 32 | cd /opt && \ 33 | mkdir -p data && \ 34 | chmod -R a+rwx data && \ 35 | rsync -av www/cdhit-web-server/etc/apache2 /etc && \ 36 | cd /etc/apache2/mods-enabled && \ 37 | ln -s ../mods-available/cgid* . 38 | 39 | #### or maybe a2enmod cgi 40 | 41 | #### set system PATH 42 | ENV PATH="/opt/cd-hit:/opt/cd-hit/cd-hit-auxtools:/opt/cd-hit/psi-cd-hit:/opt/ncbi-blast-2.8.1+/bin:${PATH}" 43 | 44 | #### set apache2 ENVs 45 | ## ENV APACHE_RUN_USER root 46 | ## ENV APACHE_RUN_GROUP root 47 | ## ENV APACHE_RUN_USER www-data 48 | ## ENV APACHE_RUN_GROUP www-data 49 | ## ENV APACHE_LOG_DIR /var/log/apache2 50 | ## ENV APACHE_PID_FILE /var/run/apache2.pid 51 | ## ENV APACHE_RUN_DIR /var/run/apache2 52 | ## ENV APACHE_LOCK_DIR /var/lock/apache2 53 | 54 | #### maybe need php 55 | ## apt-get install -y php libapache2-mod-php php-mcrypt php-mysql 56 | ## a2enmod php7.0 57 | 58 | 59 | EXPOSE 80 443 60 | 61 | #### make it run foreground 62 | CMD ["/usr/sbin/apache2ctl", "-DFOREGROUND"] 63 | 64 | #### to build docker image 65 | # docker build --tag cdhit-server https://raw.githubusercontent.com/weizhongli/cdhit-web-server/master/Docker/Dockerfile 66 | #### to start a container 67 | # docker run -d -h cdhit-server --name cdhit-server -p 8088:80 cdhit-server 68 | #### to access local cdhit-server 69 | # go to http://localhost:8088/cdhit-web-server/ 70 | 71 | 72 | #### optional 73 | # docker run -d -h cdhit-server --name cdhit-server -p 8088:80 -v `pwd`:/opt/data cdhit-server 74 | # docker run -it -p 8088:80 cdhit-server bash 75 | 76 | -------------------------------------------------------------------------------- /Docker/server-config-docker.pl: -------------------------------------------------------------------------------- 1 | #### EC2 setting ###################################################################### 2 | $NGS_cdhit_dir = "/opt/cd-hit"; 3 | $NGS_blast_dir = "/opt/ncbi-blast-2.8.1+/bin"; 4 | $SL_session_dir = "/opt/data"; 5 | $SL_rammcap_dir = ""; 6 | $SL_bin_dir = ""; 7 | 8 | $qsub_exe = "/bin/bash"; 9 | $admin_email = "liwz\@sdsc.edu"; 10 | $sw_db = ""; 11 | $pdb_db = ""; 12 | 13 | $qsub_local = < http://localhost:8088/cdhit-web-server 12 | 13 | And you can upload files to the local cdhit server, the same way as using the public cdhit web server. 14 | 15 | 4) It is suggested to learn a bit more docker commands about how to start/stop/delete the docker container and how to manage the docker image. 16 | 17 | 18 | ## Manual installation of cdhit-web-server 19 | 20 | 1) enable apache server on Linux system 21 | 22 | 2) configure apache server 23 | The cdhit-web-server code need to be copied under Apache's DocumentRoot 24 | (e.g. /home/home/oasis/data/www/cdhit-web-server). Then the cgi-bin directory 25 | within /home/home/oasis/data/www/cdhit-web-server need to be added to Apache 26 | config file so that cgi scripts can be executed. 27 | 28 | text like below need to be added to Apache config file. Different version of 29 | Apache, the location of config file is different. for example 30 | /etc/apache2/sites-available, 31 | /etc/apache2/sites-enabled/000-default 32 | 33 | 34 | AddHandler cgi-script .cgi .pl 35 | Options FollowSymLinks +ExecCGI 36 | AllowOverride None 37 | 38 | 39 | for some version of Apache2, you may need to 40 | cd /etc/apache2/mods-enabled; 41 | ln -s ../mods-available/cgid* . 42 | 43 | or to use command: a2enmod cgid 44 | 45 | 3) download most up to date cd-hit and compile 46 | 4) download NCBI blast+ package 47 | 5) Edit cgi-bin/server-config 48 | 6) READ output.README 49 | to create a symbolic to a job dir (e.g. ln -s /path_to_job_dir output) 50 | 7) some perl modules maybe no longer standard for some Linux 51 | e.g. Switch.pm. try 52 | sudo apt-get install libswitch-perl 53 | -------------------------------------------------------------------------------- /cgi-bin/cdhit.cgi: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | use CGI; 3 | #use strict; 4 | use Time::Local; 5 | use Switch; 6 | $CGI::POST_MAX = 1024*1024*250; 7 | 8 | my $script_name = $0; 9 | my $script_dir = $0; 10 | $script_dir =~ s/[^\/]+$//; 11 | $script_dir = "./" unless ($script_dir); 12 | $script_dir =~ s/\/$//; #### remove last "/" 13 | #### This should be /home/oasis/data/www/home/cdhit_suite/cgi-bin 14 | my @d_path = split(/\//, $script_dir); 15 | my $base_cgi = "/$d_path[-2]/$d_path[-1]/index.cgi"; 16 | 17 | require "./server-config.pl"; 18 | 19 | my $q = new CGI; 20 | if ($q->cgi_error()){ size_error($q, "The files you uploaded are too big ".$q->cgi_error); } 21 | 22 | my $program = $q->param('program'); 23 | if ($program eq 'h-cd-hit') {$program = 'cd-hit';} 24 | elsif ($program eq 'h-cd-hit-est') {$program = 'cd-hit-est';} 25 | 26 | my $JOBID; 27 | my $parameters; 28 | 29 | ## get env 2010.02.17 30 | my $env_fname; 31 | #get date and time 32 | my $dt_int; 33 | my $dt_format; 34 | my $key; 35 | ## end get env 36 | 37 | ## for mail job stat: added by Beifang Niu 38 | my $M_ADDRESS; 39 | 40 | if (defined $q->param('JOBID')){ # retreive a existing job 41 | $JOBID = $q->param('JOBID'); 42 | print $q->redirect("$base_cgi?cmd=result&JOBID=$JOBID"); 43 | } 44 | else{ # submit a new job 45 | $parameters = check_parameters(); 46 | if ($parameters =~ /^Error/) { parameter_error(); } 47 | else { 48 | if ($program eq 'cd-hit-2d' or $program eq 'cd-hit-est-2d'){ $JOBID = prepare_input_2d();} 49 | else{ $JOBID = prepare_input();} 50 | 51 | $M_ADDRESS = $q->param('Mailaddress'); # for mail added by Beifang Niu 52 | print $q->redirect("$base_cgi?cmd=result&JOBID=$JOBID"); 53 | send_mail($M_ADDRESS,$JOBID); # for mail added by Beifang Niu 54 | } 55 | } 56 | exit(0); 57 | 58 | 59 | sub size_error{ 60 | my ($q, $reason) = @_; 61 | print $q->header("text/html"); 62 | print $q->start_html(-title=>"Error"); 63 | print $q->p("You upload was not processed because the following error occured:"); 64 | print $q->p($q->i($reason)); 65 | print $q->end_html; 66 | exit(0); 67 | } 68 | 69 | 70 | sub parameter_error{ 71 | print $q->header("text/html"); 72 | print $q->start_html(-title=>"Error Parameters"); 73 | print $parameters, $q->br; 74 | print "Please reset your parameters",$q->br; 75 | print $q->end_html; 76 | } 77 | 78 | #for mail added by Beifang Niu 79 | 80 | sub send_mail { 81 | my $M_ADDRESS = shift; 82 | my $JOBID = shift; 83 | 84 | my $r_mail = $M_ADDRESS; 85 | my $s_mail = $admin_email; 86 | my $subject = 'CD-HIT webserver job status checking'; 87 | my $tmpm_url = $q->url()."?JOBID=$JOBID"; 88 | 89 | open(MAIL,"|/usr/lib/sendmail -t "); 90 | 91 | print MAIL "To: $r_mail\n"; 92 | print MAIL "From: $s_mail\n"; 93 | print MAIL "Subject: $subject\n\n"; 94 | print MAIL "Job status link: \n"; 95 | print MAIL $tmpm_url; 96 | 97 | close(MAIL); 98 | 99 | print<param('SeqDB1'); 108 | my $fh_db2 = $q->param('SeqF'); 109 | # create working directory and upload FASTA file 110 | my $JOBID = time(); 111 | # use time to generate JOBID to avoid use a OLD id 112 | my $JOBDIR = "$SL_session_dir/$JOBID"; 113 | while (-d $JOBDIR){ # an already exist JOBID, submitted at the same time 114 | sleep(5); 115 | $JOBID = time(); 116 | $JOBDIR = "$SL_session_dir/$JOBID"; 117 | } 118 | mkdir($JOBDIR); 119 | 120 | my ($input_fname,$db1_fname); 121 | if ($q->param('program') eq 'cd-hit-2d' and $q->param('which_db1') eq '1'){ 122 | if ($q->param('LocalDB1') eq 'SWISSPROT') { $db1_fname = $sw_db;} 123 | elsif ($q->param('LocalDB1') eq 'PDB' ) { $db1_fname = $pdb_db;} 124 | $fh_db1 = $q->param('LocalDB1'); 125 | } 126 | else{ 127 | $input_fname = "$JOBDIR/$JOBID.fas.db1"; #upload sequence into $input_fname; 128 | open(UPLOADFILE, "> $input_fname"); 129 | binmode(UPLOADFILE); 130 | while ($ll=<$fh_db1>) {print UPLOADFILE $ll;} 131 | close(UPLOADFILE); 132 | $db1_fname = "$JOBID.fas.db1"; 133 | } 134 | $input_fname = "$JOBDIR/$JOBID.fas.db2"; #upload sequence into $input_fname; 135 | open(UPLOADFILE, "> $input_fname"); 136 | binmode(UPLOADFILE); 137 | while ($ll=<$fh_db2>) {print UPLOADFILE $ll;} 138 | close(UPLOADFILE); 139 | 140 | my ($cmd_str, $iden, $wsize); 141 | $iden = $q->param("lc1"); 142 | $wsize = get_wsize($iden); 143 | $cmd_str .= <param('which_db1') ne "1"); 157 | $cmd_str .= < $JOBID.fas.db2novel.clstr.sorted 161 | $NGS_cdhit_dir/clstr_list.pl $JOBID.fas.db2novel.clstr $JOBID.clstr.dump 162 | $NGS_cdhit_dir/clstr_list_sort.pl $JOBID.clstr.dump $JOBID.clstr_no.dump 163 | $NGS_cdhit_dir/clstr_list_sort.pl $JOBID.clstr.dump $JOBID.clstr_len.dump len 164 | $NGS_cdhit_dir/clstr_list_sort.pl $JOBID.clstr.dump $JOBID.clstr_des.dump des 165 | gnuplot1.pl < $JOBID.fas.db2novel.clstr > $JOBID.fas.db2novel.clstr.1; gnuplot2.pl $JOBID.fas.db2novel.clstr.1 $JOBID.fas.db2novel.clstr.1.png 166 | tar -zcf $JOBID.result.tar.gz * --exclude=*.dump --exclude=*.env 167 | echo hello > $JOBID.ok 168 | EOD 169 | 170 | my $sh_fname = "$JOBDIR/run-$JOBID.sh"; 171 | open(SHELLFILE, "> $sh_fname"); 172 | print SHELLFILE $cmd_str; 173 | close(SHELLFILE); 174 | 175 | #configuration file 176 | my $conf_fname = "$JOBDIR/$JOBID.conf"; 177 | open(CONFILE, "> $conf_fname"); 178 | print CONFILE "program=".$q->param("program")."\n"; 179 | print CONFILE "level=1\n"; 180 | print CONFILE "local=".$q->param("which_db1")."\n"; 181 | print CONFILE "db1=$fh_db1\n"; 182 | print CONFILE "db2=".$fh_db2."\n"; 183 | print CONFILE "lc1=".$q->param("lc1")."\n"; 184 | print CONFILE "parameters=$parameters\n"; 185 | close(SHELLFILE); 186 | 187 | ## env file 188 | $env_fname = "$JOBDIR/$JOBID.env"; 189 | open(ENVFILE, "> $env_fname"); 190 | print ENVFILE "PROGRAM = ".$q->param("program")."\n"; 191 | #get date and time 192 | $dt_int = time; 193 | print ENVFILE "DATE_INT = ".$dt_int."\n"; 194 | $dt_format = gmtime($dt_int); 195 | print ENVFILE "DATE = ".$dt_format."\n"; 196 | foreach $key (sort keys(%ENV)) 197 | { 198 | print ENVFILE "$key = $ENV{$key} \n"; 199 | } 200 | #print ENVFILE $ENV('REMOTE_ADDR'); 201 | close(ENVFILE); 202 | ## end env file 203 | 204 | # submit the job 205 | #my $cmd = `/opt/gridengine/bin/lx26-amd64/qsub $sh_fname > $JOBDIR/$JOBID.qsub.dump`; 206 | if ($qsub_exe eq "/bin/bash") { 207 | my $cmd = `$qsub_exe $sh_fname 1>$JOBDIR/$JOBID.qsub.dump 2>$JOBDIR/$JOBID.qsub.err.dump &`; 208 | } 209 | else { 210 | my $cmd = `$qsub_exe $sh_fname 1>$JOBDIR/$JOBID.qsub.dump 2>$JOBDIR/$JOBID.qsub.err.dump`; 211 | } 212 | 213 | # return jobid 214 | return $JOBID; 215 | } 216 | 217 | sub prepare_input{ 218 | # prepare files and input for h-cd-hit or h-cd-est runs 219 | my $fh = $q->param('SeqF'); 220 | # file handl for the input 221 | # create working directory and upload FASTA file 222 | my $JOBID = time(); 223 | # use time to generate JOBID to avoid use a OLD id 224 | my $JOBDIR = "$SL_session_dir/$JOBID"; 225 | while (-d $JOBDIR){ # an already exist JOBID, submitted at the same time 226 | sleep(5); 227 | $JOBID = time(); 228 | $JOBDIR = "$SL_session_dir/$JOBID"; 229 | } 230 | mkdir($JOBDIR); 231 | 232 | my $input_fname = "$JOBDIR/$JOBID.fas.0"; #upload sequence into $input_fname; 233 | open(UPLOADFILE, "> $input_fname"); 234 | binmode(UPLOADFILE); 235 | my $ll; 236 | while ($ll=<$fh>) {print UPLOADFILE $ll;} 237 | close(UPLOADFILE); 238 | 239 | # create qsub script and configure files 240 | my $level = $q->param('level'); 241 | my ($cmd_str, $iden, $wsize); 242 | $cmd_str .= <param("lc$i"); 261 | if ($iden >= 0.4){ 262 | $wsize = get_wsize($iden); 263 | $cmd_str .= < $JOBID.fas.$i.clstr.sorted 276 | $NGS_cdhit_dir/clstr_list.pl $JOBID.fas.$i.clstr $JOBID.clstr.dump 277 | gnuplot1.pl < $JOBID.fas.$i.clstr > $JOBID.fas.$i.clstr.1; gnuplot2.pl $JOBID.fas.$i.clstr.1 $JOBID.fas.$i.clstr.1.png 278 | EOD 279 | $cmd_str .= < $JOBID.fas.2-0.clstr 281 | $NGS_cdhit_dir/clstr_sort_by.pl no < $JOBID.fas.2-0.clstr > $JOBID.fas.2-0.clstr.sorted 282 | EOD 283 | $cmd_str .= < $JOBID.fas.3-0.clstr 285 | $NGS_cdhit_dir/clstr_sort_by.pl no < $JOBID.fas.3-0.clstr > $JOBID.fas.3-0.clstr.sorted 286 | EOD 287 | } 288 | 289 | $cmd_str .= <param("anno")==1){ #for current version, only level 1 have annotion info incorporated 295 | $cmd_str .= <$JOBID.fas.1.clstr.anno.err 297 | $NGS_cdhit_dir/FET.pl $JOBID.fas.1.clstr.sorted $JOBID.fas.1.clstr.sorted.anno $JOBID.fas.1.clstr.anno_no.dump 2>$JOBID.fas.1.clstr.sorted.anno.err 298 | EOD 299 | } 300 | $cmd_str .= < $JOBID.ok 303 | EOD 304 | my $sh_fname = "$JOBDIR/run-$JOBID.sh"; 305 | open(SHELLFILE, "> $sh_fname"); 306 | print SHELLFILE $cmd_str; 307 | close(SHELLFILE); 308 | 309 | #configuration file 310 | my $conf_fname = "$JOBDIR/$JOBID.conf"; 311 | open(CONFILE, "> $conf_fname"); 312 | print CONFILE "program=".$q->param("program")."\n"; 313 | print CONFILE "level=$level\n"; 314 | print CONFILE "input=$fh\n"; 315 | for ($i=1; $i<=$level; $i++){ print CONFILE "lc$i=".$q->param("lc$i")."\n"; } 316 | print CONFILE "parameters=$parameters\n"; 317 | close(CONFILE); 318 | 319 | ## env file 320 | $env_fname = "$JOBDIR/$JOBID.env"; 321 | open(ENVFILE, "> $env_fname"); 322 | print ENVFILE "PROGRAM = ".$q->param("program")."\n"; 323 | #get date and time 324 | $dt_int = time; 325 | print ENVFILE "DATE_INT = ".$dt_int."\n"; 326 | $dt_format = gmtime($dt_int); 327 | print ENVFILE "DATE = ".$dt_format."\n"; 328 | foreach $key (sort keys(%ENV)) 329 | { 330 | print ENVFILE "$key = $ENV{$key} \n"; 331 | } 332 | #print ENVFILE $ENV('REMOTE_ADDR'); 333 | close(ENVFILE); 334 | ## end env file 335 | 336 | # submit the job 337 | if ($qsub_exe eq "/bin/bash") { 338 | my $cmd = `$qsub_exe $sh_fname 1>$JOBDIR/$JOBID.qsub.dump 2>$JOBDIR/$JOBID.qsub.err.dump &`; 339 | } 340 | else { 341 | my $cmd = `$qsub_exe $sh_fname 1>$JOBDIR/$JOBID.qsub.dump 2>$JOBDIR/$JOBID.qsub.err.dump`; 342 | } 343 | 344 | # return jobid 345 | return $JOBID; 346 | } 347 | 348 | 349 | # decide word size based on seqence identity 350 | sub get_wsize{ 351 | my $iden = shift; 352 | if ($program eq 'cd-hit' or $program eq 'cd-hit-2d'){ 353 | if ( $iden >= 0.70 ) {return 5;} 354 | elsif ( $iden >= 0.60 ) {return 4;} 355 | elsif ( $iden >= 0.50 ) {return 3;} 356 | else {return 2;} 357 | } 358 | else{ 359 | if ( $iden >= 0.95 ) {return "10 -l 11";} 360 | elsif ( $iden >= 0.92 ) {return 9;} 361 | elsif ( $iden >= 0.90 ) {return 8;} 362 | elsif ( $iden >= 0.88 ) {return 7;} 363 | elsif ( $iden >= 0.85 ) {return 6;} 364 | elsif ( $iden >= 0.80 ) {return 5;} 365 | else {return 4;} 366 | } 367 | } 368 | 369 | # check parameters in the form 370 | sub check_parameters{ 371 | my $resu=""; 372 | my $i; 373 | 374 | ############### 375 | # Data_Field 376 | if ( $q->param('program') eq 'cd-hit-2d' and $q->param('which_db1') eq '0' and $q->param('SeqDB1') eq ''){ 377 | return "Error: please upload your search database in FASTA format"; 378 | } 379 | if ( $q->param('program') eq 'cd-hit-est-2d' and $q->param('SeqDB1') eq ''){ 380 | return "Error: please upload your search database in FASTA format"; 381 | } 382 | if ( ($q->param('SeqF') eq '')){ 383 | return "Error: please upload your sequences in FASTA format"; 384 | } 385 | 386 | ############### 387 | # Iden_Field 388 | for ($i=1; $i<=$q->param('level'); $i++){ 389 | if ($program eq 'cd-hit'){ 390 | if (not ($q->param("lc$i") =~ /^\d+(\.\d+)?$/ and $q->param("lc$i")<=1 and $q->param("lc$i")>=0.1)){ 391 | return "Error: -c of level $i for cd-hit or cd-hit-2d should be a float between 0.1 to 1"; 392 | } 393 | } 394 | elsif ($program eq 'cd-hit-2d'){ 395 | if (not ($q->param("lc$i") =~ /^\d+(\.\d+)?$/ and $q->param("lc$i")<=1 and $q->param("lc$i")>=0.4)){ 396 | return "Error: -c of level $i for cd-hit or cd-hit-2d should be a float between 0.4 to 1"; 397 | } 398 | } 399 | else{ 400 | if (not ($q->param("lc$i") =~ /^\d+(\.\d+)?$/ and $q->param("lc$i")<=1 and $q->param("lc$i")>=0.75)){ 401 | return "Error: -c of level $i for cd-hit-est or cd-hit-est-2d should be a float between 0.75 to 1"; 402 | } 403 | } 404 | } 405 | 406 | for ($i=2; $i<=$q->param('level'); $i++){ 407 | if ( $q->param("lc$i") >= $q->param("lc".($i-1)) ){ 408 | return "Error: -c of level $i should be smaller than -c of level ".($i-1) 409 | } 410 | } 411 | 412 | ############### 413 | # Algo_Field 414 | if ($program eq 'cd-hit-est' or $program eq 'cd-hit-est-2d'){ $resu .= " -r ".$q->param('lr'); } 415 | $resu .= " -G ".$q->param('uG'); 416 | $resu .= " -g ".$q->param('lg'); 417 | 418 | if ($q->param('lb') =~ /^\d+$/){$resu .= " -b ".$q->param('lb'); } 419 | else{return "Error: -b should be an integer";} 420 | if ($q->param('ll') =~ /^\d+$/){$resu .= " -l ".$q->param('ll'); } 421 | else{return "Error: -l should be an integer";} 422 | 423 | ############### 424 | # Align_Field 425 | if ($q->param('ls') =~ /^\d+(\.\d+)?$/ and $q->param('ls') <= 1) { $resu .= " -s ".$q->param('ls'); } 426 | else { return "Error: -s should be a float between 0-1"; } 427 | 428 | if ($q->param('uS') =~ /^\d+$/ ){ $resu .= " -S ".$q->param('uS'); } 429 | elsif ($q->param('uS') ne 'unlimited'){ return "Error: -S should be an integer or unlimited"; } 430 | 431 | if ($q->param('lauL') =~ /^\d+(\.\d+)?$/ and $q->param('lauL') <=1) { $resu .= " -aL ".$q->param('lauL'); } 432 | else {return "Error: -aL should be a float between 0-1";} 433 | 434 | if ($q->param('uAuL') =~ /^\d+$/ ){ $resu .= " -AL ".$q->param('uAuL'); } 435 | elsif ($q->param('uAuL') ne 'unlimited'){ return "Error: -AL should be an integer or unlimited"; } 436 | 437 | if ($q->param('lauS') =~ /^\d+(\.\d+)?$/ and $q->param('lauS') <=1) { $resu .= " -aS ".$q->param('lauS'); } 438 | else {return "Error: -aS should be a float between 0-1";} 439 | 440 | if ($q->param('uAuS') =~ /^\d+$/ ){ $resu .= " -AS ".$q->param('uAuS'); } 441 | elsif ($q->param('uAuS') ne 'unlimited'){ return "Error: -AS should be an integer or unlimited"; } 442 | 443 | ############### 444 | # Length_Field 445 | 446 | if (defined($q->param('ls2'))){ # options used by cd-hit-2d or cd-hit-est-2d 447 | if ($q->param('ls2') =~ /^\d+(\.\d+)?$/ and $q->param('ls2') <=1) { $resu .= " -s2 ".$q->param('ls2'); } 448 | else { return "Error: -s2 should be a float between 0-1"; } 449 | } 450 | 451 | if (defined($q->param('uS2'))){ # options used by cd-hit-2d or cd-hit-est-2d 452 | if ($q->param('uS2') =~ /^\d+$/){ $resu .= " -S2 ".$q->param('uS2');} 453 | else { return "Error: -S2 should be an integer"; } 454 | } 455 | 456 | return $resu; 457 | } 458 | -------------------------------------------------------------------------------- /cgi-bin/delay-exec.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -n "$1" ]; then 4 | sleep_time=$1 5 | else 6 | sleep_time=30 7 | fi 8 | 9 | if [ -n "$2" ]; then 10 | cpu_usage_cutoff=$2 11 | else 12 | cpu_usage_cutoff=3200.0 13 | fi 14 | 15 | while [ 1 ] 16 | do 17 | ##PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 18 | ##429294 liwz 20 0 10016 4276 3200 R 11.8 0.0 0:00.03 top 19 | ##1 root 20 0 171584 13108 8408 S 0.0 0.0 1:04.49 systemd 20 | ##2 root 20 0 0 0 0 S 0.0 0.0 0:02.91 kthreadd 21 | ##3 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_gp 22 | ##4 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_par_gp 23 | 24 | cpu=0 25 | for i in $(top -b -n 1 | sed -n '8, 12{s/^ *//;s/ *$//;s/ */\t/gp;};12q' | cut -f 9); do 26 | cpu=$(echo "$i + $cpu" | bc) 27 | done 28 | 29 | flag=$(echo "$cpu > $cpu_usage_cutoff" |bc -l) 30 | echo $flag 31 | if [ $flag -eq 1 ]; then 32 | echo "wait, current cpu usage $cpu" 33 | else 34 | echo "cpu available, current cpu usage $cpu" 35 | break 36 | fi 37 | 38 | sleep $sleep_time 39 | done 40 | -------------------------------------------------------------------------------- /cgi-bin/get_plot.cgi: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | use CGI; 3 | #use strict; 4 | use Time::Local; 5 | use Switch; 6 | use Storable; 7 | use POSIX; 8 | use List::Util qw[min max]; 9 | 10 | require "./server-config.pl"; 11 | #my $SL_session_dir = "/home/oasis/data/webcomp/web-session"; 12 | 13 | my $q = new CGI; 14 | my $JOBID; 15 | my $JOBDIR; 16 | 17 | if (defined $q->param('JOBID')){ # retreive a existing job 18 | $JOBID = $q->param('JOBID'); 19 | $JOBDIR = "$SL_session_dir/$JOBID" 20 | } 21 | 22 | open(TMP, "$JOBDIR/$JOBID.conf"); 23 | my ($ll, %confs); 24 | while ($ll=){ 25 | chomp($ll); 26 | my ($key, $value) = split(/=/,$ll); 27 | $confs{$key} = $value; 28 | } 29 | 30 | print $q->header("text/html"), 31 | $q->start_html (-title=>"CD-HIT Suite"); 32 | 33 | print $q->p("The x-axis is the cluster size. Number of clusters >= this size is plotted using 34 | line-point style against left y-axis. Percentage of total sequences within clusters 35 | >= this size is plotted using line style against right y-axis."); 36 | print $q->br, $q->br; 37 | if ($confs{'program'} eq 'cd-hit-2d' or $confs{'program'} eq 'cd-hit-est-2d'){ 38 | print $q->p("Distribution of clusters and sequences at ".($confs{"lc1"}*100).'% level'); 39 | print $q->img({-src=>"../output/$JOBID/$JOBID.fas.db2novel.clstr.1.png",-height=>"400"}), $q->br; 40 | } 41 | else{ 42 | for (my $i=1;$i<=$confs{'level'};$i++){ 43 | print $q->p("$i. Distribution of clusters and sequences at ".($confs{"lc$i"}*100).'% level'); 44 | print $q->img({-src=>"../output/$JOBID/$JOBID.fas.$i.clstr.1.png",-height=>"400"}), $q->br; 45 | } 46 | } 47 | 48 | print $q->end_html(); 49 | -------------------------------------------------------------------------------- /cgi-bin/get_tree.cgi: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | use CGI; 3 | #use strict; 4 | use Time::Local; 5 | use Switch; 6 | use Storable; 7 | use POSIX; 8 | use List::Util qw[min max]; 9 | 10 | require "./server-config.pl"; 11 | #my $SL_session_dir = "/home/oasis/data/webcomp/web-session"; 12 | 13 | my $q = new CGI; 14 | my $JOBID; 15 | my $store_file; 16 | my $sortbywhat = "len"; 17 | 18 | if (defined $q->param('JOBID')){ # retreive a existing job 19 | $JOBID = $q->param('JOBID'); 20 | if (defined $q->param('sorting')){ $sortbywhat = $q->param('sorting') } 21 | $store_file = "$SL_session_dir/$JOBID/$JOBID.clstr_$sortbywhat.dump" 22 | } 23 | my @clstr = @{retrieve($store_file)}; 24 | 25 | # add by ying huang 26 | my $anno = 0; 27 | my %clstr_anno = (); 28 | my $store_file1 = "$SL_session_dir/$JOBID/$JOBID.fas.1.clstr.anno_$sortbywhat.dump"; 29 | if (-f $store_file1){ # anno info included 30 | $anno = 1; 31 | %clstr_anno = %{retrieve($store_file1)}; 32 | } 33 | # 34 | 35 | my $batchsize = 50; 36 | my $totalpage = ceil(scalar(@clstr)/$batchsize); 37 | my $pageno = 1; 38 | if (defined $q->param('pageno')) {$pageno = $q->param('pageno');} 39 | if ($pageno > $totalpage) {print $q->redirect($q->url()."?pageno=1");} 40 | my $start = ($pageno-1)*$batchsize; 41 | my $end = min(scalar(@clstr), $start+$batchsize); 42 | 43 | print 44 | $q->header("text/html"), 45 | $q->start_html(-title=>"CD-HIT Suite", 46 | -style=>{-src=>"../css/main.css"}, 47 | -script=>{-language=>"javascript",-src=>"../js/util.js"}); 48 | 49 | my $help_info1 = ($sortbywhat eq "no") ? "their No. sequences":"length of the representative"; 50 | my $help_info = <start_form(-action=>$q->url()); 66 | print <   

68 | EOD 69 | my $nextpage = $pageno + 1; 70 | my $prevpage = $pageno - 1; 71 | 72 | print $q->a({-href=>$q->url()."?pageno=1&JOBID=$JOBID&sorting=$sortbywhat"}, $q->img({-src=>"../css/images/pg-first.gif",-border=>"0"})); 73 | if ( $prevpage <= 0 ) { print $q->a({-href=>$q->url()."?pageno=1&JOBID=$JOBID&sorting=$sortbywhat"}, $q->img({-src=>"../css/images/pg-prev.gif",-border=>"0"}));} 74 | else { print $q->a({-href=>$q->url()."?pageno=$prevpage&JOBID=$JOBID&sorting=$sortbywhat"}, $q->img({-src=>"../css/images/pg-prev.gif",-border=>"0"})); } 75 | 76 | print "Page "; 77 | print $q->textfield(-name => 'pageno',-id => 'pageno', -size=>'+1',-value => $pageno,-size => 3,-onchange=>"submit()" ); 78 | print " of $totalpage"; 79 | 80 | if ($nextpage > $totalpage) { print $q->a({-href=>$q->url()."?pageno=$totalpage&JOBID=$JOBID&sorting=$sortbywhat"}, $q->img({-src=>"../css/images/pg-next.gif",-border=>"0"}));} 81 | else {print $q->a({-href=>$q->url()."?pageno=$nextpage&JOBID=$JOBID&sorting=$sortbywhat"}, $q->img({-src=>"../css/images/pg-next.gif",-border=>"0"}))}; 82 | print $q->a({-href=>$q->url()."?pageno=$totalpage&JOBID=$JOBID&sorting=$sortbywhat"}, $q->img({-src=>"../css/images/pg-last.gif",-border=>"0"})); 83 | print $q->hidden({-name=>"JOBID",-value=>$JOBID}); 84 | print $q->hidden({-name=>"sorting",-value=>$sortbywhat}); 85 | print $q->end_form(); 86 | 87 | my %node2size = (); 88 | my $clstr_level = 0; 89 | for (my $i=$start; $i<$end; $i++){ 90 | my $node1 = "$i"; 91 | my $j = 0; 92 | $clstr_level=1 if ($clstr_level<1); 93 | 94 | foreach my $seq1 (@{$clstr[$i][3]}) { 95 | if ($$seq1[2]) { # can be futher expanded 96 | my $node2 = "$i.$j"; 97 | my $k = 0; 98 | $clstr_level=2 if ($clstr_level<2); 99 | foreach my $seq2(@{$$seq1[3]}) { 100 | if ($$seq2[2]) { 101 | my $node3 = "$i.$j.$k"; 102 | my $nn = scalar(@{$$seq2[3]}); 103 | $clstr_level=3 if ($clstr_level<3); 104 | $node2size{$node1} += $nn; 105 | $node2size{$node2} += $nn; 106 | $node2size{$node3} += $nn; 107 | } 108 | else { 109 | $node2size{$node1}++; 110 | $node2size{$node2}++; 111 | } 112 | $k++; 113 | } 114 | } 115 | else { 116 | $node2size{$node1}++; 117 | } 118 | $j++; 119 | } 120 | } 121 | 122 | for (my $i=$start; $i<$end; $i++){ 123 | print "\n

"; 124 | my $branch_str = ($clstr_level>1)? ", No. branches:". scalar(@{$clstr[$i][3]}) : ""; 125 | print $q->a({-href=>"javascript: hideShow('hello$i')"}, $q->img({-id=>"ihello$i",-src=>"../css/images/plus.png",-border=>"0"})); 126 | print "Cluster $i", $branch_str, ", No. sequences: ", $node2size{"$i"}, ", Representative: $clstr[$i][0], length:$clstr[$i][1] "; 127 | ######################################## # add by ying huang for annotation present 128 | if ($anno == 1){ 129 | print "
    Check over-represented function annotation term in the cluster"; 130 | print $q->a({-href=>"javascript: toggle('anno$i')"}, $q->img({-id=>"ianno$i",-src=>"../css/images/help.gif",-border=>"0"})); 131 | print ""; 140 | } 141 | print "
\n"; 142 | ####################################### 143 | 144 | print ""; 174 | } 175 | else{ 176 | print "$j. $$seq1[0], length: $$seq1[1], identity: $$seq1[4]\n"; 177 | } 178 | $j = $j+1; 179 | } 180 | print ""; 181 | } 182 | 183 | print $q->end_html(); 184 | 185 | -------------------------------------------------------------------------------- /cgi-bin/index.cgi: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | use CGI::Pretty qw(:standard *table); 3 | require "./service-local.pl"; 4 | 5 | my $cmd = (defined param('cmd')) ? param('cmd') : 'Server home'; 6 | my $JOBID = (defined param('JOBID')) ? param('JOBID') : 0; 7 | 8 | if ($cmd eq 'result' and $JOBID ne "0") { print redirect("result.cgi?JOBID=$JOBID");} 9 | 10 | print_header(); 11 | print_content($cmd, $JOBID); 12 | print_tail(); 13 | -------------------------------------------------------------------------------- /cgi-bin/result.cgi: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | use CGI::Pretty qw( *table); 3 | use Time::Local; 4 | use Switch; 5 | 6 | my $q = new CGI; 7 | 8 | require "./server-config.pl"; 9 | #my $SL_session_dir = "/home/oasis/data/webcomp/web-session"; 10 | my $N_refresh = 15; 11 | 12 | my %fail_codes = (); 13 | $fail_codes{"Long"} = < 15 | Our server can not effectively clustering very long sequences, e.g. genomes. Your job took 16 | too long time, it was killed to allow other jobs to run. 17 | 18 | Please modify your job by removing very long sequences. We are sorry, but we are developing 19 | tools to allow clustering genome-sized sequences, maybe available in near future. 20 | 21 | CD-HIT team. 22 | 23 | EOD 24 | $fail_codes{"Bin"} = < 26 | The file you uploaded is binary, please check your file 27 | 28 | EOD 29 | $fail_codes{"DNA"} = < 31 | Your input file is DNA, you need to use cd-hit-est, but you used cd-hit, please resubmit 32 | 33 | EOD 34 | 35 | my $base_cgi = "/cgi-bin/index.cgi"; 36 | my $JOBID = $q->param('JOBID'); 37 | $JOBID =~ s/\s+//g; 38 | 39 | security_check($JOBID); 40 | 41 | if (defined $q->param('side')){ 42 | if ($q->param('side') eq 'left' ) {result_left($JOBID);} 43 | else {result_right($JOBID);} 44 | exit(0); 45 | } 46 | 47 | if (-e "$SL_session_dir/$JOBID/$JOBID.fail") { failed_job($JOBID); } 48 | if (-f "$SL_session_dir/$JOBID/$JOBID.ok") { completed_job($JOBID);} 49 | if (-d "$SL_session_dir/$JOBID") { running_job($JOBID); } 50 | unknown_job($JOBID); 51 | 52 | sub security_check{ 53 | my $JOBID = shift; 54 | if ($JOBID =~ /\D/) { 55 | print $q->header("text/html"); 56 | print "Invalid job id"; 57 | print $q->end_html; 58 | 59 | exit(); 60 | } 61 | } 62 | 63 | sub failed_job{ 64 | my $JOBID = shift; 65 | print $q->header("text/html"); 66 | print $q->title("You job $JOBID is failed"); 67 | print "We are sorry, but your job $JOBID is failed:", $q->br; 68 | open(TMP, "$SL_session_dir/$JOBID/$JOBID.fail"); 69 | my $ll; 70 | while ($ll=) { 71 | my $txt = $ll; 72 | if ($ll =~ /^Error_code\s+(\w+)/) { 73 | $txt = $fail_codes{$1}; 74 | } 75 | print $txt.$q->br; 76 | } 77 | close(TMP); 78 | print_google_analytics(); 79 | print $q->end_html; 80 | exit(0); 81 | } 82 | 83 | sub completed_job{ 84 | my $JOBID = shift; 85 | print $q->header("text/html"); 86 | print $q->title("You job $JOBID is finished"); 87 | print $q->frameset({-cols=>'15%,85%'}, 88 | $q->frame({-name=>'left',-src=>"result.cgi?JOBID=$JOBID&side=left"}), 89 | $q->frame({-name=>'right',-src=>"result.cgi?JOBID=$JOBID&side=right"}) 90 | ); 91 | exit(0); 92 | } 93 | 94 | sub running_job{ 95 | my $JOBID = shift; 96 | my $tmp_url = $q->url()."?JOBID=$JOBID"; 97 | print $q->header(-type=>"text/html",-refresh=>$N_refresh); 98 | print $q->start_html(-title=>"You job $JOBID is still runnnig"); 99 | print "You job $JOBID has been submitted", $q->br; 100 | print "You job $JOBID is still running", $q->br; 101 | print "This page will be refreshed every $N_refresh seconds", $q->br; 102 | print "You can also use this link to retrieve your job:", $q->br; 103 | print $q->a({-href=>$tmp_url}, $tmp_url), $q->br; 104 | print_google_analytics(); 105 | print $q->end_html; 106 | exit(0) 107 | } 108 | 109 | sub unknown_job{ 110 | my $JOBID = shift; 111 | print $q->header(-type=>"text/html",-refresh=>$N_refresh); 112 | print $q->start_html(-title=>"You job $JOBID not found"); 113 | print "We can't recognize JOBID \"$JOBID\" you submitted", $q->br; 114 | print "Perhaps your job haven't entered the queue yet, be patient", $q->br; 115 | print "Or you submitted a wrong JOBID", $q->br; 116 | print_google_analytics(); 117 | print $q->end_html; 118 | exit(0); 119 | } 120 | 121 | sub print_google_analytics { 122 | print < 124 | var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); 125 | document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); 126 | 127 | 132 | EOD 133 | } 134 | 135 | sub result_left{ 136 | my $JOBID = shift; 137 | print $q->header(-type=>"text/html"); 138 | print $q->start_html(-title=>"You job $JOBID is finished",-bgcolor=>"#dff0ff", -style=>{-src=>"../css/main.css"}); 139 | print < 141 | 142 | 143 | 153 | 154 |
144 | Raw output
145 | Download all files
146 | Browse clusters by size
147 | Browse clusters by length
148 | EOD 149 | 150 | print <Distribution of clusters
152 |
155 | EOD 156 | 157 | print_google_analytics(); 158 | print $q->end_html; 159 | } 160 | 161 | sub result_right{ 162 | my $JOBID = shift; 163 | print $q->header("text/html"); 164 | print $q->start_html(-title=>"You job $JOBID is finished",-bgcolor=>"#dff0ff"); 165 | print "You job $JOBID is finished."; 166 | open(TMP, "$SL_session_dir/$JOBID/$JOBID.conf"); 167 | my ($ll, %confs, $i); 168 | 169 | while ($ll=){ 170 | chomp($ll); 171 | my ($key, $value) = split(/=/,$ll); 172 | $confs{$key} = $value; 173 | } 174 | print $q->br, "Program you ran: ".$confs{'program'}; 175 | 176 | if (defined($confs{'input'})){ 177 | print $q->hr, 178 | "You input file is ".$confs{'input'}." and we named it as " 179 | .$q->a({-href=>"../output/$JOBID/$JOBID.fas.0"},"$JOBID.fas.0"), $q->br; 180 | print "Summary information for $JOBID.fas.0 included in " 181 | .$q->a({-href=>"../output/$JOBID/$JOBID.fas.0.stat"},"$JOBID.fas.0.stat"), $q->br; 182 | print "You required ".$confs{'level'}." runs for sequence clustering",$q->br; 183 | my $space1 = "    "; 184 | my $space2 = "        "; 185 | for ($i=1;$i<=$confs{'level'};$i++){ 186 | my $str1 = ($i > 1) ? "(only representative sequences from pervious run included)":""; 187 | print "$space1 $i. Fasta file for representative sequences at " .($confs{"lc$i"}*100).'% identity is ' 188 | .$q->a({-href=>"../output/$JOBID/$JOBID.fas.$i"},"$JOBID.fas.$i"), $q->br; 189 | print "$space2 Summary information for $JOBID.fas.$i included in " 190 | .$q->a({-href=>"../output/$JOBID/$JOBID.fas.$i.stat"},"$JOBID.fas.$i.stat"), $q->br; 191 | print "$space2 Corresponding cluster file $str1 is" 192 | .$q->a({-href=>"../output/$JOBID/$JOBID.fas.$i.clstr"},"$JOBID.fas.$i.clstr"), $q->br; 193 | print "$space2 Sorted cluster file by size is " 194 | .$q->a({-href=>"../output/$JOBID/$JOBID.fas.$i.clstr.sorted"},"$JOBID.fas.$i.clstr.sorted"), $q->br; 195 | if ($i > 1){ 196 | print "$space2 Cluster file where all sequences are included is " 197 | .$q->a({-href=>"../output/$JOBID/$JOBID.fas.$i-0.clstr"},"$JOBID.fas.$i-0.clstr"),$q->br; 198 | print "$space2 Sorted cluster file by size is " 199 | .$q->a({-href=>"../output/$JOBID/$JOBID.fas.$i-0.clstr.sorted"},"$JOBID.fas.$i-0.clstr.sorted"),$q->br; 200 | } 201 | } 202 | } 203 | else{ 204 | if ($confs{'local'} eq 1){ 205 | print "You db1 file is sequence database ".$confs{'db1'}.$q->br; 206 | } 207 | else{ 208 | print "You db1 file is ".$confs{'db1'}." and we named it as " 209 | .$q->a({-href=>"../output/$JOBID/$JOBID.fas.db1"},"$JOBID.fas.db1"), $q->br; 210 | print "    Summary information for $JOBID.fas.db1 included in " 211 | .$q->a({-href=>"../output/$JOBID/$JOBID.fas.db1.stat"},"$JOBID.fas.db1.stat"), $q->br; 212 | } 213 | print "You db2 file is ".$confs{'db2'}." and we named it as " 214 | .$q->a({-href=>"../output/$JOBID/$JOBID.fas.db2"},"$JOBID.fas.db2"), $q->br; 215 | print "    Summary information for $JOBID.fas.db2 included in " 216 | .$q->a({-href=>"../output/$JOBID/$JOBID.fas.db2.stat"},"$JOBID.fas.db2.stat"), $q->br; 217 | print "Sequences in db2 that are matched to db1 are stored in a cluster file " 218 | .$q->a({-href=>"../output/$JOBID/$JOBID.fas.db2novel.clstr"},"$JOBID.fas.db2novel.clstr"), $q->br; 219 | print "cluster file (sorted by size) is " 220 | .$q->a({-href=>"../output/$JOBID/$JOBID.fas.db2novel.clstr.sorted"},"$JOBID.fas.db2novel.clstr.sorted"), $q->br; 221 | print "Sequences in db2 that are not matched to db1 are stored in a fasta file " 222 | .$q->a({-href=>"../output/$JOBID/$JOBID.fas.db2novel"},"$JOBID.fas.db2novel"), $q->br; 223 | } 224 | print $q->hr; 225 | print "Generated shell script is " 226 | .$q->a({-href=>"../output/$JOBID/run-$JOBID.sh"},"run-$JOBID.sh") 227 | .$q->br.$q->br; 228 | open(TMP,"$SL_session_dir/$JOBID/run-$JOBID.sh"); 229 | while (my $ll=) { next unless($ll=~/^cd-hit/ or $ll=~/\.pl/ or $ll=~/\.py/); print $ll.$q->br; } 230 | print_google_analytics(); 231 | print $q->end_html; 232 | } 233 | -------------------------------------------------------------------------------- /cgi-bin/server-config.pl: -------------------------------------------------------------------------------- 1 | #### EC2 setting ###################################################################### 2 | $NGS_cdhit_dir = "/home/oasis/data/NGS-ann-project/apps/cd-hit"; 3 | $NGS_blast_dir = "/home/oasis/data/NGS-ann-project/apps/bin"; 4 | $SL_session_dir = "/home/oasis/data/webcomp/web-session"; 5 | $SL_rammcap_dir = "/home/oasis/data/webcomp/RAMMCAP-ann"; 6 | $SL_bin_dir = "$SL_rammcap_dir/bin"; 7 | 8 | $qsub_exe = "/opt/sge6/bin/linux-x64/qsub"; 9 | $admin_email = "liwz\@sdsc.edu"; 10 | $sw_db = "/home/oasis/data/webcomp/RAMMCAP-ann/database/swissprot"; 11 | $pdb_db = "/home/oasis/data/webcomp/RAMMCAP-ann/database/pdbaa"; 12 | 13 | $qsub_local = <"../css/images/help.gif", -border=>"0", -alt=>"."}; 7 | my $whole_width = "900"; 8 | my $table_l1 = "500"; 9 | 10 | 11 | sub print_header{ 12 | print header("text/html"), 13 | start_html(-title=>"CD-HIT Suite", 14 | -style=>{-src=>"../css/main.css"}, 15 | -script=>{-language=>"javascript",-src=>"../js/util.js"}, 16 | -bgcolor=>"grey"), 17 | br, br, 18 | start_table({-style=>"border-bottom: 1px solid rgb(128, 128, 128);", -align=>"center", -bgcolr=>"#f0-f8ff", -width=>$whole_width}), 19 | Tr( 20 | td({-style=>"border-bottom: 1px solid rgb(161, 161, 161);",-bgcolor=>"#dff0ff",-height=>"80"}, 21 | table({-align=>"center",-width=>"90%"}, 22 | Tr([ td(font({-size=>"+2"},"CD-HIT Suite: Biological Sequence Clustering and Comparison")) ]) 23 | ) 24 | ) 25 | ), 26 | end_table(); 27 | } 28 | 29 | sub print_content{ 30 | my $cmd = shift; 31 | my $JOBID = shift; 32 | print start_table({-style=>"border-bottom: 1px solid rgb(128, 128, 128);", -align=>"center", -bgcolr=>"#f0-f8ff", -width=>$whole_width}), 33 | Tr([ 34 | td({-align=>"center",-valign=>"top",-bgcolor=>"white"}, 35 | br 36 | .div({-class=>"menu1box"}, menu_list($cmd)) 37 | .div({-class=>"main1box"}, main_content($cmd, $JOBID).br) 38 | .br 39 | ) 40 | ]), 41 | end_table(); 42 | } 43 | 44 | 45 | sub main_content{ 46 | my $cmd = shift; 47 | my $JOBID = shift; 48 | if ($cmd eq "Server home"){ 49 | 50 | my $intro_txt = <CD-HIT home page. 56 | EOD 57 | my $li_cdhit = "cd-hit"; 58 | my $li_cdhit_txt = < 110 | We recommand that you download the zipped file after the job finished. We will delete 111 | the jobs older than 90 days to save disk space. 112 |

113 | Thank you for your understanding. 114 | EOD 115 | return 116 | br.div({-class=>"para"}, $intro_txt.br.br, 117 | ul( 118 | li(font({-size=>"+2"},a({-href=>"index.cgi?cmd=cd-hit"}, $li_cdhit )), ul(li($li_cdhit_txt .br.br))), 119 | li(font({-size=>"+2"},a({-href=>"index.cgi?cmd=cd-hit-est"}, $li_cdhitest)), ul(li($li_cdhitest_txt .br.br))), 120 | li(font({-size=>"+2"},a({-href=>"index.cgi?cmd=h-cd-hit"}, $li_hcdhit)), ul(li($li_hcdhit_txt .br.br))), 121 | li(font({-size=>"+2"},a({-href=>"index.cgi?cmd=h-cd-hit-est"}, $li_hcdhitest)), ul(li($li_hcdhitest_txt .br.br))), 122 | li(font({-size=>"+2"},a({-href=>"index.cgi?cmd=cd-hit-2d"}, $li_cdhit2d)), ul(li($li_cdhit2d_txt .br.br))), 123 | li(font({-size=>"+2"},a({-href=>"index.cgi?cmd=cd-hit-est-2d"},$li_cdhitest2d)),ul(li($li_cdhitest2d_txt.br.br))), 124 | li(font({-size=>"+2"},a({-href=>"index.cgi?cmd=result"}, "result")), ul(li($li_result_txt .br.br))), 125 | li(font({-size=>"+2"},a({-href=>"index.cgi?cmd=calculated%20clusters"},"calculated clusters")), ul(li($li_ftp_txt .br.br))), 126 | li(font({-size=>"+2"},"server usage"), ul(li($li_server_txt .br.br))) 127 | )); 128 | } 129 | 130 | if ($cmd eq "calculated clusters"){ 131 | return br.br.div({-class=>"para"}, "

".font({-size=>"+3"}, "cdhit ftp")."
".br.br, 132 | ul(li(font({-size=>"+2"},a({-href=>"ftp://weizhong-lab.ucsd.edu/data"},"calculated clusters ftp"))))); 133 | } 134 | 135 | if ($cmd eq "result"){ 136 | if ($JOBID eq 0){ 137 | my $sample_txt=< 140 | Results older than 180 days will be removed from the server to save disk space! 141 | 142 | 143 |
144 | Samples
145 | Sample protein dataset:
146 | download data, 147 | view results 148 | by h-cd-hit at three levels: 90%, 60% and 30%

149 | 150 | Sample protein dataset with annotation term:
151 | This dataset contains proteins annotated with COG family. the defline of 152 | this fasta file looks like ">AF0017_1||COG1250" where the COG family ID is appended 153 | after ">sequence_name||". 154 | download data, 155 | view results 156 | by cd-hit clustered at 60% identity

157 | 158 | Sample DNA dataset:
159 | download data, 160 | view results by cd-hit-est at 95%

161 | 162 | Sample DNA dataset with annotation term:
163 | This dataset contains microbial rRNAs annotated with Taxonomy ID at genus rank, the defline of 164 | this fasta file looks like ">NC_009925__1405528_1405648_5S||genus_taxid_15597", where the Taxonomy ID is appended 165 | after ">sequence_name||". 166 | download data, 167 | view results by 168 | cd-hit-est clustered at 95% identity

169 | 170 | EOD 171 | return start_form({-id=>"myform",-action=>"cdhit.cgi",-method=>"post",-enctype=>"multipart/form-data"}) 172 | .hidden({-name=>"program",-value=>$cmd}) 173 | .div({-class=>"para"}, "Please input your job id to retrive the running result:" 174 | ,textfield(-name=>"JOBID", -size=>"16", -value=>""), submit(-name=>"sub", -value=>"Submit", -style=>"font-size:120%")) 175 | .end_form(). div({-class=>"para"}, $sample_txt); 176 | } 177 | else { 178 | return start_form({-id=>"myform",-action=>"cdhit.cgi",-method=>"post",-enctype=>"multipart/form-data"}) 179 | .hidden({-name=>"program",-value=>$cmd}) 180 | .div({-class=>"para"}, iframe({-src=>"result.cgi?JOBID=$JOBID", -width=>"100%", -height=>"600"},"hello")) 181 | .end_form(); 182 | } 183 | } 184 | 185 | my $Fields; 186 | if ($cmd eq "cd-hit-2d" or $cmd eq "cd-hit-est-2d"){ 187 | $Fields = div({-class=>"para"},br, Data_Field($cmd),br,Iden_Field($cmd),br,Algo_Field($cmd),br,Align_Field($cmd),br,Length_Field($cmd),br,Mail_Field($cmd)); 188 | } 189 | else{ 190 | $Fields = div({-class=>"para"},br, Data_Field($cmd),br,Iden_Field($cmd),br,Algo_Field($cmd),br,Align_Field($cmd),br,Mail_Field($cmd)); 191 | } 192 | 193 | return start_form({-id=>"myform",-action=>"cdhit.cgi",-method=>"post",-enctype=>"multipart/form-data"}) 194 | .hidden({-name=>"program",-value=>$cmd}) 195 | .$Fields 196 | .div({-class=>"para_sub", -align=>"center"}, 197 | submit(-name=>"sub", -value=>"Submit", -style=>"font-size:120%"), 198 | "    ", 199 | reset(-name=>"clear",-value=>"Clear",-style=>"font-size:120%")) 200 | .end_form(); 201 | } 202 | 203 | sub print_tail{ 204 | print table({-style=>"border-bottom: 1px solid rgb(128, 128, 128);",-align=>"center",-width=>$whole_width}, 205 | Tr({-bgcolor=>"#dff0ff"},[ 206 | td(div({-class=>"para"}, "

Reference:
", 207 | ol(li('Ying Huang, Beifang Niu, Ying Gao, Limin Fu and Weizhong Li. ' 208 | ."CD-HIT Suite: a web server for clustering and comparing biological sequences. " 209 | ."Bioinformatics, 2010(26): 680-682.".a({-href=>"http://bioinformatics.oxfordjournals.org/content/26/5/680"},"full text")), 210 | li('Weizhong Li and Adam Godzik. ' 211 | ."Cd-hit: a fast program for clustering and comparing large sets of protein or nucleotide sequences. " 212 | ."Bioinformatics, 2006(22): 1658-1659. ".a({-href=>"http://bioinformatics.oxfordjournals.org/cgi/content/full/22/13/1658"},"full text")), 213 | li('Weizhong Li, Lukasz Jaroszewski and Adam Godzik. ' 214 | ."Tolerating some redundancy significantly speeds up clustering of large protein databases. " 215 | ."Bioinformatics, 2002(18): 77-82. ".a({-href=>"http://bioinformatics.oxfordjournals.org/cgi/reprint/18/1/77"},"full text")), 216 | li('Weizhong Li, Lukasz Jaroszewski and Adam Godzik. ' 217 | ."Clustering of highly homologous sequences to reduce the size of large protein databases. " 218 | ."Bioinformatics, 2001(17): 282-283. ".a({-href=>"http://bioinformatics.oxfordjournals.org/cgi/reprint/17/3/282"},"full text")) 219 | ))), 220 | td({-align=>"center",-bgcolor=>"#dff0ff",-height=>"50"}, 221 | 'Contact @Weizhong Li') 222 | ]) 223 | ); 224 | 225 | print < 227 | var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); 228 | document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); 229 | 230 | 235 | 236 | 237 | 238 | EOD 239 | } 240 | 241 | sub Length_Field{ 242 | # this is a field specific to 2d comparison 243 | my $mcd = shift; 244 | return fieldset({-id=>"LenPara"}, legend("Length Control Parameters"), 245 | table(Tr( td({-width=>$table_l1}, "Length difference cutoff (fraction)".help_object('ls2')) 246 | .td(textfield(-name=>"ls2", -size=>"4", -value=>"1.0"))), 247 | help_box("ls2", "length difference cutoff, default 1.0. 248 | by default, the length of seqs in db1 >= seqs in db2 in the same cluster. 249 | if set to 0.9, the length of seqs in db1 may only need to be >= 0.9 x seq lengthes in db2"), 250 | Tr( td({-width=>$table_l1}, "Length difference cutoff (amino acids/bases)".help_object('uS2')) 251 | .td(textfield(-name=>"uS2", -size=>"4", -value=>"0"))), 252 | help_box("uS2", "length difference cutoff, default 0. 253 | by default, the length of seqs in db1 >= seqs in db2 in the same cluster. 254 | if set to 60, seqs in db2 may be up to 60 amino acid/bases longer than seqs in db1") 255 | 256 | ) 257 | ); 258 | } 259 | 260 | 261 | sub Data_Field{ 262 | my $cmd = shift; 263 | my @columns = (); 264 | # push @columns, td("Load Fasta file from your computer:".filefield({-name=>"SeqF"})); 265 | # push @columns, td("Click ".a({-href=>"#"},"here")." for an example file"); 266 | 267 | if ($cmd eq "cd-hit-2d"){ 268 | push @columns, td("CD-HIT-2D compares 2 protein datasets (db1, db2). It identifies the sequences in db2 that 269 | are similar to db1 at a certain threshold.".br); 270 | push @columns, td("Choose db1"); 271 | push @columns, td("    "#" 272 | ."Load search database (in Fasta format) :" 273 | .""); # onchange='document.forms[0].elements[\"which_db1\"][0].checked=\"checked\";'>"); 274 | # push @columns, td("    " 275 | # ."Use a commonly used sequence database:" 276 | # .""); 278 | push @columns, td("Choose db2"); 279 | } 280 | elsif ($cmd eq "cd-hit-est-2d"){ 281 | push @columns, td("CD-HIT-EST-2D compares 2 nucleotide datasets (db1, db2). It identifies the sequences in 282 | db2 that are similar to db1 at a certain threshold."); 283 | push @columns, td("Choose db1"); 284 | push @columns, td("    "#" 285 | ."Load search database (in Fasta format) :" 286 | .""); 287 | # push @columns, td("    " 288 | # ."Use a commonly used sequence database:" 289 | # .""); 291 | push @columns, td("Choose db2"); 292 | } 293 | # push @columns, td("Choose db2"); 294 | push @columns, td("    Load Query Fasta file from your computer:".filefield({-name=>"SeqF"})); 295 | if ($cmd eq "cd-hit" || $cmd eq "cd-hit-est"){ 296 | push @columns, td("     297 |   Incorporate annotation info at header line".help_object('anno')); 298 | push @columns, help_box("anno", "If this option is checked, the header lines of the input fasta file 299 | should have format: '>SequenceID||term1,term2', here term1, term2 is the function 300 | annotation of corresponding input sequence, seperated by comma (no space). The user can leave 301 | it blank if the sequence has not been annotated. You can click result tab for sample data."); 302 | } 303 | 304 | return fieldset({-id=>"DataPara"}, legend("Sequence file and databases".help_object('File_Size')),table( help_box("File_Size", "In current version, the maximu size 305 | of uploaded files is 50MB"), Tr(\@columns))); 306 | } 307 | 308 | 309 | sub Iden_Field{ 310 | my $cmd = shift; 311 | if ($cmd eq "h-cd-hit" or $cmd eq "h-cd-hit-est"){ 312 | return fieldset({-id=>"IdenPara"}, legend("Sequence Identity Parameters"), 313 | table( 314 | Tr(td({-width=>$table_l1}, "Number of CD-HIT runs".help_object('BasicHelp')) 315 | .td(popup_menu(-name=>"level",-onchange=>"SetIden()",-values=>["1","2","3"], -labels=>{"1"=>"1","2"=>"2","3"=>"3"}, -default=>"1")) 316 | ), 317 | help_box("BasicHelp", "try basic help"), 318 | Tr(td({-width=>$table_l1}, "" 319 | ."Sequence identity cut-off for 1st run".help_object('Iden1')).td(iden_text("1")) 320 | ), 321 | help_box("Iden1", "Sequence identity cut-off for 1st run, should be a float between 0 to 1"), 322 | Tr(td({-width=>$table_l1}, "" 323 | ."Sequence identity cut-off for 2nd run".help_object('Iden2')).td(iden_text("2")) 324 | ), 325 | help_box("Iden2", "Sequence identity cut-off for 2nd run, should be a float between 0 to cut-off for 1st run"), 326 | Tr(td({-width=>$table_l1}, "" 327 | ."Sequence identity cut-off for 3rd run".help_object('Iden3')).td(iden_text("3")) 328 | ), 329 | help_box("Iden3", "Sequence identity cut-off for 3rd run, should be a float between 0 to cut-off for 2nd run") 330 | ) 331 | ); 332 | } 333 | else{ 334 | return fieldset({-id=>"IdenPara"}, legend("Sequence Identity Parameters"), 335 | hidden({-name=>"level",-value=>"1"}), 336 | table( 337 | Tr(td({-width=>$table_l1}, "" 338 | ."Sequence identity cut-off".help_object('Iden1')).td(iden_text("1")) 339 | ), 340 | help_box("Iden1", "Sequence identity cut-off should be a float between 0 to 1, 0.9 means 90% identity") 341 | ) 342 | ); 343 | } 344 | } 345 | 346 | 347 | 348 | sub Algo_Field{ 349 | my $cmd = shift; 350 | my @columns = (); 351 | if ($cmd eq "cd-hit-est" or $cmd eq "h-cd-hit-est" or $cmd eq "cd-hit-est-2d"){ 352 | push @columns, Tr(td({-width=>$table_l1}, "-r: comparing both strands".help_object('Both')) 353 | .td("NoYes") 354 | ); 355 | push @columns, help_box("Both", "Whether reverse complementary strand of the nucleotides should be included in comparison?"); 356 | } 357 | 358 | push @columns, Tr(td({-width=>$table_l1}, "-G: use global sequence identity".help_object('Global')) 359 | .td("NoYes") 360 | ); 361 | push @columns, help_box("Global", "Use global sequence identity or local sequence identity, local sequence identity was calculated as : 362 | number of identical amino acids in alignment divided by the length of the alignment"); 363 | push @columns, Tr(td({-width=>$table_l1}, "-g: sequence is clustered to the best cluster that meet the threshold".help_object('Similar')) 364 | .td("NoYes") 365 | ); 366 | push @columns, help_box("Similar", "By cd-hit's default algorithm, a sequence is clustered to the first cluster that meet the threshold (fast mode). 367 | If set to yes, the program will cluster it into the most similar cluster that meet the threshold (accurate but slow mode)"); 368 | push @columns, Tr(td({-width=>$table_l1}, "-b: bandwidth of alignment".help_object("Alignment")) 369 | .td(textfield(-name=>"lb", -size=>"4", -value=>"20"))); 370 | push @columns, help_box("Alignment", "Band width of alignment, should be a positive integer"); 371 | push @columns, Tr(td({-width=>$table_l1}, "-l: length of sequence to skip".help_object("Skipshortseq")) 372 | .td(textfield(-name=>"ll", -size=>"4", -value=>"10"))); 373 | push @columns, help_box("Skipshortseq", "Sequences below this length will be skipped"); 374 | 375 | return fieldset({-id=>"AlgoPara"}, legend("Algorithm Parameters"), table( join(" ",@columns))); 376 | } 377 | 378 | 379 | 380 | sub Align_Field{ 381 | return 382 | fieldset({-id=>"AlignPara"}, legend("Alignment Coverage Parameters".help_object('Coverage')), 383 | table( 384 | Tr({-style=>"display:none", -id=>"Coverage"}, 385 | td("
. 386 | 387 | aL = Ra / R, AL = R- Ra
aS = Sa / S, AS = S- Sa
388 | s = Sa / Ra, S = R - S
")), 389 | Tr([ 390 | td({-width=>$table_l1}, "-aL: minimal alignment coverage (fraction) for the longer sequence") .td(textfield(-name=>"lauL", -size=>"6", -value=>"0.0")), 391 | td({-width=>$table_l1}, "-AL: maximum unaligned part (amino acids/bases) for the longer sequence") .td(textfield(-name=>"uAuL", -size=>"6", -value=>"unlimited")), 392 | td({-width=>$table_l1}, "-aS: minimal alignment coverage (fraction) for the shorter sequence") .td(textfield(-name=>"lauS", -size=>"6", -value=>"0.0")), 393 | td({-width=>$table_l1}, "-AS: maximum unaligned part (amino acids/bases) for the shorter sequence").td(textfield(-name=>"uAuS", -size=>"6", -value=>"unlimited")), 394 | td({-width=>$table_l1}, "-s: minimal length similarity (fraction)") .td(textfield(-name=>"ls", -size=>"6", -value=>"0.0")), 395 | td({-width=>$table_l1}, "-S: maximum length difference in amino acids/bases(-S)") .td(textfield(-name=>"uS", -size=>"6", -value=>"unlimited")) 396 | ]) 397 | ) 398 | ); 399 | } 400 | 401 | ## for sending job stat link: added by Beifang Niu 402 | sub Mail_Field{ 403 | return fieldset({-id=>"Mail"}, legend("Mail address for job checking".help_object('Mailnotice')), 404 | table( Tr({-style=>"display:none", -id=>"Mailnotice"}, 405 | td("
Your job running stat link will be sent to your mail box")), 406 | Tr([ td({-width=>$table_l1}, "Give your mail address: ".textfield(-name=>"Mailaddress", -size=>"25", -value=>" "))]) 407 | )); 408 | } 409 | 410 | 411 | sub help_object{ 412 | return a({-href=>"javascript: toggle('".$_[0]."')"}, img($help_image)); 413 | } 414 | 415 | sub help_box{ 416 | return Tr({-style=>"display:none",-id=>$_[0]}, td(div({-class=>"helpbox"}, $_[1]))); 417 | } 418 | 419 | sub iden_text{ 420 | return textfield(-name=>"lc$_[0]", -size=>"4", -value=>"0.9"); 421 | } 422 | 423 | sub menu_list{ 424 | my $cmd = shift; 425 | my $relative_url = url(-relative=>1); 426 | my @cmds = ('Server home', 'cd-hit', 'cd-hit-est', 'h-cd-hit', 'h-cd-hit-est', 'cd-hit-2d', 'cd-hit-est-2d', 'result','calculated clusters'); 427 | my @li_list = (); 428 | foreach (@cmds){ 429 | my $lab = $_; 430 | if ($_ eq $cmd){ 431 | push @li_list, li({-class=>"hover"},a({-href=>"$relative_url?cmd=$_"}, $lab)); 432 | } 433 | else{ 434 | push @li_list, li(a({-href=>"$relative_url?cmd=$_"}, $lab)); 435 | } 436 | } 437 | return ul({-id=>"menu1"}, join(" ",@li_list)); 438 | } 439 | -------------------------------------------------------------------------------- /css/images/coverage.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizhongli/cdhit-web-server/414b4eec563b34eaab8036d44fff698a2c849904/css/images/coverage.gif -------------------------------------------------------------------------------- /css/images/help.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizhongli/cdhit-web-server/414b4eec563b34eaab8036d44fff698a2c849904/css/images/help.gif -------------------------------------------------------------------------------- /css/images/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizhongli/cdhit-web-server/414b4eec563b34eaab8036d44fff698a2c849904/css/images/minus.png -------------------------------------------------------------------------------- /css/images/pg-first.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizhongli/cdhit-web-server/414b4eec563b34eaab8036d44fff698a2c849904/css/images/pg-first.gif -------------------------------------------------------------------------------- /css/images/pg-last.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizhongli/cdhit-web-server/414b4eec563b34eaab8036d44fff698a2c849904/css/images/pg-last.gif -------------------------------------------------------------------------------- /css/images/pg-next.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizhongli/cdhit-web-server/414b4eec563b34eaab8036d44fff698a2c849904/css/images/pg-next.gif -------------------------------------------------------------------------------- /css/images/pg-prev.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizhongli/cdhit-web-server/414b4eec563b34eaab8036d44fff698a2c849904/css/images/pg-prev.gif -------------------------------------------------------------------------------- /css/images/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizhongli/cdhit-web-server/414b4eec563b34eaab8036d44fff698a2c849904/css/images/plus.png -------------------------------------------------------------------------------- /css/images/view-nextpage.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizhongli/cdhit-web-server/414b4eec563b34eaab8036d44fff698a2c849904/css/images/view-nextpage.gif -------------------------------------------------------------------------------- /css/images/view-prevpage.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizhongli/cdhit-web-server/414b4eec563b34eaab8036d44fff698a2c849904/css/images/view-prevpage.gif -------------------------------------------------------------------------------- /css/main.css: -------------------------------------------------------------------------------- 1 | body,div,ul,li { margin:0 auto; padding:0; 2 | font: 11px "Lucida Grande", "Trebuchet MS", Verdana, Helvetica, sans-serif; 3 | font-size:14px;} 4 | body{ text-align:center; } 5 | a:link{ color:#00F; text-decoration:none;} 6 | a:visited { color: #00F; text-decoration:none;} 7 | a:hover { color: #c00; text-decoration:underline;} 8 | 9 | ul{ list-style:none;} 10 | .main{ clear:both; padding:8px; text-align:left;} 11 | #tabs1{ text-align:left; width:684px;} 12 | .menu1box{ position:relative; overflow:hidden; height:42px; width:800px; text-align:left;} 13 | #menu1{ position:absolute; top:0; left:0; z-index:1;} 14 | #menu1 li{ float:left; display:block; cursor:pointer; text-align:center; line-height:41px; height:41px; border: 1px solid #333; padding-left: 8px; padding-right: 8px;} 15 | #menu1 li.hover{ background:#dff0ff; border-left:2px solid #333; border-top:2px solid #333; border-right:2px solid #333; z-index: 3;} 16 | .main1box{ clear:both; margin-top:-2px; border:2px solid #333; width:796px; background:#dff0ff; text-align:left; padding-top: 10px; padding-bottom:2px; z-index:2;} 17 | .para {text-align:left; width:644px; padding:8px; font-size: 100%} 18 | .para_sub {text-align:center; width:644px; padding:8px;} 19 | .helpbox, .resBox {font-size: 80%;color: #666;border: solid 1px #ccc; background-color: #def;margin-left: 10px;padding: 2px;margin-bottom: 2px; width:400px; border: 1px solid green} 20 | 21 | .para_name {text-align:left; width:500px; padding:4px; display: inline;} 22 | .para_value {text-align:left; width:120px; padding:4px; display: inline;} 23 | 24 | fieldset {border:1px solid green;} 25 | legend{ border: 1px solid green; color: green; padding: 2px;} 26 | table{ font-size:100%;} 27 | 28 | .treenode1{ 29 | background-save: #ddeeff; 30 | font: 12px "Lucida Grande", "Trebuchet MS", Verdana, Helvetica, sans-serif; 31 | color: #000000; 32 | display: block; 33 | list-style-type: none; 34 | margin: 1px; 35 | padding: 1px; 36 | padding-left: 15px; 37 | /*width: 800px;*/ 38 | border:0px solid #9A9A9A; 39 | text-align:left; 40 | } 41 | 42 | .treenode2{ 43 | background-save: #ddeeff; 44 | font: 11px "Lucida Grande", "Trebuchet MS", Verdana, Helvetica, sans-serif; 45 | color: #000000; 46 | display: block; 47 | list-style-type: none; 48 | margin: 0px; 49 | padding: 0px; 50 | padding-left: 30px; 51 | width: 800px; 52 | border: 0px solid #9A9A9A; 53 | text-align:left; 54 | } 55 | 56 | .treenode3{ 57 | background-save: #ddeeff; 58 | font: 11px "Lucida Grande", "Trebuchet MS", Verdana, Helvetica, sans-serif; 59 | color: #000000; 60 | display: block; 61 | list-style-type: none; 62 | margin: 0px; 63 | padding: 0px; 64 | padding-left: 45px; 65 | width: 800px; 66 | border: 0px solid #9A9A9A; 67 | } 68 | -------------------------------------------------------------------------------- /css/main1.css: -------------------------------------------------------------------------------- 1 | body,div,ul,li { margin:0 auto; padding:0; font-size:14px;} 2 | body{ text-align:center; } 3 | a:link{ color:#00F; text-decoration:none;} 4 | a:visited { color: #00F; text-decoration:none;} 5 | a:hover { color: #c00; text-decoration:underline;} 6 | 7 | ul{ list-style:none;} 8 | .main{ clear:both; padding:8px; text-align:left;} 9 | #tabs1{ text-align:left; width:684px;} 10 | .menu1box{ position:relative; overflow:hidden; height:42px; width:800px; text-align:left;} 11 | #menu1{ position:absolute; top:0; left:0; z-index:1;} 12 | #menu1 li{ float:left; display:block; cursor:pointer; text-align:center; line-height:41px; height:41px; border: 1px solid #003871; padding-left: 8px; padding-right: 8px;} 13 | #menu1 li.hover{ background:#dff0ff; border-left:2px solid #003871; border-top:2px solid #003871; border-right:2px solid #003871; z-index: 3;} 14 | .main1box{ clear:both; margin-top:-2px; border:2px solid #333; width:796px; background:#dff0ff; text-align:left; padding-top: 10px; padding-bottom:2px; z-index:2;} 15 | .para {text-align:left; width:644px; padding:8px; font-size: 100%} 16 | .para_sub {text-align:center; width:644px; padding:8px;} 17 | .helpbox, .resBox {font-size: 80%;color: #666;border: solid 1px #ccc; background-color: #def;margin-left: 10px;padding: 2px;margin-bottom: 2px; width:400px; border: 1px solid #003871} 18 | 19 | .para_name {text-align:left; width:500px; padding:4px; display: inline;} 20 | .para_value {text-align:left; width:120px; padding:4px; display: inline;} 21 | 22 | fieldset {border:1px solid #003871;} 23 | legend{ border: 1px solid #003871; color: #003871; padding: 2px;} 24 | table{ font-size:100%;} 25 | 26 | .treenode1{ 27 | background-save: #ddeeff; 28 | font: bold 12px "Lucida Grande", "Trebuchet MS", Verdana, Helvetica, sans-serif; 29 | color: #000000; 30 | display: block; 31 | list-style-type: none; 32 | margin: 1px; 33 | padding: 1px; 34 | padding-left: 20px; 35 | /*width: 800px;*/ 36 | border:1px solid #9A9A9A; 37 | text-align:left; 38 | } 39 | 40 | .treenode2{ 41 | background-save: #ddeeff; 42 | font: bold 11px "Lucida Grande", "Trebuchet MS", Verdana, Helvetica, sans-serif; 43 | color: #000000; 44 | display: block; 45 | list-style-type: none; 46 | margin: 0px; 47 | padding: 0px; 48 | padding-left: 40px; 49 | width: 800px; 50 | border: 0px solid #9A9A9A; 51 | text-align:left; 52 | } 53 | 54 | .treenode3{ 55 | background-save: #ddeeff; 56 | font: bold 11px "Lucida Grande", "Trebuchet MS", Verdana, Helvetica, sans-serif; 57 | color: #000000; 58 | display: block; 59 | list-style-type: none; 60 | margin: 0px; 61 | padding: 0px; 62 | padding-left: 60px; 63 | width: 800px; 64 | border: 0px solid #9A9A9A; 65 | } 66 | -------------------------------------------------------------------------------- /etc/apache2/apache2.conf: -------------------------------------------------------------------------------- 1 | # This is the main Apache server configuration file. It contains the 2 | # configuration directives that give the server its instructions. 3 | # See http://httpd.apache.org/docs/2.4/ for detailed information about 4 | # the directives and /usr/share/doc/apache2/README.Debian about Debian specific 5 | # hints. 6 | # 7 | # 8 | # Summary of how the Apache 2 configuration works in Debian: 9 | # The Apache 2 web server configuration in Debian is quite different to 10 | # upstream's suggested way to configure the web server. This is because Debian's 11 | # default Apache2 installation attempts to make adding and removing modules, 12 | # virtual hosts, and extra configuration directives as flexible as possible, in 13 | # order to make automating the changes and administering the server as easy as 14 | # possible. 15 | 16 | # It is split into several files forming the configuration hierarchy outlined 17 | # below, all located in the /etc/apache2/ directory: 18 | # 19 | # /etc/apache2/ 20 | # |-- apache2.conf 21 | # | `-- ports.conf 22 | # |-- mods-enabled 23 | # | |-- *.load 24 | # | `-- *.conf 25 | # |-- conf-enabled 26 | # | `-- *.conf 27 | # `-- sites-enabled 28 | # `-- *.conf 29 | # 30 | # 31 | # * apache2.conf is the main configuration file (this file). It puts the pieces 32 | # together by including all remaining configuration files when starting up the 33 | # web server. 34 | # 35 | # * ports.conf is always included from the main configuration file. It is 36 | # supposed to determine listening ports for incoming connections which can be 37 | # customized anytime. 38 | # 39 | # * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/ 40 | # directories contain particular configuration snippets which manage modules, 41 | # global configuration fragments, or virtual host configurations, 42 | # respectively. 43 | # 44 | # They are activated by symlinking available configuration files from their 45 | # respective *-available/ counterparts. These should be managed by using our 46 | # helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See 47 | # their respective man pages for detailed information. 48 | # 49 | # * The binary is called apache2. Due to the use of environment variables, in 50 | # the default configuration, apache2 needs to be started/stopped with 51 | # /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not 52 | # work with the default configuration. 53 | 54 | 55 | # Global configuration 56 | # 57 | 58 | # 59 | # ServerRoot: The top of the directory tree under which the server's 60 | # configuration, error, and log files are kept. 61 | # 62 | # NOTE! If you intend to place this on an NFS (or otherwise network) 63 | # mounted filesystem then please read the Mutex documentation (available 64 | # at ); 65 | # you will save yourself a lot of trouble. 66 | # 67 | # Do NOT add a slash at the end of the directory path. 68 | # 69 | #ServerRoot "/etc/apache2" 70 | 71 | # 72 | # The accept serialization lock file MUST BE STORED ON A LOCAL DISK. 73 | # 74 | Mutex file:${APACHE_LOCK_DIR} default 75 | 76 | # 77 | # PidFile: The file in which the server should record its process 78 | # identification number when it starts. 79 | # This needs to be set in /etc/apache2/envvars 80 | # 81 | PidFile ${APACHE_PID_FILE} 82 | 83 | # 84 | # Timeout: The number of seconds before receives and sends time out. 85 | # 86 | Timeout 300 87 | 88 | # 89 | # KeepAlive: Whether or not to allow persistent connections (more than 90 | # one request per connection). Set to "Off" to deactivate. 91 | # 92 | KeepAlive On 93 | 94 | # 95 | # MaxKeepAliveRequests: The maximum number of requests to allow 96 | # during a persistent connection. Set to 0 to allow an unlimited amount. 97 | # We recommend you leave this number high, for maximum performance. 98 | # 99 | MaxKeepAliveRequests 100 100 | 101 | # 102 | # KeepAliveTimeout: Number of seconds to wait for the next request from the 103 | # same client on the same connection. 104 | # 105 | KeepAliveTimeout 5 106 | 107 | 108 | # These need to be set in /etc/apache2/envvars 109 | User ${APACHE_RUN_USER} 110 | Group ${APACHE_RUN_GROUP} 111 | 112 | # 113 | # HostnameLookups: Log the names of clients or just their IP addresses 114 | # e.g., www.apache.org (on) or 204.62.129.132 (off). 115 | # The default is off because it'd be overall better for the net if people 116 | # had to knowingly turn this feature on, since enabling it means that 117 | # each client request will result in AT LEAST one lookup request to the 118 | # nameserver. 119 | # 120 | HostnameLookups Off 121 | 122 | # ErrorLog: The location of the error log file. 123 | # If you do not specify an ErrorLog directive within a 124 | # container, error messages relating to that virtual host will be 125 | # logged here. If you *do* define an error logfile for a 126 | # container, that host's errors will be logged there and not here. 127 | # 128 | ErrorLog ${APACHE_LOG_DIR}/error.log 129 | 130 | # 131 | # LogLevel: Control the severity of messages logged to the error_log. 132 | # Available values: trace8, ..., trace1, debug, info, notice, warn, 133 | # error, crit, alert, emerg. 134 | # It is also possible to configure the log level for particular modules, e.g. 135 | # "LogLevel info ssl:warn" 136 | # 137 | LogLevel warn 138 | 139 | # Include module configuration: 140 | IncludeOptional mods-enabled/*.load 141 | IncludeOptional mods-enabled/*.conf 142 | 143 | # Include list of ports to listen on 144 | Include ports.conf 145 | 146 | 147 | # Sets the default security model of the Apache2 HTTPD server. It does 148 | # not allow access to the root filesystem outside of /usr/share and /var/www. 149 | # The former is used by web applications packaged in Debian, 150 | # the latter may be used for local directories served by the web server. If 151 | # your system is serving content from a sub-directory in /srv you must allow 152 | # access here, or in any related virtual host. 153 | 154 | Options FollowSymLinks 155 | AllowOverride None 156 | Require all denied 157 | 158 | 159 | 160 | AllowOverride None 161 | Require all granted 162 | 163 | 164 | 165 | Options Indexes FollowSymLinks 166 | AllowOverride None 167 | Require all granted 168 | 169 | 170 | 171 | Options Indexes FollowSymLinks Includes ExecCGI 172 | AllowOverride All 173 | Require all granted 174 | 175 | 176 | 177 | AddHandler cgi-script .cgi .pl .py 178 | Options +ExecCGI 179 | 180 | 181 | # 182 | # Options Indexes FollowSymLinks 183 | # AllowOverride None 184 | # Require all granted 185 | # 186 | 187 | 188 | # AccessFileName: The name of the file to look for in each directory 189 | # for additional configuration directives. See also the AllowOverride 190 | # directive. 191 | # 192 | AccessFileName .htaccess 193 | 194 | # 195 | # The following lines prevent .htaccess and .htpasswd files from being 196 | # viewed by Web clients. 197 | # 198 | 199 | Require all denied 200 | 201 | 202 | 203 | # 204 | # The following directives define some format nicknames for use with 205 | # a CustomLog directive. 206 | # 207 | # These deviate from the Common Log Format definitions in that they use %O 208 | # (the actual bytes sent including headers) instead of %b (the size of the 209 | # requested file), because the latter makes it impossible to detect partial 210 | # requests. 211 | # 212 | # Note that the use of %{X-Forwarded-For}i instead of %h is not recommended. 213 | # Use mod_remoteip instead. 214 | # 215 | LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined 216 | LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined 217 | LogFormat "%h %l %u %t \"%r\" %>s %O" common 218 | LogFormat "%{Referer}i -> %U" referer 219 | LogFormat "%{User-agent}i" agent 220 | 221 | # Include of directories ignores editors' and dpkg's backup files, 222 | # see README.Debian for details. 223 | 224 | # Include generic snippets of statements 225 | IncludeOptional conf-enabled/*.conf 226 | 227 | # Include the virtual host configurations: 228 | IncludeOptional sites-enabled/*.conf 229 | 230 | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet 231 | 232 | -------------------------------------------------------------------------------- /etc/apache2/apache2.conf.dist: -------------------------------------------------------------------------------- 1 | # This is the main Apache server configuration file. It contains the 2 | # configuration directives that give the server its instructions. 3 | # See http://httpd.apache.org/docs/2.4/ for detailed information about 4 | # the directives and /usr/share/doc/apache2/README.Debian about Debian specific 5 | # hints. 6 | # 7 | # 8 | # Summary of how the Apache 2 configuration works in Debian: 9 | # The Apache 2 web server configuration in Debian is quite different to 10 | # upstream's suggested way to configure the web server. This is because Debian's 11 | # default Apache2 installation attempts to make adding and removing modules, 12 | # virtual hosts, and extra configuration directives as flexible as possible, in 13 | # order to make automating the changes and administering the server as easy as 14 | # possible. 15 | 16 | # It is split into several files forming the configuration hierarchy outlined 17 | # below, all located in the /etc/apache2/ directory: 18 | # 19 | # /etc/apache2/ 20 | # |-- apache2.conf 21 | # | `-- ports.conf 22 | # |-- mods-enabled 23 | # | |-- *.load 24 | # | `-- *.conf 25 | # |-- conf-enabled 26 | # | `-- *.conf 27 | # `-- sites-enabled 28 | # `-- *.conf 29 | # 30 | # 31 | # * apache2.conf is the main configuration file (this file). It puts the pieces 32 | # together by including all remaining configuration files when starting up the 33 | # web server. 34 | # 35 | # * ports.conf is always included from the main configuration file. It is 36 | # supposed to determine listening ports for incoming connections which can be 37 | # customized anytime. 38 | # 39 | # * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/ 40 | # directories contain particular configuration snippets which manage modules, 41 | # global configuration fragments, or virtual host configurations, 42 | # respectively. 43 | # 44 | # They are activated by symlinking available configuration files from their 45 | # respective *-available/ counterparts. These should be managed by using our 46 | # helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See 47 | # their respective man pages for detailed information. 48 | # 49 | # * The binary is called apache2. Due to the use of environment variables, in 50 | # the default configuration, apache2 needs to be started/stopped with 51 | # /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not 52 | # work with the default configuration. 53 | 54 | 55 | # Global configuration 56 | # 57 | 58 | # 59 | # ServerRoot: The top of the directory tree under which the server's 60 | # configuration, error, and log files are kept. 61 | # 62 | # NOTE! If you intend to place this on an NFS (or otherwise network) 63 | # mounted filesystem then please read the Mutex documentation (available 64 | # at ); 65 | # you will save yourself a lot of trouble. 66 | # 67 | # Do NOT add a slash at the end of the directory path. 68 | # 69 | #ServerRoot "/etc/apache2" 70 | 71 | # 72 | # The accept serialization lock file MUST BE STORED ON A LOCAL DISK. 73 | # 74 | Mutex file:${APACHE_LOCK_DIR} default 75 | 76 | # 77 | # PidFile: The file in which the server should record its process 78 | # identification number when it starts. 79 | # This needs to be set in /etc/apache2/envvars 80 | # 81 | PidFile ${APACHE_PID_FILE} 82 | 83 | # 84 | # Timeout: The number of seconds before receives and sends time out. 85 | # 86 | Timeout 300 87 | 88 | # 89 | # KeepAlive: Whether or not to allow persistent connections (more than 90 | # one request per connection). Set to "Off" to deactivate. 91 | # 92 | KeepAlive On 93 | 94 | # 95 | # MaxKeepAliveRequests: The maximum number of requests to allow 96 | # during a persistent connection. Set to 0 to allow an unlimited amount. 97 | # We recommend you leave this number high, for maximum performance. 98 | # 99 | MaxKeepAliveRequests 100 100 | 101 | # 102 | # KeepAliveTimeout: Number of seconds to wait for the next request from the 103 | # same client on the same connection. 104 | # 105 | KeepAliveTimeout 5 106 | 107 | 108 | # These need to be set in /etc/apache2/envvars 109 | User ${APACHE_RUN_USER} 110 | Group ${APACHE_RUN_GROUP} 111 | 112 | # 113 | # HostnameLookups: Log the names of clients or just their IP addresses 114 | # e.g., www.apache.org (on) or 204.62.129.132 (off). 115 | # The default is off because it'd be overall better for the net if people 116 | # had to knowingly turn this feature on, since enabling it means that 117 | # each client request will result in AT LEAST one lookup request to the 118 | # nameserver. 119 | # 120 | HostnameLookups Off 121 | 122 | # ErrorLog: The location of the error log file. 123 | # If you do not specify an ErrorLog directive within a 124 | # container, error messages relating to that virtual host will be 125 | # logged here. If you *do* define an error logfile for a 126 | # container, that host's errors will be logged there and not here. 127 | # 128 | ErrorLog ${APACHE_LOG_DIR}/error.log 129 | 130 | # 131 | # LogLevel: Control the severity of messages logged to the error_log. 132 | # Available values: trace8, ..., trace1, debug, info, notice, warn, 133 | # error, crit, alert, emerg. 134 | # It is also possible to configure the log level for particular modules, e.g. 135 | # "LogLevel info ssl:warn" 136 | # 137 | LogLevel warn 138 | 139 | # Include module configuration: 140 | IncludeOptional mods-enabled/*.load 141 | IncludeOptional mods-enabled/*.conf 142 | 143 | # Include list of ports to listen on 144 | Include ports.conf 145 | 146 | 147 | # Sets the default security model of the Apache2 HTTPD server. It does 148 | # not allow access to the root filesystem outside of /usr/share and /var/www. 149 | # The former is used by web applications packaged in Debian, 150 | # the latter may be used for local directories served by the web server. If 151 | # your system is serving content from a sub-directory in /srv you must allow 152 | # access here, or in any related virtual host. 153 | 154 | Options FollowSymLinks 155 | AllowOverride None 156 | Require all denied 157 | 158 | 159 | 160 | AllowOverride None 161 | Require all granted 162 | 163 | 164 | 165 | Options Indexes FollowSymLinks 166 | AllowOverride None 167 | Require all granted 168 | 169 | 170 | # 171 | # Options Indexes FollowSymLinks 172 | # AllowOverride None 173 | # Require all granted 174 | # 175 | 176 | 177 | 178 | 179 | # AccessFileName: The name of the file to look for in each directory 180 | # for additional configuration directives. See also the AllowOverride 181 | # directive. 182 | # 183 | AccessFileName .htaccess 184 | 185 | # 186 | # The following lines prevent .htaccess and .htpasswd files from being 187 | # viewed by Web clients. 188 | # 189 | 190 | Require all denied 191 | 192 | 193 | 194 | # 195 | # The following directives define some format nicknames for use with 196 | # a CustomLog directive. 197 | # 198 | # These deviate from the Common Log Format definitions in that they use %O 199 | # (the actual bytes sent including headers) instead of %b (the size of the 200 | # requested file), because the latter makes it impossible to detect partial 201 | # requests. 202 | # 203 | # Note that the use of %{X-Forwarded-For}i instead of %h is not recommended. 204 | # Use mod_remoteip instead. 205 | # 206 | LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined 207 | LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined 208 | LogFormat "%h %l %u %t \"%r\" %>s %O" common 209 | LogFormat "%{Referer}i -> %U" referer 210 | LogFormat "%{User-agent}i" agent 211 | 212 | # Include of directories ignores editors' and dpkg's backup files, 213 | # see README.Debian for details. 214 | 215 | # Include generic snippets of statements 216 | IncludeOptional conf-enabled/*.conf 217 | 218 | # Include the virtual host configurations: 219 | IncludeOptional sites-enabled/*.conf 220 | 221 | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet 222 | -------------------------------------------------------------------------------- /etc/apache2/sites-available/000-default.conf: -------------------------------------------------------------------------------- 1 | 2 | # The ServerName directive sets the request scheme, hostname and port that 3 | # the server uses to identify itself. This is used when creating 4 | # redirection URLs. In the context of virtual hosts, the ServerName 5 | # specifies what hostname must appear in the request's Host: header to 6 | # match this virtual host. For the default virtual host (this file) this 7 | # value is not decisive as it is used as a last resort host regardless. 8 | # However, you must set it for any further virtual host explicitly. 9 | #ServerName www.example.com 10 | 11 | ServerAdmin webmaster@localhost 12 | DocumentRoot /opt/www 13 | AddHandler cgi-script .cgi .pl 14 | 15 | # 16 | # Options FollowSymLinks 17 | # AllowOverride None 18 | # 19 | 20 | 21 | Options ExecCGI 22 | 23 | 24 | # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, 25 | # error, crit, alert, emerg. 26 | # It is also possible to configure the loglevel for particular 27 | # modules, e.g. 28 | #LogLevel info ssl:warn 29 | 30 | ErrorLog ${APACHE_LOG_DIR}/error.log 31 | CustomLog ${APACHE_LOG_DIR}/access.log combined 32 | 33 | # For most configuration files from conf-available/, which are 34 | # enabled or disabled at a global level, it is possible to 35 | # include a line for only one particular virtual host. For example the 36 | # following line enables the CGI configuration for this host only 37 | # after it has been globally disabled with "a2disconf". 38 | #Include conf-available/serve-cgi-bin.conf 39 | 40 | 41 | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet 42 | -------------------------------------------------------------------------------- /etc/apache2/sites-available/000-default.conf.dist: -------------------------------------------------------------------------------- 1 | 2 | # The ServerName directive sets the request scheme, hostname and port that 3 | # the server uses to identify itself. This is used when creating 4 | # redirection URLs. In the context of virtual hosts, the ServerName 5 | # specifies what hostname must appear in the request's Host: header to 6 | # match this virtual host. For the default virtual host (this file) this 7 | # value is not decisive as it is used as a last resort host regardless. 8 | # However, you must set it for any further virtual host explicitly. 9 | #ServerName www.example.com 10 | 11 | ServerAdmin webmaster@localhost 12 | DocumentRoot /var/www/html 13 | 14 | # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, 15 | # error, crit, alert, emerg. 16 | # It is also possible to configure the loglevel for particular 17 | # modules, e.g. 18 | #LogLevel info ssl:warn 19 | 20 | ErrorLog ${APACHE_LOG_DIR}/error.log 21 | CustomLog ${APACHE_LOG_DIR}/access.log combined 22 | 23 | # For most configuration files from conf-available/, which are 24 | # enabled or disabled at a global level, it is possible to 25 | # include a line for only one particular virtual host. For example the 26 | # following line enables the CGI configuration for this host only 27 | # after it has been globally disabled with "a2disconf". 28 | #Include conf-available/serve-cgi-bin.conf 29 | 30 | 31 | # vim: syntax=apache ts=4 sw=4 sts=4 sr noet 32 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /js/util.js: -------------------------------------------------------------------------------- 1 | function toggle(input){ 2 | var x = document.getElementById(input); 3 | if (x.style.display == "none"){ 4 | x.style.display = "block"; 5 | } else { 6 | x.style.display = "none"; 7 | } 8 | } 9 | function openwin(){ 10 | window.open("example.htm","newwindow"); 11 | } 12 | function load() 13 | { 14 | document.forms[0].reset(); 15 | SetIden(); 16 | } 17 | function SetIden() { 18 | var Current = document.forms[0].elements["level"].selectedIndex; 19 | for (var i=0; i<= Current; i++){ 20 | document.forms[0].elements["lc"+(i+1)].disabled=false; 21 | document.forms[0].elements["y"+(i+1)].checked=true; 22 | } 23 | for (var i=Current+1; i<= 2; i++){ 24 | document.forms[0].elements["lc"+(i+1)].disabled=true; 25 | document.forms[0].elements["y"+(i+1)].checked=false; 26 | } 27 | } 28 | 29 | 30 | 31 | function hideShow(ident) { 32 | if (document.getElementById(ident).style.display=='none') { 33 | document.getElementById(ident).style.display=''; 34 | document.images["i" + ident].src = "../css/images/minus.png"; 35 | } 36 | else { 37 | document.getElementById(ident).style.display='none'; 38 | document.images["i" + ident].src = "../css/images/plus.png"; 39 | } 40 | } 41 | 42 | function change_checkbox(mode, target_form, input_name) { 43 | var tform = document.famform; 44 | for (j=0; j