From fed5113dd881ea4e14c49ab409e7f183a437d424 Mon Sep 17 00:00:00 2001 From: zhuchcn Date: Wed, 19 Feb 2025 12:27:06 -0800 Subject: [PATCH 1/6] fix (splitFasta): variant peptide not split correclty if derived from fusion within the same gene --- moPepGen/aa/VariantPeptideLabel.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/moPepGen/aa/VariantPeptideLabel.py b/moPepGen/aa/VariantPeptideLabel.py index acdc5da9..cc44cdea 100644 --- a/moPepGen/aa/VariantPeptideLabel.py +++ b/moPepGen/aa/VariantPeptideLabel.py @@ -189,9 +189,10 @@ 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 tx_id = first_tx_id elif isinstance(variant_id, pi.BaseVariantPeptideIdentifier): From f18f0bac52ad7cdb8303e111f40b1be12e38b104 Mon Sep 17 00:00:00 2001 From: zhuchcn Date: Wed, 19 Feb 2025 13:24:32 -0800 Subject: [PATCH 2/6] fix (splitFasta): update to combine variants for fusino if downstream and upsteam genes are the same --- CHANGELOG.md | 6 ++++++ moPepGen/__init__.py | 2 +- moPepGen/aa/VariantPeptideLabel.py | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) 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 cc44cdea..655fdbf6 100644 --- a/moPepGen/aa/VariantPeptideLabel.py +++ b/moPepGen/aa/VariantPeptideLabel.py @@ -193,6 +193,10 @@ def from_variant_peptide(peptide:AminoAcidSeqRecord, } 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): From 9927f5b33674f09cb23cb9f58fea96f01e3694b8 Mon Sep 17 00:00:00 2001 From: zhuchcn Date: Wed, 19 Feb 2025 13:32:53 -0800 Subject: [PATCH 3/6] fix (CICD): update pypi.yaml to use the latest version of our github action --- .github/workflows/pypi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml index 5148ce44..3abbf045 100644 --- a/.github/workflows/pypi.yaml +++ b/.github/workflows/pypi.yaml @@ -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 with: package-name: mopepgen url: https://upload.pypi.org/legacy/ From f290975b404fac78abf94cf4f50b7d36e35ab76b Mon Sep 17 00:00:00 2001 From: zhuchcn Date: Thu, 20 Feb 2025 11:51:53 -0800 Subject: [PATCH 4/6] test (CICD): test the latest action --- .github/workflows/pypi.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml index 3abbf045..f4bbf823 100644 --- a/.github/workflows/pypi.yaml +++ b/.github/workflows/pypi.yaml @@ -15,18 +15,18 @@ 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 - publish-to-pypi: + publish-to-py`pi: name: Publish Python 🐍 distribution 📦 to PyPI needs: - build runs-on: ubuntu-latest environment: name: pypi - url: https://pypi.org/p/${{ needs.build.outputs.package_name }} + url: https://test.pypi.org/p/${{ needs.build.outputs.package_name }} permissions: id-token: write @@ -35,7 +35,7 @@ jobs: uses: actions/checkout@v2 - name: Publish to PyPI - uses: uclahs-cds/tool-pypi-publish-action/publish-to-pypi + uses: uclahs-cds/tool-pypi-publish-action/publish-to-pypi@8a59b1548652d33f0a224775805d9a39767f0605 with: package-name: mopepgen url: https://upload.pypi.org/legacy/ From 51357bad1b5e873f892c6a3443c4838d5520d7a5 Mon Sep 17 00:00:00 2001 From: zhuchcn Date: Thu, 20 Feb 2025 11:57:28 -0800 Subject: [PATCH 5/6] fix (CICD): syntax error --- .github/workflows/pypi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml index f4bbf823..aafbc95a 100644 --- a/.github/workflows/pypi.yaml +++ b/.github/workflows/pypi.yaml @@ -19,7 +19,7 @@ jobs: with: package-name: mopepgen - publish-to-py`pi: + publish-to-pypi: name: Publish Python 🐍 distribution 📦 to PyPI needs: - build From dda2f7b2e654c614665406514509dfdc12a5077d Mon Sep 17 00:00:00 2001 From: zhuchcn Date: Thu, 20 Feb 2025 12:10:41 -0800 Subject: [PATCH 6/6] fix (CICD): update to main pypi --- .github/workflows/pypi.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml index aafbc95a..27790f56 100644 --- a/.github/workflows/pypi.yaml +++ b/.github/workflows/pypi.yaml @@ -26,7 +26,7 @@ jobs: runs-on: ubuntu-latest environment: name: pypi - url: https://test.pypi.org/p/${{ needs.build.outputs.package_name }} + url: https://pypi.org/p/${{ needs.build.outputs.package_name }} permissions: id-token: write