Ver Fonte

unactivate reheader

Thomas há 1 semana atrás
pai
commit
841fa84fa2
3 ficheiros alterados com 11 adições e 11 exclusões
  1. 1 1
      src/collection/bam_stats.rs
  2. 5 5
      src/collection/prom_run.rs
  3. 5 5
      src/commands/samtools.rs

+ 1 - 1
src/collection/bam_stats.rs

@@ -1359,7 +1359,7 @@ mod tests {
 
         let config = Config::default();
 
-        let stats = WGSBamStats::open("CHALO", "diag", &config)?;
+        let stats = WGSBamStats::open("CHAHA", "diag", &config)?;
         println!("{stats}");
         // let stats = WGSBamStats::open("36434", "norm", &config)?;
         // println!("{stats}");

+ 5 - 5
src/collection/prom_run.rs

@@ -1416,11 +1416,11 @@ fn create_new_final(source: &Path, destination: &Path, case: &IdInput, config: &
     atomic_replace(source, destination)?;
 
     // Adding SM tag in BAM without (if not demultiplexed if so it should be the barcode name)
-    let _ = read_sm_tag_or_inject(
-        &destination.to_string_lossy(),
-        &format!("{}_{}", case.case_id, case.sample_type),
-        config,
-    )?;
+    // let _ = read_sm_tag_or_inject(
+    //     &destination.to_string_lossy(),
+    //     &format!("{}_{}", case.case_id, case.sample_type),
+    //     config,
+    // )?;
 
     index_bam(destination, config)
         .with_context(|| format!("Failed to index final BAM: {}", destination.display()))?;

+ 5 - 5
src/commands/samtools.rs

@@ -10,10 +10,7 @@ use log::{debug, info};
 use uuid::Uuid;
 
 use crate::{
-    collection::bam_stats::{QNameSet, WGSBamStats},
-    commands::{LocalBatchRunner, LocalRunner, SbatchRunner, SlurmParams, SlurmRunner},
-    config::Config,
-    runners::Run,
+    collection::bam_stats::{QNameSet, WGSBamStats}, commands::{LocalBatchRunner, LocalRunner, SbatchRunner, SlurmParams, SlurmRunner}, config::Config, run, runners::Run
 };
 
 /// Wrapper around a `samtools index` invocation.
@@ -119,6 +116,7 @@ pub struct SamtoolsReheader {
     /// Sample name to inject as `SM:<sample>` in all `@RG` lines.
     pub sample: String,
     slurm: bool,
+    config: Config,
 }
 
 impl super::Command for SamtoolsReheader {
@@ -172,6 +170,7 @@ impl SamtoolsReheader {
             bam: bam.to_string(),
             sample: sample.to_string(),
             slurm: config.slurm_runner,
+            config: config.clone(),
         }
     }
 }
@@ -179,7 +178,8 @@ impl SamtoolsReheader {
 impl Run for SamtoolsReheader {
     fn run(&mut self) -> anyhow::Result<()> {
         if self.slurm {
-            let _output = SlurmRunner::exec(self)?;
+            run!(&self.config, self)?;
+            // let _output = SlurmRunner::exec(self)?;
         } else {
             let _output = LocalRunner::exec(self)?;
         }