Skip to content

Commit

Permalink
fix (VariantPeptidePool): old versions of SeqUtils.molecular_weight d…
Browse files Browse the repository at this point in the history
…on't handle SeqRecord objects. #874
  • Loading branch information
zhuchcn committed May 26, 2024
1 parent bd98136 commit 37d95cc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

## [Unreleased]

## [1.4.1] - 2024-05-26

- Fixed `VariantPepidePool` that old versions of `SeqUtils.molecular_weight` don't handle `SeqRecord` objects. #874

## [1.4.0] - 2024-03-27

- `--coding-novel-orf` added to `callNoncoding` and `callVariant` to call novel ORF peptides from coding transcripts. #659
Expand Down
2 changes: 1 addition & 1 deletion moPepGen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from . import constant


__version__ = '1.4.0'
__version__ = '1.4.1'

## Error messages
ERROR_INDEX_IN_INTRON = 'The genomic index seems to be in an intron'
Expand Down
4 changes: 2 additions & 2 deletions moPepGen/aa/VariantPeptidePool.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ def add_peptide(self, peptide:AminoAcidSeqRecord,
min_mw = cleavage_params.min_mw
min_length = cleavage_params.min_length
max_length = cleavage_params.max_length
if SeqUtils.molecular_weight(peptide, 'protein') < min_mw:
if SeqUtils.molecular_weight(peptide.seq, 'protein') < min_mw:
return False
if len(peptide.seq) < min_length or len(peptide) > max_length:
if len(peptide.seq) < min_length or len(peptide.seq) > max_length:
return False
if str(peptide.seq) in canonical_peptides:
return False
Expand Down

0 comments on commit 37d95cc

Please sign in to comment.