Skip to content
Snippets Groups Projects
Commit 044885e0 authored by Floreal Cabanettes's avatar Floreal Cabanettes
Browse files

Fix variantfile as pysam

parent f23bb80b
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@ def passed_variant(record):
def readgenotypes(vcffile: str, variants: dict, type_v, dofilter: bool=False):
vcfin = VariantFile(vcffile)
for r in vcfin:
if (not dofilter or passed_variant(r)) and r.sv_type.lower() == type_v:
if (not dofilter or passed_variant(r)) and r.alts[0][1:-1].lower() == type_v:
variants[r.id] = r
return variants
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment