Skip to content

Commit

Permalink
Should also remove X from mutation list
Browse files Browse the repository at this point in the history
  • Loading branch information
philiptzou committed Feb 8, 2022
1 parent 6a0aad5 commit 055709c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drdb/commands/extract_sierra_mutations.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ def remove_mixtures(rows: Iterable[Dict[str, str]]) -> List[Dict[str, str]]:
for (gene, pos), part in groupby(
rows, lambda r: (r['Gene'], r['Position'])
):
partlst = [r for r in part if r['RefAA'] != r['MutAA']]
partlst = [
r for r in part
if r['RefAA'] != r['MutAA'] and
r['MutAA'] != 'X']
if len(partlst) > 1:
continue
results.extend(partlst)
Expand Down

0 comments on commit 055709c

Please sign in to comment.