Command reference¶
scfoundry is one command with sub-commands. Task commands (download, check,
embed, transfer, finetune, benchmark, geometry) launch Nextflow; the others (init,
list, runs, info) never do.
usage: scfoundry [-h] [--version] <command> ...
init create a workspace (nextflow.config, data/, cache/, results/, runs/) and check the environment
download Download pretrained model checkpoints
check Check .h5ad files against the input contract (advisory report)
embed Zero-shot cell embeddings
transfer Label transfer with frozen embeddings (prototype / knn / logreg / mlp)
finetune Supervised fine-tuning (parameter updates) / prediction
benchmark Score embeddings (biological conservation, batch mixing)
geometry Representation-geometry probes of embeddings
list list methods or tasks
runs list recorded runs of the workspace
info show version, pipeline and workspace locations
scfoundry <command> --help prints the options of any command.
init¶
scfoundry init [--runtime {apptainer,singularity,docker}] [--gpu-id N] [--force] [--nextflow PATH] [directory]
Creates the workspace directories, writes nextflow.config from the bundled template with
the chosen runtime enabled, writes the .scfoundry.json marker, and reports what it finds
on the machine: Nextflow, the container runtime, nvidia-smi, Python. The directory
defaults to the current one. --force rewrites nextflow.config in an existing workspace;
--gpu-id seeds params.gpu_id.
Task commands¶
Task-specific options¶
Command |
Options |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Each is described on its task page: embed, transfer, finetune, benchmark, geometry, download, check.
Forwarding pipeline parameters¶
Any --option a task command does not recognise is forwarded to Nextflow as a pipeline
parameter, with a warning so that typos are visible:
scfoundry embed --method scfoundation --data cells.h5ad --scfoundation_pool_type max
[scfoundry] warning: forwarding unrecognised option(s) to Nextflow as parameters: --scfoundation_pool_type=max
Values are typed the way Nextflow would type them: 32 becomes an integer, true a
boolean, null a null, anything else a string. A bare --flag is true. The parameters
every method accepts are listed in the parameter reference.
Arguments after -- are passed verbatim to nextflow run, for Nextflow’s own options:
scfoundry embed --method scgpt --data cells.h5ad -- -with-report report.html -with-trace trace.txt
Exit status and output¶
A task command exits with Nextflow’s exit code. Its last lines name the run directory,
which holds params.json, command.sh, run.json and nextflow.log:
[scfoundry] task=embed method=scgpt input=colon_1000
[scfoundry] workspace: /home/you/my_project
[scfoundry] run directory: runs/embed/20260828-162920_scgpt_colon_1000
[scfoundry] done (ok).
On failure the line reads warning: nextflow exited with code 1; see .../nextflow.log
and the work directory of the failed task survives for inspection — see
Troubleshooting.
list¶
scfoundry list methods # every method: id, name, category, gpu, tasks, container
scfoundry list methods --task finetune # only methods supporting one task
scfoundry list tasks
method name category gpu tasks container
c2s C2S zero-shot yes download,embed,transfer housy17/c2s:latest
cellama CELLama zero-shot yes download,embed,transfer,finetune housy17/cellama:latest
...
pca PCA reference no embed housy17/scllms:latest
harmony Harmony integration no embed satijalab/seurat:5.5.0
runs¶
scfoundry runs [--task TASK] [--limit N]
Lists the run directories of the workspace, newest first, from their run.json: start
time, task, method, status, exit code and path.
info¶
scfoundry info
scfoundry 0.2.0
pipeline /home/you/.conda/envs/nf-env/lib/python3.12/site-packages/scfoundry/pipeline
nextflow 25.10.0.5972 (/home/you/.conda/envs/nf-env/bin/nextflow)
workspace /home/you/my_project
config /home/you/my_project/nextflow.config
Environment variables¶
Variable |
Effect |
|---|---|
|
Default workspace when |
|
The Nextflow executable to use. |
|
Pipeline directory to run instead of the bundled one. For developing the pipeline. |
|
Set to |
Running Nextflow directly¶
scfoundry is a thin launcher around one Nextflow entry point, and there is nothing it
can do that a direct call cannot — useful for CI, or for a pipeline developer:
export NXF_SYNTAX_PARSER=v1
export SCFOUNDRY_WORKSPACE=$PWD # where data/, cache/ and results/ live
PIPELINE=$(scfoundry info | awk '/^pipeline/{print $2}')
nextflow run "$PIPELINE/main.nf" -c nextflow.config \
--task embed --method scgpt --data cells.h5ad
--task selects the workflow; every other --parameter is as in the
parameter reference. The entry points of the first release
(embed_by_scfm.nf, fewshot_by_scfm.nf, finetune_by_scfm.nf,
download_model_weights.nf) still run from a repository checkout but print a deprecation
notice.