[Bioperl-l] get_Seq_by_id: CONTIG found

Aerts, Jan Jan.Aerts at wur.nl
Tue Feb 17 09:42:03 EST 2004


Hi all,

I'm trying to download a bunch of sequences from GenBank using the ID and get_Seq_by_id (see script below). This method works great, except when it hits a sequence that in fact is a scaffold (e.g. http://www.ncbi.nlm.nih.gov/entrez/viewer.fcgi?db=nucleotide&val=38322681). The message I get is:
<BEGIN MESSAGE>
-------------------- WARNING ---------------------
MSG: CONTIG found. GenBank get_Stream_by_acc about to run.
---------------------------------------------------
Warning: unable to close filehandle FETCH properly.
<END MESSAGE>

Is there a way to test if the ID refers to an ID refers to a contig instead of a 'regular' sequence?

Thanks a lot,
Jan Aerts

<BEGIN EXAMPLE CODE>
use Bio::DB::GenBank;

my @ids = (38524490,31745019,38322681);
my $db = Bio::DB::GenBank->new();
foreach ( @ids ) {
  my $seq = $db->get_Seq_by_id($_);
  print ">", $seq->accession, '|', $seq->description, '|', $seq->keywords, "\n";
}
<END EXAMPLE CODE>



More information about the Bioperl-l mailing list