Use a local virtual environment:
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install -e .[dev]This project packages the Python-side workflow logic, but still expects the external RNA analysis toolchain to be installed separately and available on PATH.
There are two workflow entry points in the repository:
snakefile: workflow source of truthconfig.yaml: default workflow config source of truth
The packaged CLI rnaconsnake-run invokes workflow files copied from those root files at build time. In editable development installs, the CLI falls back to the root workflow files directly.
For repository-local use without shell-activating a virtual environment, the root launcher rnaconsnake-run executes python -m rnaconsnake.cli with PYTHONPATH=src and automatically prefers ./.venv/bin/python when it exists.
Important preprocessing knobs in config.yaml:
remove_gaponly_gapratioMaximum allowed gap fraction per sequence.remove_gaponly_max_nMaximum allowed count ofN/ncharacters per sequence. The default is0, which removes any sequence containing ambiguousNbases.do_rscapeEnable optional per-hitR-scapeanalysis and summary integration.
pytest -v
rnaconsnake-run --input-alignment /path/to/input.stk --output-dir /path/to/run_dir
rnaconsnake-run --check-deps
rnaconsnake-run --versionExample CLI override for window sizes:
rnaconsnake-run --input-alignment /path/to/input.stk --maxbpspan 150 --maxbpspan 250 --cores allOptional R-scape branch:
rnaconsnake-run --input-alignment /path/to/input.stk --rscape --cores all
rnaconsnake-run --check-deps --rscapeRNAz defaults to -d -n, so alignment shuffling is disabled unless explicitly requested. To allow shuffling for a run:
rnaconsnake-run --input-alignment /path/to/input.stk --rnaz-shuffle --cores allTo inspect which external tool commands RNAConSnake is configured to use, and where their executables resolve on the current machine, run:
rnaconsnake-run --show-tool-pathsStructured export can be triggered from the main CLI after a successful workflow run:
rnaconsnake-run \
--input-alignment /path/to/input.stk \
--output-dir /path/to/run_dir \
--export-bundle /path/to/export_bundle \
--cores allThe test suite lives in tests/test_python_tools.py.
Fixtures are split into two groups:
tests/fixtures: small synthetic fixtures for focused tool behaviortests/fixtures/real: small real-derived fixtures curated from repository input and workflow output data
The real-derived fixtures are intended to stay small enough for CI while still guarding against formatting and behavior regressions in the Stockholm helper tools.
The suite also includes an end-to-end Snakemake smoke test that stubs the external workflow toolchain with temporary fake executables on PATH. That keeps CI independent of the real binaries while still exercising the packaged workflow DAG.
To verify that two completed runs generated and processed the same deterministic candidate set from the same input alignment, run:
python -m rnaconsnake.tools.verify_run_consistency /path/to/run_a /path/to/run_bThis checks:
Lalifold/len_*/RC_*_0001.stk- split manifests and per-candidate split Stockholm files
- cleaned alignment manifests and per-candidate files under
generated_files/stk
It deliberately does not compare stochastic downstream metrics such as alifoldz z-scores.
RNAConSnake should remain the scientific computation and export layer only. Any future HTML browser UI should remain outside the scope of this repository.
Current release model:
- Python package via
pyproject.toml - Snakemake orchestration
- root workflow files copied into the package at build time
- ViennaRNA and legacy post-processing commands as external runtime dependencies
Planned future direction:
- loosen the hard external dependency on
RNALalifold - evaluate wrapping ViennaRNA Python bindings directly from Python