1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/559602ed992f/ Changeset: 559602ed992f User: jgoecks Date: 2013-09-05 20:19:50 Summary: Correctly treat VCF format and genotyping fields as optional. Affected #: 1 file
diff -r 087a792e45bcfb48d0717f6947520b44d9b56d11 -r 559602ed992f131caa530aa468e86b3cd97c1bc5 lib/galaxy/visualization/data_providers/genome.py --- a/lib/galaxy/visualization/data_providers/genome.py +++ b/lib/galaxy/visualization/data_providers/genome.py @@ -670,9 +670,15 @@ # Split line and aggregate data. feature = line.split() pos, c_id, ref, alt, qual, c_filter, info = feature[ 1:8 ] - format = feature[ 8 ] - samples_data = feature [ 9: ] - # VCF is 1-based. + + # Format and samples data are optional. + format = None + samples_data = [] + if len( feature ) > 8: + format = feature[ 8 ] + samples_data = feature [ 9: ] + + # VCF is 1-based but provided position is 0-based. pos = int( pos ) - 1
# FIXME: OK to skip? @@ -680,11 +686,11 @@ count -= 1 continue
- # Count number of samples matching each allele. + # Set up array to track allele counts. allele_counts = [ 0 for i in range ( alt.count( ',' ) + 1 ) ] + sample_gts = []
- # Process and pack sample genotype. - sample_gts = [] + # Process and pack samples' genotype and count alleles across samples. alleles_seen = {} has_alleles = False
@@ -711,7 +717,7 @@ genotype = ''
sample_gts.append( genotype ) - + # Add locus data. locus_data = [ -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.
galaxy-commits@lists.galaxyproject.org