Skip to content

[BUG] --auto flag fails on macOS ARM64 with spaces injected around sample name in lrge_estimated_chromosome_size.txt path #155

Description

@suzumar

Hello, I got this after trying to debug with help of an AI tool

Environment:

hybracter v0.12
macOS ARM64
Snakemake 7.32.4
Python 3.12

Command:
bash
hybracter long-single -l all_fastq.gz -s BBCC823 --auto -t 4
Error:
FileNotFoundError: 'hybracter_out/processing/chrom_size/ BBCC823 _lrge_estimated_chromosome_size.txt'
Findings from debugging:

config.args.sample = 'BBCC823' (clean)
SAMPLES = ['BBCC823'] (clean)
dir.out.chrom_size = 'hybracter_out/processing/chrom_size' (clean)
wildcards.sample = 'BBCC823' (clean)
But os.path.join(dir.out.chrom_size, f"{wildcards.sample}_lrge_estimated_chromosome_size.txt") produces 'hybracter_out/processing/chrom_size/ BBCC823 _lrge_estimated_chromosome_size.txt ' with spaces

Both inputs are clean but the joined output has spaces, suggesting an interaction between Snakemake's wildcard object and os.path.join inside a params lambda during DAG construction. lrge is also not available for macOS ARM64 via conda.
Workaround: Run lrge separately and pass result to -c instead of using --auto.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions