Przeglądaj źródła

rm lock in chunked run fn

Thomas 1 tydzień temu
rodzic
commit
93f5594588
3 zmienionych plików z 10 dodań i 18 usunięć
  1. 0 8
      src/callers/clairs.rs
  2. 7 7
      src/callers/deep_somatic.rs
  3. 3 3
      src/callers/deep_variant.rs

+ 0 - 8
src/callers/clairs.rs

@@ -861,16 +861,8 @@ pub fn merge_haplotaged_tmp_bam(config: &Config, id: &str) -> anyhow::Result<()>
 pub fn run_clairs_chunked(id: &str, config: &Config, n_parts: usize) -> anyhow::Result<()> {
     anyhow::ensure!(n_parts > 0, "run_clairs_chunked: n_parts must be > 0");
 
-    let lock_dir = format!("{}/locks", config.result_dir);
-    let _lock = SampleLock::acquire(&lock_dir, id, "clairs")
-        .with_context(|| format!("Cannot start ClairS chunked for {}", id))?;
-
     let base = ClairS::initialize(id, config)?;
 
-    if !base.should_run() {
-        debug!("ClairS PASS VCF already up-to-date for {id}, skipping.");
-        return Ok(());
-    }
 
     let normal_bam = config.normal_bam(id);
     let reader = bam::Reader::from_path(&normal_bam)

+ 7 - 7
src/callers/deep_somatic.rs

@@ -594,16 +594,16 @@ pub fn run_deepsomatic_chunked(id: &str, config: &Config, n_parts: usize) -> any
     anyhow::ensure!(n_parts > 0, "n_parts must be > 0");
 
     // Lock at the chunked level (caller may have already locked, but this is idempotent protection)
-    let lock_dir = format!("{}/locks", config.result_dir);
-    let _lock = SampleLock::acquire(&lock_dir, id, "deepsomatic")
-        .with_context(|| format!("Cannot start DeepSomatic chunked for {}", id))?;
+    // let lock_dir = format!("{}/locks", config.result_dir);
+    // let _lock = SampleLock::acquire(&lock_dir, id, "deepsomatic")
+    //     .with_context(|| format!("Cannot start DeepSomatic chunked for {}", id))?;
 
     let base = DeepSomatic::initialize(id, config)?;
 
-    if !base.should_run() {
-        debug!("DeepSomatic PASS VCF already up-to-date for {id}, skipping.");
-        return Ok(());
-    }
+    // if !base.should_run() {
+    //     debug!("DeepSomatic PASS VCF already up-to-date for {id}, skipping.");
+    //     return Ok(());
+    // }
 
     // Get genome sizes from tumor BAM header
     let tumor_bam = config.tumoral_bam(id);

+ 3 - 3
src/callers/deep_variant.rs

@@ -793,9 +793,9 @@ pub fn run_deepvariant_chunked(
 ) -> anyhow::Result<()> {
     anyhow::ensure!(n_parts > 0, "n_parts must be > 0");
 
-    let lock_dir = format!("{}/locks", config.result_dir);
-    let _lock = SampleLock::acquire(&lock_dir, id, "deepvariant")
-        .with_context(|| format!("Cannot start DeepVariant chunked for {}", id))?;
+    // let lock_dir = format!("{}/locks", config.result_dir);
+    // let _lock = SampleLock::acquire(&lock_dir, id, "deepvariant")
+    //     .with_context(|| format!("Cannot start DeepVariant chunked for {}", id))?;
 
     let base = DeepVariant::initialize(id, time_point, config)?;