feat: add --force-copy flag to copy files instead of hard-linking
Introduces the `--force-copy` CLI argument to bypass hard-linking during selection. When enabled, unchanged kmer-identity files are copied instead of hard-linked to ensure output independence from the source filesystem. The default behavior remains unchanged, continuing to use hard-links with automatic fallback to copying on failure.
This commit is contained in:
1 parent
caf59b5658
commit
7363370065
3 files changed
+46
-8
No files matched your search
@@ -70,6 +70,17 @@ pub struct SelectArgs {
|
||||
/// Overwrite existing output directory
|
||||
#[arg(short, long)]
|
||||
pub force: bool,
|
||||
|
||||
/// Copy each layer's unchanged kmer-identity files (mphf/unitigs/
|
||||
/// evidence/fingerprint) instead of hard-linking them. By default
|
||||
/// `select` hard-links these (never rewritten by a column
|
||||
/// projection/aggregation, so a hard link is exact and avoids
|
||||
/// transiently doubling disk usage for a large index), falling back to
|
||||
/// a real copy only if linking itself fails (e.g. source and output on
|
||||
/// different filesystems). Set this when the output must survive
|
||||
/// independently of the source on disk.
|
||||
#[arg(long)]
|
||||
pub force_copy: bool,
|
||||
}
|
||||
|
||||
/// Split a repeatable `<name>:<value>` argument. Exits on malformed input.
|
||||
@@ -128,6 +139,7 @@ pub fn run(args: SelectArgs) {
|
||||
let mut alg = Select::new(&src, &args.output, &specs, output_presence)
|
||||
.threshold(args.presence_threshold)
|
||||
.force(args.force)
|
||||
.force_copy(args.force_copy)
|
||||
.sparse(!args.dense)
|
||||
.on_progress(|_: Progress| pb.inc(1));
|
||||
|
||||
|
||||
Reference in new issue
Block a user