Skip to content

Commit

Permalink
fix rest-of-entries bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lskatz committed Jan 20, 2025
1 parent 5ea1366 commit c6b29ff
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/bin/fasten_sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,17 +257,15 @@ fn main(){

}

// If we aren't chunking then just print everything sorted
if chunk_size == 0 {
let sorted_entries:Vec<Seq> = sort_entries(entries, &which_field, reverse_sort);
for entry in sorted_entries {
println!("{}\n{}\n+\n{}", entry.id1, entry.seq1, entry.qual1);
if entry.pe {
println!("{}\n{}\n+\n{}", entry.id2, entry.seq2, entry.qual2);
}
// Print the rest of the entries
let sorted_entries:Vec<Seq> = sort_entries(entries, &which_field, reverse_sort);
for entry in sorted_entries {
println!("{}\n{}\n+\n{}", entry.id1, entry.seq1, entry.qual1);
if entry.pe {
println!("{}\n{}\n+\n{}", entry.id2, entry.seq2, entry.qual2);
}
}

}

/// Find the lexicographically smallest kmer in a sequence.
Expand Down

0 comments on commit c6b29ff

Please sign in to comment.