refactor(scatter): move logging call into pipeline closure
Add an explicit `PathBuf` type annotation and consolidate the "indexing" info log with the chunk-opening logic. This reduces pipeline boilerplate by keeping the logging directly in the initial stage closure.
This commit is contained in:
@@ -22,11 +22,9 @@ pub fn scatter(
|
||||
use obikseq::RoutableSuperKmer;
|
||||
|
||||
let t = Stage::start("scatter");
|
||||
let path_source = path_source.inspect(|p| info!("indexing: {}", p.display()));
|
||||
|
||||
let pipe = obipipeline::make_pipe! {
|
||||
PipelineData : PathBuf => Vec<RoutableSuperKmer>,
|
||||
||? { |path| open_chunks(path) } : Path => RawChunk,
|
||||
||? { |path: PathBuf| { info!("indexing: {}", path.display()); open_chunks(path) } } : Path => RawChunk,
|
||||
|? { move |rope| obiread::normalize_sequence_chunk(rope, k) } : RawChunk => NormChunk,
|
||||
| { move |rope| obiskbuilder::build_superkmers(rope, k, level_max, theta) }: NormChunk => Batch,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user