12 lines
592 B
Python
Raw Normal View History

2025-01-02 21:28:45 +00:00
from mlstmyfasta.engine.annotations import annotate_from_genbank, fetch_ncbi_genbank
from Bio import SeqIO
2025-01-02 18:49:23 +00:00
2025-01-02 21:28:45 +00:00
from mlstmyfasta.engine.data.genomics import AnnotatedString
2025-01-02 18:49:23 +00:00
async def test_fetch_ncbi_genbank_with_id_works():
2025-01-02 21:28:45 +00:00
assert len((await fetch_ncbi_genbank("CP011448.1")).sequence) > 0
async def test_annotate_from_genbank_results_in_annotations():
sequence = SeqIO.read("tests/resources/tohama_I_bpertussis.fasta", "fasta").seq
2025-01-02 21:53:55 +00:00
annotated_sequence = await annotate_from_genbank("CP011448.1", "bpertussis_tohamaI", str(sequence))
assert annotated_sequence is AnnotatedString