Command Line Interface

BayesTME provides a suite of command line utilities that allow users to script running the pipeline end to end.

These commands will be available on the path in the python environment in which the bayestme package is installed.

load_spaceranger

filter_genes

This command will create a new SpatialExpressionDataset that has genes filtered according to adjustable criteria. One or more of the criteria can be specified.

Filter genes from dataset based on one or more criteria

usage: filter_genes [-h] [--adata ADATA] [--output OUTPUT]
                    [--filter-ribosomal-genes]
                    [--n-top-by-standard-deviation N_TOP_BY_STANDARD_DEVIATION]
                    [--spot-threshold SPOT_THRESHOLD]
                    [--expression-truth EXPRESSION_TRUTH] [-v]

Named Arguments

--adata

Input AnnData in h5 format

--output

Output file, AnnData in h5 format containing the bleed corrected counts

--filter-ribosomal-genes

Filter ribosomal genes (based on gene name regex)

Default: False

--n-top-by-standard-deviation

Use the top N genes with the highest spatial variance.

--spot-threshold

Filter genes appearing in greater than the provided threshold of tissue spots.

--expression-truth

Anndata h5ad file with reference scRNA data.

-v, --verbose

Enable verbose logging

Default: False

bleeding_correction

phenotype_selection

deconvolve

select_marker_genes

Perform marker gene selection

usage: select_marker_genes [-h] [--adata ADATA] [--adata-output ADATA_OUTPUT]
                           [-i] [--deconvolution-result DECONVOLUTION_RESULT]
                           [--n-marker-genes N_MARKER_GENES] [--alpha ALPHA]
                           [--marker-gene-method {TIGHT,BEST_AVAILABLE,FALSE_DISCOVERY_RATE}]
                           [-v]

Named Arguments

--adata

Input file, AnnData in h5 format

--adata-output

A new AnnData in h5 format created with the deconvolution summary results appended.

-i, --inplace

If provided, append deconvolution summary results to the –adata archive in place

Default: False

--deconvolution-result

Input file, DeconvolutionResult in h5 format

--n-marker-genes

Maximum number of marker genes per cell type.

Default: 10

--alpha

Alpha cutoff for choosing marker genes.

Default: 0.05

--marker-gene-method

Possible choices: TIGHT, BEST_AVAILABLE, FALSE_DISCOVERY_RATE

Method for choosing marker genes.

Default: BEST_AVAILABLE

-v, --verbose

Enable verbose logging

Default: False

spatial_transcriptional_programs

Plotting

Creating plots is separated into separate commands:

plot_bleeding_correction

plot_deconvolution