# -*- 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)
网友评论