|
|
@@ -201,7 +201,10 @@ impl Dorado {
|
|
|
.filter(|id| composition_b.contains(id))
|
|
|
.count();
|
|
|
if n_id > 0 {
|
|
|
- warn!("{} is already merged", self.case.id);
|
|
|
+ warn!(
|
|
|
+ "{} is already merged, reads with the same run_id in the destination BAM.",
|
|
|
+ self.case.id
|
|
|
+ );
|
|
|
return Ok(());
|
|
|
}
|
|
|
|
|
|
@@ -328,7 +331,10 @@ impl Dorado {
|
|
|
"{} trim {bam} | samtools view -h -@ {} -b /dev/stdin -o {trimmed_bam}",
|
|
|
config.align.dorado_bin, &config.align.samtools_view_threads
|
|
|
);
|
|
|
+
|
|
|
+ info!("Running: {pipe}");
|
|
|
cmd!("bash", "-c", pipe).run()?;
|
|
|
+ info!("Trim ✅");
|
|
|
|
|
|
// Align
|
|
|
let aligned_bam = format!(
|
|
|
@@ -348,15 +354,16 @@ impl Dorado {
|
|
|
&config.align.samtools_sort_threads
|
|
|
);
|
|
|
let pipe = format!("{dorado} | {samtools_view} | {samtools_sort}");
|
|
|
- info!("Running {pipe}");
|
|
|
|
|
|
+ info!("Running {pipe}");
|
|
|
cmd!("bash", "-c", pipe).run()?;
|
|
|
+ info!("Alignement ✅");
|
|
|
|
|
|
let d = Dorado::init(case.clone(), config.clone())?;
|
|
|
d.create_directories()?;
|
|
|
|
|
|
if PathBuf::from(&d.bam).exists() {
|
|
|
- info!("merge");
|
|
|
+ info!("Merging");
|
|
|
d.merge_bam(&PathBuf::from(aligned_bam))?;
|
|
|
} else {
|
|
|
info!("Moving from {} to {}", bam, d.bam);
|