#!/usr/bin/perl # memsat.cgi - a CGI wrapper for running the transmembrane predictor memsat # Copyright (C) 1999, Humberto Ortiz Zuazaga. # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. use Neuroseq; use CGI qw(:standard); # Full path to program $program = '/usr/local/bin/memsat'; # Full path to fmtseq sequence formatter. $fmtseq = '/usr/local/bin/fmtseq'; print Neuroseq::title('MEMSAT - MEMbrane protein Structure And Topology.'), 'Calls memsat to generate transmembrane sequence predictions in a amino acid sequence. Commercial use of memsat requires a commercial licence from the author (d.jones@cs.ucl.ac.uk)', p, hr, start_form, 'Enter a single amino acid sequence in any seqio format:', p, textarea(-name=>'sequence', -default=>'', -rows=>10, -columns=>40), p, submit, reset, defaults('Clear'), end_form, hr; if (param()) { $|=1; # need this to keep program output in place my $sequence = param('sequence'); my $tmpdir = Neuroseq::mktmpdir("/tmp/memsat"); chdir $tmpdir or die "error changing to $tmpdir: $!"; my $filename = "sequence"; open (SEQ, ">$filename"); print SEQ $sequence, "\n"; close SEQ; system("$fmtseq -format=fasta-old -output=fasta -CASEUPPER $filename"); system("MEMSAT_DIR=/usr/local/memsat $program fasta > stdout"); Neuroseq::printfile("stdout"); chdir; Neuroseq::nukedir($tmpdir); } print Neuroseq::footer('2001.12.05');