[Bioperl-l] ClusterIO Parsing of dbSNP: Possible bug
Allen Day
allenday at ucla.edu
Mon Aug 11 21:22:28 EDT 2003
Hi Johnny,
Yes, there were a few bugs in the parser, it's properly handling the
NSE-FxnSet tagset now. You'll need to use the latest CVS version to get
the fix.
-Allen
On Sun, 10 Aug 2003, Johnny Amos wrote:
> Hello,
>
> I seem to have run into a bug in the ClusterIO parsing of dbSNP. The
> functional_class() hash-element does not appear to be filled. I suspect
> this occurs because the corresponding XML field
> (NSE-FxnSet_fxn-class-contig) is enumerated. That is, it has the form:
> <NSE-FxnSet_fxn-class-contig value="intron"/>
>
> >From my review of Bio::ClusterIO::dbsnp.pm it appears that enumerated tags
> are not handled correctly. The following script should return the
> functional class for SNPs:
>
> ### BEGIN SCRIPT
> use strict;
> use Bio::ClusterIO;
>
> my $parser = Bio::ClusterIO->new(
> -file => $infile,
> -format => 'dbSNP'
> );
>
> while (my $record = $parser->next_cluster()) {
>
> if (my $class = $record->functional_class) {
> $class =~ s/^\s+//;
> $class =~ s/\s+$//;
>
> if ($class) { print "$class\n"; }
>
> }
>
> }
> ### END SCRIPT
>
> I have tested this on several chromosomes, with the same results in each
> case. Can anyone confirm this behaviour, or see a problem with my code?
>
> Johnny
>
> _________________________________________________________________
> Help STOP SPAM with the new MSN 8 and get 2 months FREE*
> http://join.msn.com/?page=features/junkmail
>
> _______________________________________________
> 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