GC content

来源:互联网 发布:大卫罗兵逊生涯数据 编辑:程序博客网 时间:2024/06/05 19:34

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

#!/usr/bin/env python# -*- coding: utf-8 -*- __author__ = 'shengwei ma'__author_email__ = 'shengweima@icloud.com'from Bio import SeqIOfrom Bio.SeqUtils import GCfor rec in SeqIO.parse("1.txt", "fasta"): #1.txt为fasta格式的文件    print ' %s\t%2.2f%%' % (rec.name, GC(rec.seq))
0 0