11 lines
528 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
assert (await annotate_from_genbank("CP011448.1", str(sequence))) is AnnotatedString