|
|
@@ -59,6 +59,10 @@ pub struct VariantsStats {
|
|
|
|
|
|
#[serde(serialize_with = "serialize_dashmap_sort")]
|
|
|
pub insertions_len: DashMap<u32, u32>,
|
|
|
+
|
|
|
+ #[serde(serialize_with = "serialize_dashmap_sort")]
|
|
|
+ pub deletions_len: DashMap<u32, u32>,
|
|
|
+
|
|
|
}
|
|
|
|
|
|
pub fn serialize_dashmap_sort<S, T>(
|
|
|
@@ -92,6 +96,7 @@ impl VariantsStats {
|
|
|
let gnomads: DashMap<String, Vec<f64>> = DashMap::new();
|
|
|
let context: DashMap<String, Vec<String>> = DashMap::new();
|
|
|
let insertions_len: DashMap<u32, u32> = DashMap::new();
|
|
|
+ let deletions_len: DashMap<u32, u32> = DashMap::new();
|
|
|
|
|
|
variants.data.par_iter().for_each(|v| {
|
|
|
// VEP
|
|
|
@@ -164,6 +169,11 @@ impl VariantsStats {
|
|
|
if let Some(len) = v.insertion_length() {
|
|
|
*insertions_len.entry(len).or_default() += 1;
|
|
|
}
|
|
|
+
|
|
|
+ if let Some(len) = v.deletion_length() {
|
|
|
+ *deletions_len.entry(len).or_default() += 1;
|
|
|
+ }
|
|
|
+
|
|
|
});
|
|
|
|
|
|
let mut n_gnomad = 0;
|
|
|
@@ -362,6 +372,7 @@ impl VariantsStats {
|
|
|
high_depth_somatic_rates: high_depth,
|
|
|
mutation_rates,
|
|
|
insertions_len,
|
|
|
+ deletions_len,
|
|
|
})
|
|
|
}
|
|
|
|