Skip to content

Commit

Permalink
fix: update FASTA header format (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsstevenson authored Aug 9, 2023
1 parent 3c9e30b commit e502616
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cool_seq_tool/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,12 +640,12 @@ def get_fasta_file(
aliases = self.seqrepo_access.translate_identifier(
sequence_id, ["ensembl", "ga4gh"]
)
header = f">ref|refseq:{sequence_id}|{'|'.join(aliases[0])}"
header = f">refseq:{sequence_id}|{'|'.join(aliases[0])}"
elif sequence_id[:4] in ENSEMBL_PREFIXES:
aliases = self.seqrepo_access.translate_identifier(
sequence_id, ["refseq", "ga4gh"]
)
header = f">emb|ensembl:{sequence_id}|{'|'.join(aliases[0])}"
header = f">ensembl:{sequence_id}|{'|'.join(aliases[0])}"
else:
aliases = self.seqrepo_access.translate_identifier(
sequence_id, ["ensembl", "refseq", "ga4gh"]
Expand Down
2 changes: 1 addition & 1 deletion cool_seq_tool/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.14-dev0"
__version__ = "0.1.14-dev1"
4 changes: 2 additions & 2 deletions tests/unit/test_cool_seq_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ def test_get_fasta_file(test_cool_seq_tool, tmp_path):
"""Test get_fasta_file method"""
tpm3 = tmp_path / "NM_002529.3.fasta"
test_cool_seq_tool.get_fasta_file("NM_002529.3", tpm3)
tpm3_expected = """>ref|refseq:NM_002529.3|ga4gh:SQ.RSkww1aYmsMiWbNdNnOTnVDAM3ZWp1uA
tpm3_expected = """>refseq:NM_002529.3|ga4gh:SQ.RSkww1aYmsMiWbNdNnOTnVDAM3ZWp1uA
TGCAGCTGGGAGCGCACAGACGGCTGCCCCGCCTGAGCGAGGCGGGCGCCGCCGCGATGC
TGCGAGGCGGACGGCGCGGGCAGCTTGGCTGGCACAGCTGGGCTGCGGGGCCGGGCAGCC
TGCTGGCTTGGCTGATACTGGCATCTGCGGGCGCCGCACCCTGCCCCGATGCCTGCTGCC
Expand Down Expand Up @@ -818,7 +818,7 @@ def test_get_fasta_file(test_cool_seq_tool, tmp_path):

limk2 = tmp_path / "ENST00000331728.9.fasta"
test_cool_seq_tool.get_fasta_file("ENST00000331728.9", limk2)
limk2_expected = """>emb|ensembl:ENST00000331728.9|refseq:NM_005569.4|ga4gh:SQ.7_mlQyDN-uWH0RlxTQFvFEv6ykd2D-xF
limk2_expected = """>ensembl:ENST00000331728.9|refseq:NM_005569.4|ga4gh:SQ.7_mlQyDN-uWH0RlxTQFvFEv6ykd2D-xF
GTCTTCCCGCGCCTGAGGCGGCGGCGGCAGGAGCTGAGGGGAGTTGTAGGGAACTGAGGG
GAGCTGCTGTGTCCCCCGCCTCCTCCTCCCCATTTCCGCGCTCCCGGGACCATGTCCGCG
CTGGCGGGTGAAGATGTCTGGAGGTGTCCAGGCTGTGGGGACCACATTGCTCCAAGCCAG
Expand Down

0 comments on commit e502616

Please sign in to comment.