Skip to content

Commit

Permalink
Another fix to variant annotation export (#328)
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe committed Feb 4, 2022
1 parent 7c2012a commit 2f8b0e0
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions variants/views.py
Expand Up @@ -1564,7 +1564,13 @@ def yield_rows(self, *, case, cases, project):
if x.refseq_gene_id and x.refseq_effect
)

variant = anno["variants"][0]
coord_candidates = anno["variants"] + anno["comments"]
if anno["acmg_rating"]:
coord_candidates += [anno["acmg_rating"]]
if anno["flags"]:
coord_candidates += [anno["flags"]]
coord = coord_candidates[0]

if not anno["flags"]:
row_flags = ["N/A"] * 12
else:
Expand All @@ -1585,11 +1591,11 @@ def yield_rows(self, *, case, cases, project):
row = (
[
case_uuid_to_name[case_uuid],
variant.release,
variant.chromosome,
variant.start,
variant.reference,
variant.alternative,
coord.release,
coord.chromosome,
coord.start,
coord.reference,
coord.alternative,
genes,
transcripts,
hgvs,
Expand Down

0 comments on commit 2f8b0e0

Please sign in to comment.