|
|
@@ -817,16 +817,16 @@ pub fn read_sm_tag_or_inject(
|
|
|
// At least one @RG line missing SM — inject into those
|
|
|
info!("Some @RG lines in {bam_path} lack SM tag, injecting SM:{fallback_sample}");
|
|
|
|
|
|
- let original_mtime = filetime::FileTime::from_last_modification_time(
|
|
|
- &std::fs::metadata(bam_path)?,
|
|
|
- );
|
|
|
-
|
|
|
- let mut reheader = SamtoolsReheader::from_config(config, bam_path, fallback_sample);
|
|
|
- reheader.run()?;
|
|
|
- let mut index = SamtoolsIndex::from_config(config, bam_path);
|
|
|
- index.run()?;
|
|
|
-
|
|
|
- filetime::set_file_mtime(bam_path, original_mtime)?;
|
|
|
+ // let original_mtime = filetime::FileTime::from_last_modification_time(
|
|
|
+ // &std::fs::metadata(bam_path)?,
|
|
|
+ // );
|
|
|
+ //
|
|
|
+ // let mut reheader = SamtoolsReheader::from_config(config, bam_path, fallback_sample);
|
|
|
+ // reheader.run()?;
|
|
|
+ // let mut index = SamtoolsIndex::from_config(config, bam_path);
|
|
|
+ // index.run()?;
|
|
|
+ //
|
|
|
+ // filetime::set_file_mtime(bam_path, original_mtime)?;
|
|
|
|
|
|
return Ok(first_sm.unwrap_or_else(|| fallback_sample.to_string()));
|
|
|
}
|