wrappers/tools/leiden
Description
Cluster cells using the Leiden algorithm, running either the GPU
(rapids-singlecell) or the CPU (scanpy) variant of leiden, selected
with --device_type. Requires a precomputed neighbor graph.
Inputs
Name | Type & Properties | Description |
|---|---|---|
--input | file required | Input h5mu file. |
--modality | string | Which modality from the input MuData file to process. |
--obsp_connectivities | string | In which .obsp slot the neighbor connectivities can be found. |
Compute
Name | Type & Properties | Description |
|---|---|---|
--device_type | string | Which implementation to run: the GPU (rapids-singlecell) variant or the CPU (scanpy/squidpy) variant of the component. Selecting `gpu` requires a CUDA-capable GPU; the component errors out if none is available (there is no automatic fallback to CPU). |
Outputs
Name | Type & Properties | Description |
|---|---|---|
--output | file required output | Output h5mu file. |
--obsm_name | string | Name of the .obsm key under which to add the cluster labels. The name of the columns in the matrix will correspond to the resolutions. |
--output_compression | string | Compression format to use for the output AnnData and/or Mudata objects. By default no compression is applied. |
Options
Name | Type & Properties | Description |
|---|---|---|
--resolution | double required multiple | A parameter value controlling the coarseness of the clustering. Higher values lead to more clusters. Multiple values will result in clustering being performed multiple times. |
--n_iterations | integer | Maximum number of iterations/levels of the Leiden algorithm. The algorithm will terminate after no more than this many iterations. |
--random_state | integer | Random seed to initialise the optimization. Use this to increase reproducibility. |
rapids-singlecell options
Name | Type & Properties | Description |
|---|---|---|
--theta | double | Scales modularity gain in the Leiden refinement phase, used to compute the probability of joining a random Leiden community. |
--use_weights | boolean | If true, edge weights from the graph are used in the computation (placing more emphasis on stronger edges). |
Scanpy options
Name | Type & Properties | Description |
|---|---|---|
--flavor | string | Which package's implementation to use. |
Run this component
Run the following command to execute this component with Nextflow:
cat > params.yaml <<'EOM'
modality: [ "rna" ]
obsp_connectivities: [ "connectivities" ]
device_type: [ "gpu" ]
output: "$id.$key.output.h5mu"
obsm_name: [ "leiden" ]
resolution: [ 1 ]
n_iterations: [ 100 ]
random_state: [ 0 ]
theta: [ 1 ]
use_weights: [ true ]
flavor: [ "leidenalg" ]
id: "run"
publish_dir: "output/"
EOM
nextflow run https://packages.viash-hub.com/vsh/openpipeline_rapids.git \
-revision v0.1.3 \
-main-script target/nextflow/wrappers/tools/leiden/main.nf \
-params-file params.yaml Relationships
Used by
0 relationships
No components use this component.
Current component
wrappers/tools/leidenopenpipeline_rapids v0.1.3
Uses
2 relationships