Polyphobius.pl

From Bioinformatikpedia

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">

  1. !/usr/bin/perl -w
  2. run polyphobius
  3. 1, get all homologous sequence with blastget
  4. 2, insert query sequence at the beginning of the sequence set
  5. 3, run kalign to generate multiple sequence alignment
  6. 4, run polyphobius at last
  7. 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 ';

  1. 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"; }

  1. prepare output directory

if (! -d $odir) { mkdir $odir }

print "Run blastget ...\n";

  1. 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";

  1. run kalign

my $msafile="$odir/$basename-kalign.msa"; system("$kalign $outfile > $msafile 2> /dev/null");

print "Run polyphobius ...\n";

  1. run polyphobius

my $phobiusfile = "$odir/$basename-phobius.txt"; system("$polyphobius $msafile > $phobiusfile 2> /dev/null");

print "Done!\n"; </source>