[Bioperl-l] reading multiple swissprot records from a single file

Brian Osborne brian_osborne at cognia.com
Wed Jan 5 16:07:28 EST 2005


Kenny,

It would be something like:

use strict;
use Bio::SeqIO;

my $seqio = Bio::SeqIO->(-file => "sprot42.dat", -format => "swiss");

while (my $seqobj = $seqio->next_seq) {
	# you now have a Sequence object, you can check its features
}

This would be the "standard" way. Yes, SeqIO understands a file handle as
well but there's no need to do it that way, I don't think.

Brian O.

-----Original Message-----
From: bioperl-l-bounces at portal.open-bio.org
[mailto:bioperl-l-bounces at portal.open-bio.org]On Behalf Of Daily,
Kenneth Michael
Sent: Wednesday, January 05, 2005 3:49 PM
To: bioperl-l at portal.open-bio.org
Subject: [Bioperl-l] reading multiple swissprot records from a single
file


I'm having trouble using bioperl to parse a file with multiple (thousands)
of swissprot records in them. Is there a way to do this with SeqIO and such?
The way I understand it, if I use a filehandle to read in the data, it still
is expecting only one record in the file. Can I use a FH to read in a
record, which ends with //, then put this variable into a SeqIO object to
manpulate it? I need to look at each record and decide if I want to keep it
based on the features it has. I have a program using standard parsing
techniques but want to do this with bioperl if possible. Thanks for any
help.

Kenny Daily
IU School of Informatics
kmdaily at indiana dot edu


_______________________________________________
Bioperl-l mailing list
Bioperl-l at portal.open-bio.org
http://portal.open-bio.org/mailman/listinfo/bioperl-l





More information about the Bioperl-l mailing list