patch for vcf QUAL field with missing value "." in lib/galaxy/visualization/tracks/data_providers.py
The VCF format ( http://www.1000genomes.org/wiki/Analysis/Variant%20Call%20Format/vcf-variant... ) specifies "." to represent missing values. lib/galaxy/visualization/tracks/data_providers.py throws an float conversion error when the qual field of a vcf file has the missing value: "." This can be remedied with the following patch, trackster handles the "None" value when displaying the variant. diff -r eb542e228a0f lib/galaxy/visualization/tracks/data_providers.py --- a/lib/galaxy/visualization/tracks/data_providers.py Wed Aug 22 14:56:49 2012 -0500 +++ b/lib/galaxy/visualization/tracks/data_providers.py Wed Aug 22 14:58:46 2012 -0500 @@ -634,7 +634,7 @@ # TODO? VCF does not have strand, so default to positive. "+", new_seq, - float( feature[5] ) ] + None if feature[5] == '.' else float( feature[5] ) ] rval.append(payload) return { 'data': rval, 'message': message }
Committed in -central changeset 146d0f4c29de Thanks much Jim, J. On Aug 22, 2012, at 4:09 PM, Jim Johnson wrote:
The VCF format ( http://www.1000genomes.org/wiki/Analysis/Variant%20Call%20Format/vcf-variant... ) specifies "." to represent missing values.
lib/galaxy/visualization/tracks/data_providers.py throws an float conversion error when the qual field of a vcf file has the missing value: "."
This can be remedied with the following patch, trackster handles the "None" value when displaying the variant.
diff -r eb542e228a0f lib/galaxy/visualization/tracks/data_providers.py --- a/lib/galaxy/visualization/tracks/data_providers.py Wed Aug 22 14:56:49 2012 -0500 +++ b/lib/galaxy/visualization/tracks/data_providers.py Wed Aug 22 14:58:46 2012 -0500 @@ -634,7 +634,7 @@ # TODO? VCF does not have strand, so default to positive. "+", new_seq, - float( feature[5] ) ] + None if feature[5] == '.' else float( feature[5] ) ] rval.append(payload)
return { 'data': rval, 'message': message }
participants (2)
-
Jeremy Goecks
-
Jim Johnson