GC content

計算核酸序列的GC含量 (GC content)

#!/usr/bin/env python
# -*- coding: utf-8 -*- 
__author__ = 'shengwei ma'
__author_email__ = '[email protected]'

from Bio import SeqIO
from Bio.SeqUtils import GC

for rec in SeqIO.parse("1.txt", "fasta"): #1.txt爲fasta格式的文件
    print ' %s\t%2.2f%%' % (rec.name, GC(rec.seq))
發佈了75 篇原創文章 · 獲贊 32 · 訪問量 30萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章