Handle multiple regions at a single locus

parent 50476c90
......@@ -43,9 +43,9 @@ def enumerate_variants(catalog_path):
for variant in variants:
region = variant['ReferenceRegion']
# TODO handle other regions?
if isinstance(region, list):
region = region[0]
locus_index = variant['VariantId'].index(variant['LocusId'])
region = region[locus_index]
chrom, pos = region.split(':')
pos = pos.split('-')[0]
yield variant['LocusId'], (chrom, pos)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment