feature_annotation/spatial_autocorr
Description
Calculate spatial autocorrelation for genes using Moran's I or Geary's C.
This allows identifying spatially variable genes.
Inputs
Name | Type & Properties | Description |
|---|---|---|
--input | file required | Input h5mu file. |
--modality | string | Modality to use. |
--layer | string | Layer in the AnnData object to use. - If `attr` is 'X', this is the key in `.layers` to use. If not provided, `.X` is used. - If `attr` is 'obsm', this is the key in `.obsm` to use. |
--input_genes | string multiple | The features to calculate autocorrelation for. Meaning depends on `--attr`: - If `attr` is 'X' (default), this must be a list of gene names from `.var_names`. If not provided, it defaults to using genes in `.var['highly_variable']` (if present), or all genes. This behavior can be overridden by setting `--use_all_genes` to `true`. Note: You cannot pass a column name from `.var` here. - If `attr` is 'obs', this must be a list of column names from `.obs`. - If `attr` is 'obsm', this must be indices in `.obsm[layer]` (as strings). |
--obsp_neighborhood_graph | string | Key in .obsp where spatial connectivities are stored. |
--use_all_genes | boolean | Whether to use all genes even if highly variable genes are present in .var. If set to true, all genes will be used. |
Parameters
Name | Type & Properties | Description |
|---|---|---|
--mode | string | Mode of spatial autocorrelation. |
--attr | string | The attribute of the AnnData object to use for calculation. - 'X': Use gene expression data (default). - 'obs': Use cell metadata. - 'obsm': Use multidimensional embeddings. |
--n_perms | integer | Number of permutations for p-value calculation. |
--use_raw | boolean | Whether to use .raw attribute of AnnData. |
Outputs
Name | Type & Properties | Description |
|---|---|---|
--output | file required output | Output h5mu file with results in .uns. |
Run this component
Run the following command to execute this component with Nextflow:
cat > params.yaml <<'EOM'
modality: [ "rna" ]
obsp_neighborhood_graph: [ "spatial_connectivities" ]
use_all_genes: [ false ]
mode: [ "moran" ]
attr: [ "X" ]
n_perms: [ 100 ]
use_raw: [ false ]
output: "$id.$key.output"
id: "run"
publish_dir: "output/"
EOM
nextflow run https://packages.viash-hub.com/vsh/openpipeline_spatial.git \
-revision v0.7.0 \
-main-script target/nextflow/feature_annotation/spatial_autocorr/main.nf \
-params-file params.yaml Relationships
Used by
0 relationships
No components use this component.
Current component
feature_annotation/spatial_autocorropenpipeline_spatial v0.7.0
Uses
0 relationships
No component dependencies found.