From 9f56f26c5a5ccaec5c4920a5cddfae82b797bd21 Mon Sep 17 00:00:00 2001 From: zhuchcn Date: Sat, 22 Jun 2024 21:46:17 +0800 Subject: [PATCH 1/3] fix (splitFasta): NovelORF not added to sources for coding transcript novel ORF peptides --- moPepGen/aa/VariantPeptideLabel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moPepGen/aa/VariantPeptideLabel.py b/moPepGen/aa/VariantPeptideLabel.py index 6e7c52a7..acdc5da9 100644 --- a/moPepGen/aa/VariantPeptideLabel.py +++ b/moPepGen/aa/VariantPeptideLabel.py @@ -203,7 +203,7 @@ def from_variant_peptide(peptide:AminoAcidSeqRecord, info = VariantPeptideInfo(str(variant_id), gene_ids, var_ids, variant_id.index) if check_source: - if tx_id not in coding_tx: + if variant_id.orf_id is not None: info.sources.add(constant.SOURCE_NOVEL_ORF, group_map=group_map) for gene_id, _ids in var_ids.items(): From 1bdbfd96145379c76058c192cf8851a041c69ede Mon Sep 17 00:00:00 2001 From: zhuchcn Date: Sun, 23 Jun 2024 14:50:22 +0800 Subject: [PATCH 2/3] fix (splitFasta): test cases fixed --- test/unit/test_peptide_pool_splitter.py | 6 +++--- test/unit/test_peptide_pool_summarizer.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/unit/test_peptide_pool_splitter.py b/test/unit/test_peptide_pool_splitter.py index da834aa8..314e93e7 100644 --- a/test/unit/test_peptide_pool_splitter.py +++ b/test/unit/test_peptide_pool_splitter.py @@ -283,7 +283,7 @@ def test_from_variant_peptide_noncoding(self): infos = VariantPeptideInfo.from_variant_peptide(peptide, tx2gene, coding_tx, label_map) self.assertIn('NovelORF', infos[0].sources) - peptide = create_aa_record('KHIRJ','ENST0004|1') + peptide = create_aa_record('KHIRJ','ENST0004|ORF1|1') infos = VariantPeptideInfo.from_variant_peptide(peptide, tx2gene, coding_tx, label_map) self.assertIn('NovelORF', infos[0].sources) @@ -543,7 +543,7 @@ def test_split_database_source_comb_order(self): peptides_data = [ [ 'SSSSSSSR', - 'CIRC-ENST0002-E1-E2|1 ENST0005|SE-2100|1' + 'CIRC-ENST0002-E1-E2|1 ENST0005|SE-2100|ORF2|1' ] ] peptides = VariantPeptidePool({create_aa_record(*x) for x in peptides_data}) @@ -576,7 +576,7 @@ def test_split_database_source_comb_order_case2(self): peptides_data = [ [ 'SSSSFSSR', - 'CIRC-ENST0002-E1-E2|1 ENST0005|SE-2100|W2F-5|1' + 'CIRC-ENST0002-E1-E2|1 ENST0005|SE-2100|W2F-5|ORF-2|1' ] ] peptides = VariantPeptidePool({create_aa_record(*x) for x in peptides_data}) diff --git a/test/unit/test_peptide_pool_summarizer.py b/test/unit/test_peptide_pool_summarizer.py index 8c086c05..3a84af0d 100644 --- a/test/unit/test_peptide_pool_summarizer.py +++ b/test/unit/test_peptide_pool_summarizer.py @@ -50,7 +50,7 @@ def test_summarize_fasta_source_comb_order(self): peptides_data = [ [ 'SSSSSSSR', - 'CIRC-ENST0002-E1-E2|1 ENST0005|SE-2100|1' + 'CIRC-ENST0002-E1-E2|1 ENST0005|SE-2100|ORF2|1' ] ] peptides = VariantPeptidePool({create_aa_record(*x) for x in peptides_data}) From 2593943e92f55009fcb0dde30dac5894acf09c45 Mon Sep 17 00:00:00 2001 From: zhuchcn Date: Sun, 23 Jun 2024 14:51:30 +0800 Subject: [PATCH 3/3] doc (moPepGen): version bump to 1.4.2 --- CHANGELOG.md | 4 ++++ moPepGen/__init__.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 819482c6..8585810d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## [Unreleased] +## [1.4.2] - 2024-06-23 + +- Fixed `splitFasta` that NovelORF peptides coding transcripts not recognized correctly. + ## [1.4.1] - 2024-05-26 - Fixed `VariantPepidePool` that old versions of `SeqUtils.molecular_weight` don't handle `SeqRecord` objects. #874 diff --git a/moPepGen/__init__.py b/moPepGen/__init__.py index 053f60d1..9c99479d 100644 --- a/moPepGen/__init__.py +++ b/moPepGen/__init__.py @@ -8,7 +8,7 @@ from . import constant -__version__ = '1.4.1' +__version__ = '1.4.2' ## Error messages ERROR_INDEX_IN_INTRON = 'The genomic index seems to be in an intron'