Skip to content

Commit

Permalink
Merge pull request #469 from uclahs-cds/czhu-fix-variant-record
Browse files Browse the repository at this point in the history
Deletion was mistreated as insertion
  • Loading branch information
zhuchcn authored May 31, 2022
2 parents 77cb6ed + a63f2b1 commit 17226c9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

---

## [0.6.1] - 2022-05-31

### Fixed

- Deletion was mistreated as insertion when trying to convert to end-inclusion format. This only affects deletions that start on the third nucleotide of CDS. #468

---

## [0.6.0] - 2022-05-28

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion moPepGen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from typing import Iterable, IO


__version__ = '0.6.0'
__version__ = '0.6.1'

## Error messages
ERROR_INDEX_IN_INTRON = 'The genomic index seems to be in an intron'
Expand Down
2 changes: 1 addition & 1 deletion moPepGen/seqvar/VariantRecord.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def is_insertion(self) -> bool:
""" Checks if the variant is an insertion """
if self.type == 'Insertion':
return True
return len(self.ref) == 1 and len(self.alt) > 1
return len(self.ref) == 1 and not self.alt.startswith('<') and len(self.alt) > 1

def is_deletion(self) -> bool:
""" Checks if the variant is a deletion. """
Expand Down

0 comments on commit 17226c9

Please sign in to comment.