You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
copykat-py and copykat_matrix exit with status 1 after a successful run.
To reproduce (any input that completes normally):
copykat-py --input matrix.mtx --genes genes.tsv --barcodes barcodes.tsv \
--sample-name s --output-dir out --no-plot-genes
echo$?# prints 1
All output files are written correctly. The same happens with copykat_matrix; copykat-py-plot is not affected.
Why it matters: workflow managers and job schedulers (Snakemake, Nextflow, SLURM job dependencies, && chains in shell scripts) treat a non-zero exit status as a failure, so every successful run is reported as failed. run_copykat_py.sh passes the status through too.
Cause:main() and matrix_main() in copykat_py/cli.py return the result dict from _run_copykat_analysis(). The console scripts that pip/setuptools generate for [project.scripts] call sys.exit(main()), and sys.exit() given a non-integer exits with status 1 (after printing the value to stderr, which is the visible symptom: the result dict appears on the terminal at the end of every run).
Proposed fix: have the two entry points not return the result. Python callers who want the results already get them from copykat() and copykat_anndata(), which are unchanged. Fixed in #3: both commands then exit 0, a failing run (e.g. a missing input file) still exits 1, and all output files are byte-identical.
changed the title [-]CLI exits with status 1 and prints the result dict to stderr after a successful run[/-][+]CLI exits with status 1 after a successful run[/+]on Oct 8, 2026
Activity
Don't return the result dict from the CLI entry points
[-]CLI exits with status 1 and prints the result dict to stderr after a successful run[/-][+]CLI exits with status 1 after a successful run[/+]