Thomas před 2 roky
rodič
revize
f5e2dd3a2f
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      src/lib.rs

+ 2 - 1
src/lib.rs

@@ -336,7 +336,8 @@ impl Contig {
                 .expect("Unable to align");
             mappings.push(alignment);
         }
-        let mappings: Vec<_> = mappings.into_iter().flatten().collect();
+        let mut mappings: Vec<_> = mappings.into_iter().flatten().collect();
+        mappings.sort_by(|a, b| a.target_start.cmp(&b.target_start));
 
         let mut header = bam::Header::new();
         let mut sq_record = rust_htslib::bam::header::HeaderRecord::new(b"SQ");