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

Annotation of /FigWebServices/scopmap_service.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (view) (download)

1 : olson 1.4 #
2 :     # Copyright (c) 2003-2006 University of Chicago and Fellowship
3 :     # for Interpretations of Genomes. All Rights Reserved.
4 :     #
5 :     # This file is part of the SEED Toolkit.
6 :     #
7 :     # The SEED Toolkit is free software. You can redistribute
8 :     # it and/or modify it under the terms of the SEED Toolkit
9 :     # Public License.
10 :     #
11 :     # You should have received a copy of the SEED Toolkit Public License
12 :     # along with this program; if not write to the University of Chicago
13 :     # at info@ci.uchicago.edu or the Fellowship for Interpretation of
14 :     # Genomes at veronika@thefig.info or download a copy from
15 :     # http://www.theseed.org/LICENSE.TXT.
16 :     #
17 :    
18 : mkubal 1.1 use FIG;
19 :     use CGI;
20 :     use Net::SMTP;
21 :     use File::Temp;
22 :     my $cgi = new CGI;
23 :    
24 :     $ENV{PGPORT} = "10000";
25 :     $ENV{BLASTMAT} ="/disks/space0/fig/FIGdisk.Nov20/BLASTMAT";
26 :     $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}";
27 :    
28 :     print "Content-type: text/html\r\n\r\n";
29 :     print "<HTML>\n";
30 :     print "<HEAD><TITLE>Structural Classification Tool!</TITLE></HEAD>\n";
31 :     print "<BODY>\n";
32 :     my @params = $cgi-> param();
33 :     if($cgi->param('seq') && $cgi->param('email')){
34 :     my $seq = $cgi->param('seq');
35 :     my $email = $cgi->param('email');
36 :     my $subject = $cgi->param('subject');
37 :     ($fh, $filename) = mkstemp("/disks/space0/fig/Tmp/tmpfileXXXXX");
38 : mkubal 1.2 `chmod 777 $filename`;
39 :    
40 : mkubal 1.1 #my $seq = "MKITVLGCGALGQLWLTALCKQGHEVQGWLRVPQPYCSVNLVETDGSIFNESLTANDPDFLATSDLLLVTLKAWQVSDAVKSLASTLPVTTPILLIHNGMGTIEELQNIQQPLLMGTTTHAARRDGNVIIHVANGITHIGPARQQDGDYSYLADILQTVLPDVAWHNNIRAELWRKLAVNCVINPLTAIWNCPNGELRHHPQEIMQICEEVAAVIEREGHHTSAEDLRDYVMQVIDATAENISSMLQDIRALRHTEIDYINGFLLRRARAHGIAVPENTRLFEMVKRKESEYERIGTGLPRPW";
41 : mkubal 1.3
42 : mkubal 1.1 if (-e "1234_A.fa"){ system "rm 1234_A.fa";}
43 : mkubal 1.2
44 :     $seq =~ s/\n//g;
45 :     $seq =~ s/\s//g;
46 : mkubal 1.3
47 : mkubal 1.1 system "python /disks/space0/fig/Tmp/seq2pdb.py $seq $filename";
48 :     system "perl /disks/space0/fig/Tmp/launcher.pl $filename $email $subject";
49 : mkubal 1.3 print "The results will be sent to $email\n";
50 : mkubal 1.2
51 : mkubal 1.1
52 :     } else {
53 : mkubal 1.3 print "<H2>SCOPmap Service</H2>\n";
54 :     print "<H5><a href='http://www.biomedcentral.com/1471-2105/5/197'>research article on SCOPmap</a></H5>\n";
55 :     print "<H5>special thanks to Yuan Qi, Sara Cheek and Nick Grishin for the SCOPmap program and their support</H5>\n";
56 :    
57 : mkubal 1.2 print "<FORM method='POST' action='scopmap_service.cgi'>
58 : mkubal 1.1 <h3>Enter email address:</h3>
59 :     <p><INPUT type='text' name='email'></p>
60 :     <h3>Enter sequence identifier (protein name, id, etc ...):</h3>
61 :     <p><INPUT type='text' name='subject'></p>
62 :     <h3>Enter protein sequence:</h3>
63 : mkubal 1.2 <p><TEXTAREA rows='20' cols='100' name='seq'> </TEXTAREA></p>
64 : mkubal 1.1 <p><INPUT type='submit' value='Launch SCOPmap'></p>
65 :     <h3>Reset this Form</h3>
66 :     <p><INPUT type='reset' value='Clear all my input now'></p>
67 :     </FORM>\n";
68 :     }
69 :    
70 :     print "</BODY>\n";
71 :     print "</HTML>\n";
72 :    

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3