Skip to content
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

disambiguate skips outputing non-ambiguous records #108

Open
averagehat opened this issue Apr 8, 2016 · 0 comments
Open

disambiguate skips outputing non-ambiguous records #108

averagehat opened this issue Apr 8, 2016 · 0 comments

Comments

@averagehat
Copy link
Contributor

#103 (comment)

it looks like cur_seqs is set to [] and gets returned.

bio_bits/bio_bits/fasta.py

Lines 97 to 112 in 8976ba4

cur_seqs = []
# Go through each sequence again and and generate ambiguous bases
for seq in amb_seqs:
#print("nt: {0}".format(nt))
# build up permutations for the current ambiguous base
for base in amb_bases:
#print("base: {0}".format(base))
#print("seq[:i] + base + seq[i+1:]".format(seq[:i], base, seq[i+1:]))
cur_seqs.append(seq[:i] + base + seq[i+1:])
#print("cur_seqs: {0}".format(cur_seqs))
amb_seqs = cur_seqs
if len(amb_seqs) > MAX_PERMS:
sys.stderr.write("Sequence {0} has {1} ambiguous bases that would produce {2} permutations and was skipped\n".format(seq_id, len(a_bases), total_perms))
return []
#print("amb_seqs: {0}".format(amb_seqs))
return amb_seqs

should be able to check total_perms or return [seq_str] if cur_seqs is empty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant