From 4c83c9c0dcd9117eedfbb456229600e7e259c5aa Mon Sep 17 00:00:00 2001
From: WardDeb <ward@deboutte.be>
Date: Tue, 28 Jan 2025 10:46:09 +0100
Subject: [PATCH] drop validchrom printing, sort regions to have proper bw
 files.

---
 src/covcalc.rs | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/covcalc.rs b/src/covcalc.rs
index 4b1d472803..275ec115a9 100644
--- a/src/covcalc.rs
+++ b/src/covcalc.rs
@@ -39,7 +39,6 @@ pub fn parse_regions(regions: &Vec<(String, u32, u32)>, bam_ifile: Vec<&str>) ->
     }
     // Crash if validchroms is empty.
     assert!(!validchroms.is_empty(), "No chromosomes found that are present in all bam files. Did you mix references ?");
-    println!("Valid chromosomes are: {:?}", validchroms);
     // Read header from first bam file
     let bam = IndexedReader::from_path(bam_ifile[0]).unwrap();
     let header = bam.header().clone();
@@ -101,7 +100,7 @@ pub fn parse_regions(regions: &Vec<(String, u32, u32)>, bam_ifile: Vec<&str>) ->
     }
     // Sort regions to make our live easier down the line
     // Sort Vec of Regions per chromosome, and then by start.
-    // chromregions.sort_by(|a, b| a.chrom.cmp(&b.chrom).then(a.start.cmp(&b.start)));
+    chromregions.sort_by(|a, b| a.chrom.cmp(&b.chrom).then(a.get_startu().cmp(&b.get_startu())));
     return (chromregions, chromsizes);
 }