[Bio] / FigWebServices / scopmap_service.cgi Repository:
ViewVC logotype

Annotation of /FigWebServices/scopmap_service.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (view) (download)

1 : mkubal 1.1 use FIG;
2 :     use CGI;
3 :     use Net::SMTP;
4 :     use File::Temp;
5 :     my $cgi = new CGI;
6 :    
7 :     $ENV{PGPORT} = "10000";
8 :     $ENV{BLASTMAT} ="/disks/space0/fig/FIGdisk.Nov20/BLASTMAT";
9 :     $ENV{PATH}="/disks/space0/fig/FIGdisk.Nov20/env/linux-postgres/bin:/disks/space0/fig/FIGdisk.Nov20/FIG/bin:/disks/space0/fig/FIGdisk.Nov20/bin:/bin:/usr/bin:/usr/local/bin:/opt/bin:/usr/i386-pc-linux-gnu/gcc-bin/3.3.5:/opt/Acrobat5:/usr/X11R6/bin:/opt/blackdown-jdk-1.4.2.01/bin:/opt/blackdown-jdk-1.4.2.01/jre/bin:/usr/qt/3/bin:/usr/kde/3.3/bin:/usr/kde/3.2/bin:/home.old/yqi/prog/ncbi/build:/home.old/yqi/prj_scopmap/bin:/home.old/yqi/prj_scopmap/db/fasta:/home.old/yqi/prj_scopmap/prog/ncbi/data:/disks/space0/fig/FIGdisk.Nov20/BLASTMAT:$ENV{PATH}";
10 :    
11 :     print "Content-type: text/html\r\n\r\n";
12 :     print "<HTML>\n";
13 :     print "<HEAD><TITLE>Structural Classification Tool!</TITLE></HEAD>\n";
14 :     print "<BODY>\n";
15 :     print "<H2>SCOPmap Service</H2>\n";
16 :     print "<H5><a href='http://www.biomedcentral.com/1471-2105/5/197'>research article on SCOPmap</a></H5>\n";
17 :     print "<H5>special thanks to Yuan Qi, Sara Cheek and Nick Grishin for the SCOPmap program and their support</H5>\n";
18 :     my @params = $cgi-> param();
19 :     if($cgi->param('seq') && $cgi->param('email')){
20 :     my $seq = $cgi->param('seq');
21 :     my $email = $cgi->param('email');
22 :     my $subject = $cgi->param('subject');
23 :     ($fh, $filename) = mkstemp("/disks/space0/fig/Tmp/tmpfileXXXXX");
24 : mkubal 1.2 `chmod 777 $filename`;
25 :    
26 : mkubal 1.1 #my $seq = "MKITVLGCGALGQLWLTALCKQGHEVQGWLRVPQPYCSVNLVETDGSIFNESLTANDPDFLATSDLLLVTLKAWQVSDAVKSLASTLPVTTPILLIHNGMGTIEELQNIQQPLLMGTTTHAARRDGNVIIHVANGITHIGPARQQDGDYSYLADILQTVLPDVAWHNNIRAELWRKLAVNCVINPLTAIWNCPNGELRHHPQEIMQICEEVAAVIEREGHHTSAEDLRDYVMQVIDATAENISSMLQDIRALRHTEIDYINGFLLRRARAHGIAVPENTRLFEMVKRKESEYERIGTGLPRPW";
27 :     if (-e "1234_A.fa"){ system "rm 1234_A.fa";}
28 : mkubal 1.2
29 :     $seq =~ s/\n//g;
30 :     $seq =~ s/\s//g;
31 :     print "The results will be sent to $email\n";
32 : mkubal 1.1 system "python /disks/space0/fig/Tmp/seq2pdb.py $seq $filename";
33 :     system "perl /disks/space0/fig/Tmp/launcher.pl $filename $email $subject";
34 : mkubal 1.2
35 : mkubal 1.1
36 :     } else {
37 : mkubal 1.2 print "<FORM method='POST' action='scopmap_service.cgi'>
38 : mkubal 1.1 <h3>Enter email address:</h3>
39 :     <p><INPUT type='text' name='email'></p>
40 :     <h3>Enter sequence identifier (protein name, id, etc ...):</h3>
41 :     <p><INPUT type='text' name='subject'></p>
42 :     <h3>Enter protein sequence:</h3>
43 : mkubal 1.2 <p><TEXTAREA rows='20' cols='100' name='seq'> </TEXTAREA></p>
44 : mkubal 1.1 <p><INPUT type='submit' value='Launch SCOPmap'></p>
45 :     <h3>Reset this Form</h3>
46 :     <p><INPUT type='reset' value='Clear all my input now'></p>
47 :     </FORM>\n";
48 :     }
49 :    
50 :     print "</BODY>\n";
51 :     print "</HTML>\n";
52 :    

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3