Thomas 1 year ago
parent
commit
7558ef9986
1 changed files with 24 additions and 28 deletions
  1. 24 28
      src/variants.rs

+ 24 - 28
src/variants.rs

@@ -819,12 +819,7 @@ impl Variants {
             .collect()
     }
 
-    pub fn phase_contig(
-        &mut self,
-        phases: &[Phase],
-        bam_path: &str,
-        contig: &str,
-    ) {
+    pub fn phase_contig(&mut self, phases: &[Phase], bam_path: &str, contig: &str) {
         type Iv = rust_lapper::Interval<u64, Phase>;
 
         let data: Vec<Iv> = phases
@@ -896,7 +891,8 @@ impl Variants {
                     .for_each(|p| {
                         if let Some(id) = p.id() {
                             annotations += 1;
-                            v.annotations.push(AnnotationType::Phase(PhaseAnnotation { id }));
+                            v.annotations
+                                .push(AnnotationType::Phase(PhaseAnnotation { id }));
                         };
                     });
             }
@@ -1707,17 +1703,17 @@ pub fn run_pipe(name: &str, multi: &MultiProgress) -> Result<()> {
     if !std::path::Path::new(&clairs_indels_vcf).exists() {
         return Err(anyhow!("{clairs_indels_vcf} is required"));
     }
-    let sniffles_vcf = format!(
-        "{}/{name}/diag/Sniffles/{name}_diag_sniffles.vcf",
-        cfg.longreads_results_dir
-    );
-    let sniffles_mrd_vcf = format!(
-        "{}/{name}/mrd/Sniffles/{name}_mrd_sniffles.vcf",
-        cfg.longreads_results_dir
-    );
-    if !std::path::Path::new(&sniffles_vcf).exists() {
-        return Err(anyhow!("{sniffles_vcf} is required"));
-    }
+    // let sniffles_vcf = format!(
+    //     "{}/{name}/diag/Sniffles/{name}_diag_sniffles.vcf",
+    //     cfg.longreads_results_dir
+    // );
+    // let sniffles_mrd_vcf = format!(
+    //     "{}/{name}/mrd/Sniffles/{name}_mrd_sniffles.vcf",
+    //     cfg.longreads_results_dir
+    // );
+    // if !std::path::Path::new(&sniffles_vcf).exists() {
+    //     return Err(anyhow!("{sniffles_vcf} is required"));
+    // }
     let nanomonsv_vcf = format!(
         "{}/{name}/diag/nanomonsv/{name}_diag_nanomonsv_PASSED.vcf.gz",
         cfg.longreads_results_dir
@@ -1766,16 +1762,16 @@ pub fn run_pipe(name: &str, multi: &MultiProgress) -> Result<()> {
             &VCFSource::ClairS,
             &VariantType::Somatic,
         ),
-        (
-            sniffles_vcf.as_str(),
-            &VCFSource::Sniffles,
-            &VariantType::Somatic,
-        ),
-        (
-            sniffles_mrd_vcf.as_str(),
-            &VCFSource::Sniffles,
-            &VariantType::Constitutionnal,
-        ),
+        // (
+        //     sniffles_vcf.as_str(),
+        //     &VCFSource::Sniffles,
+        //     &VariantType::Somatic,
+        // ),
+        // (
+        //     sniffles_mrd_vcf.as_str(),
+        //     &VCFSource::Sniffles,
+        //     &VariantType::Constitutionnal,
+        // ),
         (
             nanomonsv_vcf.as_str(),
             &VCFSource::Nanomonsv,