|
|
@@ -271,7 +271,7 @@ fn compute_mad(data: &[f64], median: f64) -> f64 {
|
|
|
compute_median(&deviations)
|
|
|
}
|
|
|
|
|
|
-pub fn scan_outliers(bam_path: &str, contig: &str, start: u32, end: u32, length: u32) -> Vec<(String, usize, f64, bool, f64, bool)> {
|
|
|
+pub fn scan_outliers(bam_path: &str, contig: &str, start: u32, end: u32, length: u32) -> Vec<(u32, usize, f64, bool, f64, bool)> {
|
|
|
let mut starts = Vec::new();
|
|
|
let mut current = start;
|
|
|
while current <= end {
|
|
|
@@ -318,10 +318,9 @@ pub fn scan_outliers(bam_path: &str, contig: &str, start: u32, end: u32, length:
|
|
|
let filtered_se_indices = filter_outliers_modified_z_score_with_indices(se_ratios, indices);
|
|
|
|
|
|
ratios.iter().map(|(p, n, sa, se)| {
|
|
|
- let end = p + length - 1;
|
|
|
let sa_outlier = filtered_sa_indices.contains(p);
|
|
|
let se_outlier = filtered_se_indices.contains(p);
|
|
|
- (format!("{contig}:{p}-{end}"), *n, *sa, sa_outlier, *se, se_outlier)
|
|
|
+ (*p, *n, *sa, sa_outlier, *se, se_outlier)
|
|
|
|
|
|
}).collect()
|
|
|
}
|