Skip to content

Commit 305ffbb

Browse files
author
Chenghao Zhu
authored
Merge pull request #876 from uclahs-cds/czhu-fix-split-fasta
Fix splitFasta: NovelORF peptides from coding transcripts not recognized correctly
2 parents b4da46e + 2593943 commit 305ffbb

5 files changed

Lines changed: 10 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
1010

1111
## [Unreleased]
1212

13+
## [1.4.2] - 2024-06-23
14+
15+
- Fixed `splitFasta` that NovelORF peptides coding transcripts not recognized correctly.
16+
1317
## [1.4.1] - 2024-05-26
1418

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

moPepGen/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from . import constant
99

1010

11-
__version__ = '1.4.1'
11+
__version__ = '1.4.2'
1212

1313
## Error messages
1414
ERROR_INDEX_IN_INTRON = 'The genomic index seems to be in an intron'

moPepGen/aa/VariantPeptideLabel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ def from_variant_peptide(peptide:AminoAcidSeqRecord,
203203
info = VariantPeptideInfo(str(variant_id), gene_ids, var_ids, variant_id.index)
204204

205205
if check_source:
206-
if tx_id not in coding_tx:
206+
if variant_id.orf_id is not None:
207207
info.sources.add(constant.SOURCE_NOVEL_ORF, group_map=group_map)
208208

209209
for gene_id, _ids in var_ids.items():

test/unit/test_peptide_pool_splitter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ def test_from_variant_peptide_noncoding(self):
283283
infos = VariantPeptideInfo.from_variant_peptide(peptide, tx2gene, coding_tx, label_map)
284284
self.assertIn('NovelORF', infos[0].sources)
285285

286-
peptide = create_aa_record('KHIRJ','ENST0004|1')
286+
peptide = create_aa_record('KHIRJ','ENST0004|ORF1|1')
287287
infos = VariantPeptideInfo.from_variant_peptide(peptide, tx2gene, coding_tx, label_map)
288288
self.assertIn('NovelORF', infos[0].sources)
289289

@@ -543,7 +543,7 @@ def test_split_database_source_comb_order(self):
543543
peptides_data = [
544544
[
545545
'SSSSSSSR',
546-
'CIRC-ENST0002-E1-E2|1 ENST0005|SE-2100|1'
546+
'CIRC-ENST0002-E1-E2|1 ENST0005|SE-2100|ORF2|1'
547547
]
548548
]
549549
peptides = VariantPeptidePool({create_aa_record(*x) for x in peptides_data})
@@ -576,7 +576,7 @@ def test_split_database_source_comb_order_case2(self):
576576
peptides_data = [
577577
[
578578
'SSSSFSSR',
579-
'CIRC-ENST0002-E1-E2|1 ENST0005|SE-2100|W2F-5|1'
579+
'CIRC-ENST0002-E1-E2|1 ENST0005|SE-2100|W2F-5|ORF-2|1'
580580
]
581581
]
582582
peptides = VariantPeptidePool({create_aa_record(*x) for x in peptides_data})

test/unit/test_peptide_pool_summarizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def test_summarize_fasta_source_comb_order(self):
5050
peptides_data = [
5151
[
5252
'SSSSSSSR',
53-
'CIRC-ENST0002-E1-E2|1 ENST0005|SE-2100|1'
53+
'CIRC-ENST0002-E1-E2|1 ENST0005|SE-2100|ORF2|1'
5454
]
5555
]
5656
peptides = VariantPeptidePool({create_aa_record(*x) for x in peptides_data})

0 commit comments

Comments
 (0)