The ENA CRAM Archive Client is designed for easy retrieval of reference sequences and their metadata.
- get_metadata(self, sid) retrieve reference sequence
- get_sequence(self, sid) retrieve reference sequence metadata in json format
- get_service_info(self) retrieve service info in json format
pip install git+https://github.com/alextsaihi/enaCRAM.git
In a case where you would like to print out the metadata, use get_metadata function. Similarly, get_sequence and get_service_info to retrieve the reference sequence and service info, respectively.
from enacram.enacram import enaCRAM
sequence_id = "3050107579885e1608e6fe50fae3f8d0"
ena = enaCRAM()
# reference sequence metadata
print(ena.get_metadata(sequence_id))
# reference sequence
ref_sequence = ena.get_sequence(sequence_id)
# sequence service info
print(ena.get_service_info())