Skip to content

Commit

Permalink
"ungap" ambig bases in order_and_orient
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkinsc committed Mar 12, 2024
1 parent 9534fd8 commit 0cf15db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assembly.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ def order_and_orient(inFasta, inReference, outFasta,
assert r==0

scaffolds = [tuple(Bio.SeqIO.parse(scaffolds_fasta[ref_num], 'fasta')) for ref_num in range(n_refs)]
base_counts = [sum([len(seg.seq.replace("-","")) for seg in scaffold]) \
base_counts = [sum([len(seg.seq.replace("N","")) for seg in scaffold]) \
if len(scaffold)==n_genome_segments else 0 for scaffold in scaffolds]
best_ref_num = numpy.argmax(base_counts)
if (len(scaffolds[best_ref_num]) != n_genome_segments) and not allow_incomplete_output:
Expand Down

0 comments on commit 0cf15db

Please sign in to comment.