tariq_shafi75 at hotmail.com
Sat Jun 5 10:10:43 EDT 2004
I am trying to submit a sequence in Perl to a pfam flat file database and
get a classification for the family that a peptide sequence belongs to, and
analysis of its domains.
I am thus using the Bio::AlignIO::Pfam module in Perl but all examples I can
find is taking input from a file. I want to (dynamically) create a Bio::Seq
object and use that as an argument in Bio::AlignIO::Pfam and get output as I
would do as if I submitted the sequence in the Pfam database website.
I am using CGI and dynamic web pages and want to avoid creating new files
when a Pfam alignment is requested as that will be a little messy and
expensive on memory.
The relevant chunk of my code so far for this is as below:
use CGI qw(:standard);
# Using a statement handle in Perl DBI
print b("PAD ID: "), b($id), p(), b("Swiss-Prot ID: "), $swissProtId,br(),
# Creating Bio::Seq object
$seq = Bio::Seq->new(-seq => $sequence,
-desc => $swissProtId,
-id => $id
print b("Pfam classification:"), p();
# This is the problem area
# I don't want files involved here. Instead of file and format I simply want
the argument to be a
# Bio::Seq object
$in = Bio::AlignIO->new(
'-file' => $ARGV,
'-format' => 'stockholm' );
# Here I don't want files involved either. I want $out to be something
different but have nothing
# to do with a file.
$out = Bio::AlignIO->new(
'-file' => ">$ARGV",
'-format' => 'pfam');
$align = $in->next_aln();
It's fast, it's easy and it's free. Get MSN Messenger today!
More information about the Bioperl-l