Parsing "PCR_primers" tag from GenBank file

Horacio Montenegro <[email protected]>
Newsgroups gmane.comp.lang.perl.bio.general
Message-ID <CACEPbkMvszSoh07zZeP0k4T2j+9Vpt48d60CsA_7Wpr365B-vA@mail.gmail.com>
    hi,

    I am trying to parse a GenBank file to extract primers and other
info, outputting it separated with tabs. However, some records have
two "PCR_primers" tags, and they are not being separated. The
"satellite" tag also is doubled, but each one is being correctly
separated with tabs. How can I manage to output each primer pair
separated?

    thanks, Horacio

    One example of a record with two "PCR_primers" tags is Accession
GQ344853, GI 282937571. Bellow is the code snippet to reproduce the
behaviour:

#!/usr/bin/env perl
use Bio::DB::EUtilities;
use Bio::SeqIO;
my $seqio_object = Bio::SeqIO->new(-file => 'GQ344853.gb' );
while (my $seq = $seqio_object->next_seq) {
    print $seq->primary_id, "\t", $seq->length, "\t";
    for my $feat_object ($seq->get_SeqFeatures) {
        print $feat_object->get_tag_values("satellite"), "\t" if
($feat_object->has_tag("satellite"));
        print $feat_object->get_tag_values("PCR_primers"), "\t" if
($feat_object->has_tag('PCR_primers'));
    }
    print "\n";
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.