python8

作者: rong酱 | 来源:发表于2021-06-08 23:53 被阅读0次
# -*- coding: utf-8 -*-

import os
import sys
import gzip
from Bio import SeqIO

inputfile = sys.argv[1]
outfile = sys.argv[2]
content = sys.argv[3]

outcont = open(outfile,"w")
count = 0

for seq_recode in SeqIO.parse(inputfile,"fastq"):
    print(seq_recode)
    read2file = seq_recode.seq
    if str(content) in read2file:
        lenght = str(read2file).find(content)
        strseq = str(read2file)[0:int(lenght)]
        print(strseq)

相关文章

网友评论

      本文标题:python8

      本文链接:https://www.haomeiwen.com/subject/fdvrsltx.html