|
|
@@ -171,13 +171,14 @@ impl Initialize for SomaticPipe {
|
|
|
}
|
|
|
|
|
|
impl ShouldRun for SomaticPipe {
|
|
|
-
|
|
|
fn should_run(&self) -> bool {
|
|
|
// path to the existing “.bit” file
|
|
|
- let bit_path = self
|
|
|
- .config
|
|
|
- .tumoral_dir(&self.id)
|
|
|
- .join(format!("{}_somatic_variants.bit", self.id));
|
|
|
+ let tumoral_dir = self.config.tumoral_dir(&self.id);
|
|
|
+ let bit_path = format!("{}/{}_somatic_variants.bit", tumoral_dir, self.id);
|
|
|
+ // let bit_path = self
|
|
|
+ // .config
|
|
|
+ // .tumoral_dir(&self.id)
|
|
|
+ // .join(format!("{}_somatic_variants.bit", self.id));
|
|
|
|
|
|
// if we can’t read its modification time, re-run
|
|
|
let res_meta = match fs::metadata(&bit_path).and_then(|m| m.modified()) {
|
|
|
@@ -186,8 +187,10 @@ impl ShouldRun for SomaticPipe {
|
|
|
};
|
|
|
|
|
|
// if *either* BAM is newer than the .bit, or we can’t stat it, re-run
|
|
|
- [ self.config.normal_bam(&self.id),
|
|
|
- self.config.tumoral_bam(&self.id) ]
|
|
|
+ [
|
|
|
+ self.config.normal_bam(&self.id),
|
|
|
+ self.config.tumoral_bam(&self.id),
|
|
|
+ ]
|
|
|
.iter()
|
|
|
.any(|bam| {
|
|
|
fs::metadata(bam)
|