Skip to content

Commit 5ce9fde

Browse files
authored
Update sample retrieval logic based on reassembly flag
Refactor sample retrieval logic to handle no reassembly case.
1 parent 2e748e0 commit 5ce9fde

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/main.rs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,19 @@ fn main() -> io::Result<()> {
190190
}
191191

192192
// Get sample list
193-
let bin_sample_map: HashMap<String, String> = utility::get_sample_names(&bindir,&format)?;
194-
let sample_count= bin_sample_map.values().collect::<HashSet<_>>().len();
195-
info!("{:?} bin files and {:?} samples found", binfiles.len(), sample_count);
193+
// let bin_sample_map: HashMap<String, String> = utility::get_sample_names(&bindir,&format)?;
194+
// let sample_count= bin_sample_map.values().collect::<HashSet<_>>().len();
195+
// info!("{:?} bin files and {:?} samples found", binfiles.len(), sample_count);
196+
let bin_sample_map: HashMap<String, String> = if no_reassembly {
197+
HashMap::new()
198+
} else {
199+
utility::get_sample_names(&bindir, &format)?
200+
};
201+
202+
if !no_reassembly {
203+
let sample_count= bin_sample_map.values().collect::<HashSet<_>>().len();
204+
info!("{:?} bin files and {:?} samples found", binfiles.len(), sample_count);
205+
}
196206

197207
// Obtain quality of bins
198208
// eg: checkm2_outputpath = <parentpathof_bindir>/mags_90comp_95purity/checkm2_results/

0 commit comments

Comments
 (0)