Command-line interface#

smftools#

Command-line interface for smftools.

.. program:: smftools .. rubric:: Usage

.. code-block:: shell

smftools [OPTIONS] COMMAND [ARGS]...

.. rubric:: Options

.. option:: --version

Show the version and exit.

.. option:: --log-file <log_file>

Optional file path to write smftools logs.

.. option:: --log-level <log_level>

Logging level for smftools output.

:default: ``'INFO'``
:options: CRITICAL | ERROR | WARNING | INFO | DEBUG

batch#

Run a TASK (load, preprocess, spatial, variant, hmm) on multiple CONFIG_PATHs listed in a CSV/TSV or plain TXT file.

Plain text format: one config path per line, no header.

.. program:: smftools batch .. rubric:: Usage

.. code-block:: shell

smftools batch [OPTIONS] {load|preprocess|spatial|variant|hmm} CONFIG_TABLE

.. rubric:: Options

.. option:: -c, --column

Column name containing config paths (ignored for plain TXT).

:default: ``'config_path'``

.. option:: --sep

Field separator: default auto-detect (.tsv -> '\t', .csv -> ',', others treated as TXT).

.. rubric:: Arguments

.. option:: TASK

Required argument

.. option:: CONFIG_TABLE

Required argument

chimeric#

Finding putative PCR chimeras

.. program:: smftools chimeric .. rubric:: Usage

.. code-block:: shell

smftools chimeric [OPTIONS] CONFIG_PATH

.. rubric:: Arguments

.. option:: CONFIG_PATH

Required argument

concatenate#

Concatenate multiple .h5ad files into a single output file.

Reads concatenation parameters from an experiment config CSV. Input source (directory or CSV of paths) is configured via concatenate_input_dir / concatenate_csv_path in the config, or overridden with --input-dir / --csv-path.

Output path is auto-detected from the pipeline stage of the input filenames (e.g. *_variant.h5ad → variant output directory). Use --output-path to override.

Example:

smftools concatenate experiment_config.csv

smftools concatenate experiment_config.csv --recompute-pp-vars

smftools concatenate experiment_config.csv --input-dir ./variant_h5ads/

.. program:: smftools concatenate .. rubric:: Usage

.. code-block:: shell

smftools concatenate [OPTIONS] CONFIG_PATH

.. rubric:: Options

.. option:: --recompute-pp-vars

Recompute calculate_coverage and append_base_context after concatenation.

.. option:: -d, --input-dir <input_dir>

Override concatenate_input_dir from config.

.. option:: -c, --csv-path <csv_path>

Override concatenate_csv_path from config.

.. option:: -o, --output-path <output_path>

Explicit output path (overrides stage auto-detection).

.. rubric:: Arguments

.. option:: CONFIG_PATH

Required argument

full#

Workflow: load preprocess spatial variant chimeric hmm latent

.. program:: smftools full .. rubric:: Usage

.. code-block:: shell

smftools full [OPTIONS] CONFIG_PATH

.. rubric:: Arguments

.. option:: CONFIG_PATH

Required argument

hmm#

HMM feature annotations and plotting

.. program:: smftools hmm .. rubric:: Usage

.. code-block:: shell

smftools hmm [OPTIONS] CONFIG_PATH

.. rubric:: Arguments

.. option:: CONFIG_PATH

Required argument

latent#

Latent representations of signal

.. program:: smftools latent .. rubric:: Usage

.. code-block:: shell

smftools latent [OPTIONS] CONFIG_PATH

.. rubric:: Arguments

.. option:: CONFIG_PATH

Required argument

load#

Load raw data into AnnData.

.. program:: smftools load .. rubric:: Usage

.. code-block:: shell

smftools load [OPTIONS] CONFIG_PATH

.. rubric:: Arguments

.. option:: CONFIG_PATH

Required argument

plot-current#

Plot nanopore current traces for specified reads.

.. program:: smftools plot-current .. rubric:: Usage

.. code-block:: shell

smftools plot-current [OPTIONS] CONFIG_PATH

.. rubric:: Arguments

.. option:: CONFIG_PATH

Required argument

preprocess#

Preprocessing.

.. program:: smftools preprocess .. rubric:: Usage

.. code-block:: shell

smftools preprocess [OPTIONS] CONFIG_PATH

.. rubric:: Arguments

.. option:: CONFIG_PATH

Required argument

spatial#

Spatial signal analysis

.. program:: smftools spatial .. rubric:: Usage

.. code-block:: shell

smftools spatial [OPTIONS] CONFIG_PATH

.. rubric:: Arguments

.. option:: CONFIG_PATH

Required argument

subsample-pod5#

Subsample POD5 file(s) by read ID list or random sampling.

.. program:: smftools subsample-pod5 .. rubric:: Usage

.. code-block:: shell

smftools subsample-pod5 [OPTIONS] POD5_PATH

.. rubric:: Options

.. option:: -r, --read-names <read_names>

Text file with one read_id per line.

.. option:: -n, --n-reads <n_reads>

Randomly subsample N reads.

.. option:: -o, --outdir

**Required** Output directory for subsampled POD5.

.. rubric:: Arguments

.. option:: POD5_PATH

Required argument

variant#

Sequence variation analyses

.. program:: smftools variant .. rubric:: Usage

.. code-block:: shell

smftools variant [OPTIONS] CONFIG_PATH

.. rubric:: Arguments

.. option:: CONFIG_PATH

Required argument