I have two file, named *.gb and *.txt , I want to find the same record between the two files, here is the script I wrote,but it does not work, what 's wrong with it ,can you help me?
from Bio import SeqIO i=0 f = open("E:/WSA2/blast_gb.txt", "r", encoding="utf-8") record = SeqIO.parse("E://WSA2/filted_77468.gb","genbank") for aci in record: id = aci.id for line in f: if line in id: i=i+1 SeqIO.write(id,"aa.gb","genbank") print(i) f.close()
Hi, please can you use "code sample" when you paste code to your post? It is much more readable.
I am sorry,I am not familar with this ,here is the source code, and the result shows 0 ,I don't know why, could you please help me，thx!