|
@@ -56,6 +56,9 @@ pub struct VariantsStats {
|
|
|
pub somatic_rates: SomaticVariantRates,
|
|
pub somatic_rates: SomaticVariantRates,
|
|
|
pub high_depth_somatic_rates: SomaticVariantRates,
|
|
pub high_depth_somatic_rates: SomaticVariantRates,
|
|
|
pub mutation_rates: Vec<(String, (u32, usize))>,
|
|
pub mutation_rates: Vec<(String, (u32, usize))>,
|
|
|
|
|
+
|
|
|
|
|
+ #[serde(serialize_with = "serialize_dashmap_sort")]
|
|
|
|
|
+ pub insertions_len: DashMap<u32, u32>,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
pub fn serialize_dashmap_sort<S, T>(
|
|
pub fn serialize_dashmap_sort<S, T>(
|
|
@@ -88,6 +91,7 @@ impl VariantsStats {
|
|
|
let cosmic: DashMap<u64, u32> = DashMap::new();
|
|
let cosmic: DashMap<u64, u32> = DashMap::new();
|
|
|
let gnomads: DashMap<String, Vec<f64>> = DashMap::new();
|
|
let gnomads: DashMap<String, Vec<f64>> = DashMap::new();
|
|
|
let context: DashMap<String, Vec<String>> = DashMap::new();
|
|
let context: DashMap<String, Vec<String>> = DashMap::new();
|
|
|
|
|
+ let insertions_len: DashMap<u32, u32> = DashMap::new();
|
|
|
|
|
|
|
|
variants.data.par_iter().for_each(|v| {
|
|
variants.data.par_iter().for_each(|v| {
|
|
|
// VEP
|
|
// VEP
|
|
@@ -156,6 +160,10 @@ impl VariantsStats {
|
|
|
*alteration_categories
|
|
*alteration_categories
|
|
|
.entry(alteration_category_str.join(", "))
|
|
.entry(alteration_category_str.join(", "))
|
|
|
.or_default() += 1;
|
|
.or_default() += 1;
|
|
|
|
|
+
|
|
|
|
|
+ if let Some(len) = v.insertion_length() {
|
|
|
|
|
+ *insertions_len.entry(len).or_default() += 1;
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
let mut n_gnomad = 0;
|
|
let mut n_gnomad = 0;
|
|
@@ -185,7 +193,7 @@ impl VariantsStats {
|
|
|
let mut mutation_rates = Vec::new();
|
|
let mut mutation_rates = Vec::new();
|
|
|
|
|
|
|
|
// HighDepths
|
|
// HighDepths
|
|
|
- let ann = Annotation::HighDepths;
|
|
|
|
|
|
|
+ let ann = Annotation::HighDepth;
|
|
|
let res = variants.annotate_with_ranges(
|
|
let res = variants.annotate_with_ranges(
|
|
|
&high_depth_ranges,
|
|
&high_depth_ranges,
|
|
|
Some(ann.clone()),
|
|
Some(ann.clone()),
|
|
@@ -353,6 +361,7 @@ impl VariantsStats {
|
|
|
somatic_rates: all_somatic_rates,
|
|
somatic_rates: all_somatic_rates,
|
|
|
high_depth_somatic_rates: high_depth,
|
|
high_depth_somatic_rates: high_depth,
|
|
|
mutation_rates,
|
|
mutation_rates,
|
|
|
|
|
+ insertions_len,
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|