Polyphobius.pl
This Perl script automatically generate input data for Polyphobius from given query sequence and call Polyphobius for prediction of transmembrane helices.
Usage
polyphobius.pl [-d db=uniprot_sprot] [-i index=uniprot_sprot.idx] -q query -o output_dir
Parameters
- -d path to blast database. (Default: uniprot_sprot on student server)
- -i path to index file of blast database. (Default: index for uniprot_sprot on student server)
- -q path to query sequence file
- -o output directory for all generated intermediate and result data
Code
<source lang="perl">
- !/usr/bin/perl -w
- run polyphobius
- 1, get all homologous sequence with blastget
- 2, insert query sequence at the beginning of the sequence set
- 3, run kalign to generate multiple sequence alignment
- 4, run polyphobius at last
- usage: polyphobius [-d db=uniprot_sprot] [-i index=uniprot_sprot.idx] -q query -o output_dir
use strict; use File::Basename; use constant DATABASE => '/mnt/project/pracstrucfunc13/data/swissprot/uniprot_sprot';
use constant INDEX => '/mnt/project/pracstrucfunc13/data/index_pp/uniprot_sprot.idx';
my $blastget = '/mnt/project/pracstrucfunc13/polyphobius/blastget'; my $kalign = 'kalign'; my $polyphobius = '/mnt/project/pracstrucfunc13/polyphobius/jphobius -poly ';
- parse command-line arguments
my ($db, $q, $odir, $index); while ( (my $param = shift @ARGV) ) { if ($param eq '-d') { $db = shift @ARGV; }
if ($param eq '-i') { $index = shift @ARGV; }
if ($param eq '-q') { $q = shift @ARGV; }
if ($param eq '-o') { $odir = shift @ARGV; } }
if (!$db) { $db = DATABASE; $index = INDEX; }
if (!$index) { $index = INDEX; }
if (! $q or ! $odir) { die "Usage: polyphobius [-d db=uniprot_sprot] [-i index=uniprot_sprot.idx] \\ -q query -o output_dir\n"; }
- prepare output directory
if (! -d $odir) { mkdir $odir }
print "Run blastget ...\n";
- run blastget
my $basename = &basename($q); my $outfile = "$odir/$basename-blast.fasta"; system("cat $q > $outfile"); system("$blastget -d $db -i $index $q >> $outfile 2> /dev/null");
print "Run kalign ...\n";
- run kalign
my $msafile="$odir/$basename-kalign.msa"; system("$kalign $outfile > $msafile 2> /dev/null");
print "Run polyphobius ...\n";
- run polyphobius
my $phobiusfile = "$odir/$basename-phobius.txt"; system("$polyphobius $msafile > $phobiusfile 2> /dev/null");
print "Done!\n"; </source>