[Bioperl-l] ClusterIO Parsing of dbSNP: Possible bug

Johnny Amos quickster333 at hotmail.com
Sun Aug 10 19:29:31 EDT 2003


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



More information about the Bioperl-l mailing list