Skip to content

Commit

Permalink
Kvg clean read bubbles (#42)
Browse files Browse the repository at this point in the history
* Correct reads by popping bubbles induced against the cleaned graph

* Only replace poor-scoring read paths
  • Loading branch information
kvg authored Nov 11, 2024
1 parent 06a0664 commit f8f4021
Show file tree
Hide file tree
Showing 4 changed files with 267 additions and 102 deletions.
11 changes: 6 additions & 5 deletions src/hidive/src/coassemble.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,14 +261,15 @@ fn assign_reads_to_bubbles(bubbles: &LinkedHashMap<(NodeIndex, NodeIndex), Vec<N
}

fn correct_reads(m: &LdBG, seqs: &Vec<Vec<u8>>) -> Vec<Vec<u8>> {
let g = m.traverse_all_kmers();
let corrected_seqs =
seqs
.par_iter()
.map(|seq| m.correct_seq(seq))
.flatten()
.collect::<Vec<Vec<u8>>>();
.par_iter()
.map(|seq| m.correct_seq(&g, seq))
.flatten()
.collect::<Vec<u8>>();

corrected_seqs
vec![corrected_seqs]
}

fn create_fully_phased_haplotypes(lr_msas: &Vec<String>, h1: &Vec<u8>) -> (String, String) {
Expand Down
Loading

0 comments on commit f8f4021

Please sign in to comment.