|
@@ -5,7 +5,7 @@ use noodles_fasta as fasta;
|
|
|
use rust_htslib::bam::{self, Record};
|
|
use rust_htslib::bam::{self, Record};
|
|
|
use std::{
|
|
use std::{
|
|
|
collections::{HashMap, VecDeque},
|
|
collections::{HashMap, VecDeque},
|
|
|
- fmt::{self, format},
|
|
|
|
|
|
|
+ fmt,
|
|
|
fs::{self, File},
|
|
fs::{self, File},
|
|
|
io::{BufWriter, Write},
|
|
io::{BufWriter, Write},
|
|
|
process::{Command, Stdio},
|
|
process::{Command, Stdio},
|
|
@@ -327,6 +327,7 @@ impl Chromosome {
|
|
|
|
|
|
|
|
impl Contig {
|
|
impl Contig {
|
|
|
pub fn sort(&mut self) {
|
|
pub fn sort(&mut self) {
|
|
|
|
|
+ // sorting by target order
|
|
|
self.mappings
|
|
self.mappings
|
|
|
.sort_by(|a, b| a.target_start.cmp(&b.target_start));
|
|
.sort_by(|a, b| a.target_start.cmp(&b.target_start));
|
|
|
}
|
|
}
|
|
@@ -466,6 +467,7 @@ fn group_mappings(mappings: &mut Vec<Mapping>) -> Result<Vec<Vec<Mapping>>> {
|
|
|
alignments.push(vec![aln.clone()]);
|
|
alignments.push(vec![aln.clone()]);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ println!("{mappings:?}");
|
|
|
|
|
|
|
|
Ok(alignments)
|
|
Ok(alignments)
|
|
|
}
|
|
}
|