diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml index 5148ce44..27790f56 100644 --- a/.github/workflows/pypi.yaml +++ b/.github/workflows/pypi.yaml @@ -15,7 +15,7 @@ jobs: uses: actions/checkout@v2 - name: Build distribution - uses: uclahs-cds/tool-pypi-publish-action/build-distribution@58e64514405eafe4f8c40130001cbd4d62acdf5c + uses: uclahs-cds/tool-pypi-publish-action/build-distribution@8a59b1548652d33f0a224775805d9a39767f0605 with: package-name: mopepgen @@ -35,7 +35,7 @@ jobs: uses: actions/checkout@v2 - name: Publish to PyPI - uses: uclahs-cds/tool-pypi-publish-action/publish-to-pypi@58e64514405eafe4f8c40130001cbd4d62acdf5c + uses: uclahs-cds/tool-pypi-publish-action/publish-to-pypi@8a59b1548652d33f0a224775805d9a39767f0605 with: package-name: mopepgen url: https://upload.pypi.org/legacy/ diff --git a/CHANGELOG.md b/CHANGELOG.md index be5522fe..65a29c87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,12 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Unreleased] +## [1.4.5] - 2025-02-19 + +### Fixed + +- Variant peptide not split correclty if it is derived from fusion that the upstream and downstream are the same gene. #897 + ## [1.4.4] - 2025-02-11 ### Fixed diff --git a/moPepGen/__init__.py b/moPepGen/__init__.py index c9dc89d2..f826cde6 100644 --- a/moPepGen/__init__.py +++ b/moPepGen/__init__.py @@ -8,7 +8,7 @@ from . import constant -__version__ = '1.4.4' +__version__ = '1.4.5' ## Error messages ERROR_INDEX_IN_INTRON = 'The genomic index seems to be in an intron' diff --git a/moPepGen/aa/VariantPeptideLabel.py b/moPepGen/aa/VariantPeptideLabel.py index acdc5da9..655fdbf6 100644 --- a/moPepGen/aa/VariantPeptideLabel.py +++ b/moPepGen/aa/VariantPeptideLabel.py @@ -189,9 +189,14 @@ def from_variant_peptide(peptide:AminoAcidSeqRecord, var_ids = { first_gene_id: variant_id.first_variants + [variant_id.fusion_id] \ - + variant_id.peptide_variants, - second_gene_id: variant_id.second_variants + + variant_id.peptide_variants } + if second_gene_id != first_gene_id: + var_ids[second_gene_id] = variant_id.second_variants + else: + var_ids[first_gene_id] = list(set( + var_ids[first_gene_id] + variant_id.second_variants + )) tx_id = first_tx_id elif isinstance(variant_id, pi.BaseVariantPeptideIdentifier):