FastaファイルのGC含量を計算する(Biopythonを使う)

以下です。

from Bio.SeqUtils import GC
import sys

args = sys.argv
f = open (args[1], 'r')
sequence = ""

for line in f:
        if not line.startswith('>'):
                sequence = sequence + line.rstrip()

GC_content = GC(sequence)
print(GC_content)