Skip to content

Commit

Permalink
fix parser. Key not found when there
Browse files Browse the repository at this point in the history
is no gene SYMBOL in vcf record. closes #10
  • Loading branch information
riederd committed Aug 3, 2022
1 parent c729c06 commit 09d2f0c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/parse_mixMHC2pred.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ def parse_vcf(vep_vcf, sample_name, normal_name):
enst = CSQ[6]
variant = CSQ[14] + CSQ[15]

gene_symbol = gene_symbol if gene_symbol else ensg

vcf_record = {
"chrom": chrom,
"pos": pos,
Expand All @@ -94,6 +96,7 @@ def parse_vcf(vep_vcf, sample_name, normal_name):
"variant": variant,
}


if "frameshift_variant" in variant_type.split("&"):
key = gene_symbol + "_" + enst + "_" + CSQ[14] + ref + "/" + alt
else:
Expand Down

0 comments on commit 09d2f0c

Please sign in to comment.