|
|
@@ -1,5 +1,5 @@
|
|
|
use anyhow::Result;
|
|
|
-use std::{fmt, collections::{HashMap, VecDeque}};
|
|
|
+use std::{fmt, collections::{HashMap, VecDeque, hash_map::Iter}};
|
|
|
use log::info;
|
|
|
use minimap2::Mapping;
|
|
|
|
|
|
@@ -159,6 +159,9 @@ impl Genome {
|
|
|
chromosomes: HashMap::new(),
|
|
|
}
|
|
|
}
|
|
|
+ pub fn iter(&self) -> Iter<'_, String, Chromosome>{
|
|
|
+ self.chromosomes.iter()
|
|
|
+ }
|
|
|
pub fn add_contig(&mut self, id: String, mappings: Vec<Mapping>) -> Result<()> {
|
|
|
let mut new_contig = Contig { id, mappings };
|
|
|
// get the category of Mapping
|