Эх сурвалжийг харах

added SomaticScan in callers pipe

Thomas 6 өдөр өмнө
parent
commit
6a81179dfb

+ 8 - 1
src/callers/mod.rs

@@ -144,7 +144,7 @@ use crate::{
     commands::longphase::run_phasing_somatic,
     config::Config,
     pipes::{Initialize, InitializeSolo},
-    runners::Run,
+    runners::Run, scan::scan::SomaticScan,
 };
 
 pub mod clairs;
@@ -233,6 +233,13 @@ pub fn run_somatic_callers(id: &str, config: &Config) -> anyhow::Result<()> {
         let id: Arc<str> = Arc::from(id);
 
         let handles = vec![
+            {
+                let config = Arc::clone(&config);
+                let id = Arc::clone(&id);
+                thread::spawn(move || -> anyhow::Result<()> {
+                    SomaticScan::initialize(&id, &config)?.run()
+                })
+            },
             {
                 let config = Arc::clone(&config);
                 let id = Arc::clone(&id);

+ 0 - 5
src/commands/longphase.rs

@@ -305,11 +305,6 @@ impl Run for LongphaseHap {
             fs::create_dir_all(&self.log_dir).context("Failed to create output directory.")?;
         }
 
-        if self.bam_hp.exists() {
-            info!("Longphase output bam already exists.");
-            return Ok(());
-        }
-
         if self.config.slurm_runner {
             // Chunked, per-chromosome haplotag on SLURM, then merge + index
             self.run_chunked_slurm()?;