-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
duplicate sequence outputs after HMMER #149
Comments
count = len(seqids)
firstline = 1
seqti = ""
seq = ""
for i in fh:
#i = i.strip()
if i.startswith(">"):
if firstline:
firstline = 0
else:
if seqid in seqids:
print(seqti, seq, sep="", end="", file=fhout)
count -= 1
if count <= 0: # the bug is here. we should reset seqti before the 'break' clause!!
break
seqti = i
seqid = i.strip().split()[0]
seqid = seqid.replace(">", "")
seq = ""
else:
seq += i
# the last seq
if seqid in seqids:
print(seqti, seq, sep="", end="", file=fhout) |
this bug does not happen, as long as the last sequence in the input fasta file is not what we want. will be fixed in the next release. For now, you can modify the script ( if count <= 0:
seqti = seq = ''
break You have to use the |
the issue here: #130 |
fixed in MitoZ 3.4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
E004/mt_assembly/megahit/E004.megahit.hmmtblout.besthit.sim
:E004/mt_assembly/megahit/E004.megahit.hmmtblout.besthit.sim.fa
:The text was updated successfully, but these errors were encountered: