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

Annotation of /FigWebServices/scopmap_service.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (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 :     my @params = $cgi-> param();
16 :     if($cgi->param('seq') && $cgi->param('email')){
17 :     my $seq = $cgi->param('seq');
18 :     my $email = $cgi->param('email');
19 :     my $subject = $cgi->param('subject');
20 :     ($fh, $filename) = mkstemp("/disks/space0/fig/Tmp/tmpfileXXXXX");
21 : mkubal 1.2 `chmod 777 $filename`;
22 :    
23 : mkubal 1.1 #my $seq = "MKITVLGCGALGQLWLTALCKQGHEVQGWLRVPQPYCSVNLVETDGSIFNESLTANDPDFLATSDLLLVTLKAWQVSDAVKSLASTLPVTTPILLIHNGMGTIEELQNIQQPLLMGTTTHAARRDGNVIIHVANGITHIGPARQQDGDYSYLADILQTVLPDVAWHNNIRAELWRKLAVNCVINPLTAIWNCPNGELRHHPQEIMQICEEVAAVIEREGHHTSAEDLRDYVMQVIDATAENISSMLQDIRALRHTEIDYINGFLLRRARAHGIAVPENTRLFEMVKRKESEYERIGTGLPRPW";
24 : mkubal 1.3
25 : mkubal 1.1 if (-e "1234_A.fa"){ system "rm 1234_A.fa";}
26 : mkubal 1.2
27 :     $seq =~ s/\n//g;
28 :     $seq =~ s/\s//g;
29 : mkubal 1.3
30 : mkubal 1.1 system "python /disks/space0/fig/Tmp/seq2pdb.py $seq $filename";
31 :     system "perl /disks/space0/fig/Tmp/launcher.pl $filename $email $subject";
32 : mkubal 1.3 print "The results will be sent to $email\n";
33 : mkubal 1.2
34 : mkubal 1.1
35 :     } else {
36 : mkubal 1.3 print "<H2>SCOPmap Service</H2>\n";
37 :     print "<H5><a href='http://www.biomedcentral.com/1471-2105/5/197'>research article on SCOPmap</a></H5>\n";
38 :     print "<H5>special thanks to Yuan Qi, Sara Cheek and Nick Grishin for the SCOPmap program and their support</H5>\n";
39 :    
40 : mkubal 1.2 print "<FORM method='POST' action='scopmap_service.cgi'>
41 : mkubal 1.1 <h3>Enter email address:</h3>
42 :     <p><INPUT type='text' name='email'></p>
43 :     <h3>Enter sequence identifier (protein name, id, etc ...):</h3>
44 :     <p><INPUT type='text' name='subject'></p>
45 :     <h3>Enter protein sequence:</h3>
46 : mkubal 1.2 <p><TEXTAREA rows='20' cols='100' name='seq'> </TEXTAREA></p>
47 : mkubal 1.1 <p><INPUT type='submit' value='Launch SCOPmap'></p>
48 :     <h3>Reset this Form</h3>
49 :     <p><INPUT type='reset' value='Clear all my input now'></p>
50 :     </FORM>\n";
51 :     }
52 :    
53 :     print "</BODY>\n";
54 :     print "</HTML>\n";
55 :    

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3