wrappers/preprocessing/neighbors
Description
Compute a nearest-neighbor graph of observations, running either the GPU
(rapids-singlecell) or the CPU (scanpy) variant of neighbors, selected
with --device_type.
Inputs
Name | Type & Properties | Description |
|---|---|---|
--input | file required | Input h5mu file. |
--modality | string | Which modality from the input MuData file to process. |
--obsm_input | string | Which .obsm slot to use as a starting embedding (use_rep). |
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 containing the found neighbors. |
--uns_output | string | In which .uns slot to store the neighbor graph metadata. |
--obsp_distances | string | In which .obsp slot to store the distance matrix between the resulting neighbors. |
--obsp_connectivities | string | In which .obsp slot to store the connectivities matrix between the resulting neighbors. |
--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 |
|---|---|---|
--num_neighbors | integer | The size of the local neighborhood (in terms of number of neighboring data points) used for manifold approximation. Larger values result in more global views of the manifold, while smaller values result in more local data being preserved. In general values should be in the range 2 to 100. |
--metric | string | The distance metric to use. Restricted to the metrics supported by both the CPU (scanpy) and GPU (rapids-singlecell) backends, so the value is valid regardless of --device_type. Each backend supports further metrics on its own, but only this common set is exposed here to keep the two variants interchangeable. |
--random_state | integer | A random seed. |
rapids-singlecell options
Name | Type & Properties | Description |
|---|---|---|
--n_pcs | integer | Number of dimensions of the `--obsm_input` representation to use. If not set, all available dimensions are used. |
--algorithm | string | The KNN query algorithm to use (provided by cuVS). See https://docs.rapids.ai/api/cuvs/stable/ for details. |
--method | string | Method for computing connectivities. 'umap' uses the UMAP fuzzy simplicial set, 'gauss' uses an adaptive Gaussian kernel, 'jaccard' uses the PhenoGraph Jaccard index. |
Run this component
Run the following command to execute this component with Nextflow:
cat > params.yaml <<'EOM'
modality: [ "rna" ]
obsm_input: [ "X_pca" ]
device_type: [ "gpu" ]
output: "$id.$key.output.h5mu"
uns_output: [ "neighbors" ]
obsp_distances: [ "distances" ]
obsp_connectivities: [ "connectivities" ]
num_neighbors: [ 15 ]
metric: [ "euclidean" ]
random_state: [ 0 ]
algorithm: [ "brute" ]
method: [ "umap" ]
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/preprocessing/neighbors/main.nf \
-params-file params.yaml Relationships
Used by
0 relationships
No components use this component.
Current component
wrappers/preprocessing/neighborsopenpipeline_rapids v0.1.3