commit/galaxy-central: dan: Allow VCF parser to accept unknown values for QUAL field.
1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/f530dbdde1f5/ changeset: f530dbdde1f5 branches: user: dan date: 2011-06-01 17:29:07 summary: Allow VCF parser to accept unknown values for QUAL field. affected #: 1 file (139 bytes) --- a/lib/galaxy_utils/sequence/vcf.py Tue May 31 12:03:52 2011 -0400 +++ b/lib/galaxy_utils/sequence/vcf.py Wed Jun 01 11:29:07 2011 -0400 @@ -2,6 +2,8 @@ #See: http://1000genomes.org/wiki/doku.php?id=1000_genomes:analysis:vcf3.3 #See: http://1000genomes.org/wiki/doku.php?id=1000_genomes:analysis:variant_call_f... +NOT_A_NUMBER = float( 'NaN ') + class VariantCall( object ): version = None header_startswith = None @@ -40,7 +42,10 @@ self.chrom, self.pos, self.id, self.ref, self.alt, self.qual, self.filter, self.info = self.fields[ :self.required_header_length ] self.pos = int( self.pos ) self.alt = self.alt.split( ',' ) - self.qual = float( self.qual ) + try: + self.qual = float( self.qual ) + except: + self.qual = NOT_A_NUMBER #Missing data can be denoted as a '.' if len( self.fields ) > self.required_header_length: self.format = self.fields[ self.required_header_length ].split( ':' ) for sample_value in self.fields[ self.required_header_length + 1: ]: Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket