나는 당신이 추가 한 줄을 깨끗이 할 수있는 것은 없습니다. fastaseq
폭발 파일에서 줄을 마친 후. 이 시도:
with open(fastaname,'r') as fastafile:
with open(blastfilename,'r') as blastfile:
for line in blastfile:
fastaseq = '' # or whatever data type this is
while True:
fastaline = fastafile.readline()[:-1]
if fastaline[0]=='>':
break
fastaseq += fastaline
somefunction(line,fastaseq)
첫 번째 폭발 라인이기 때문에 첫 번째 Fasta 라인 세트를 얻을 수 있으므로 두 번째 폭발 라인은 첫 번째 및 두 번째 세트 등을 얻습니다.