Skip to content

Commit

Permalink
drop validchrom printing, sort regions to have proper bw files.
Browse files Browse the repository at this point in the history
  • Loading branch information
WardDeb committed Jan 28, 2025
1 parent fbb4435 commit 4c83c9c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/covcalc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 4c83c9c

Please sign in to comment.