|
|
@@ -47,7 +47,7 @@ impl fmt::Display for ContigsRefRes {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-fn mapping_to_string(mapping: &Mapping) -> String {
|
|
|
+pub fn mapping_to_string(mapping: &Mapping) -> String {
|
|
|
let uk = "UNKNOWN".to_string();
|
|
|
format!(
|
|
|
"{}:{}-{}({}:{}-{})",
|
|
|
@@ -253,6 +253,13 @@ impl Genome {
|
|
|
info!("{}:{}", k, v.contigs.len());
|
|
|
}
|
|
|
}
|
|
|
+ pub fn chromosome(&self, chromosome: &str) -> Option<Vec<ContigsRefRes>> {
|
|
|
+ if let Some(chr) = self.chromosomes.get(chromosome) {
|
|
|
+ Some(chr.contigs.clone())
|
|
|
+ } else {
|
|
|
+ None
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
#[derive(Debug, Clone)]
|
|
|
pub struct Chromosome {
|