📜  阅读 .fasta python 代码示例

📅  最后修改于: 2022-03-11 14:45:46.281000             🧑  作者: Mango

代码示例1
>>> import fastaparser
>>> with open("fasta_file.fasta") as fasta_file:
        parser = fastaparser.Reader(fasta_file)
        for seq in parser:
            # seq is a FastaSequence object
            print('ID:', seq.id)
            print('Description:', seq.description)
            print('Sequence:', seq.sequence_as_string())
            print()