neighbors/find_neighbors
Description
Compute a neighborhood graph of observations [McInnes18].
The neighbor search efficiency of this heavily relies on UMAP [McInnes18], which also provides a method for estimating connectivities of data points - the connectivity of the manifold (method=='umap'). If method=='gauss', connectivities are computed according to [Coifman05], in the adaption of [Haghverdi16].
Arguments
Name | Type & Properties | Description |
|---|---|---|
--input -i | 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 PCA embedding. |
--output -o | file output | Output h5mu file containing the found neighbors. |
--uns_output | string | Mandatory .uns slot to store various neighbor output objects. |
--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. |
--metric | string | The distance metric to be used in the generation of the nearest neighborhood network. |
--num_neighbors | integer | The size of 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. If knn is True, number of nearest neighbors to be searched. If knn is False, a Gaussian kernel width is set to the distance of the n_neighbors neighbor. |
--seed | integer | A random seed. |
--output_compression | string | Compression format to use for the output AnnData and/or Mudata objects. By default no compression is applied. |
Run this component
Run the following command to execute this component with Nextflow:
cat > params.yaml <<'EOM'
modality: [ "rna" ]
obsm_input: [ "X_pca" ]
output: "$id.$key.output.h5mu"
uns_output: [ "neighbors" ]
obsp_distances: [ "distances" ]
obsp_connectivities: [ "connectivities" ]
metric: [ "euclidean" ]
num_neighbors: [ 15 ]
seed: [ 0 ]
id: "run"
publish_dir: "output/"
EOM
nextflow run https://packages.viash-hub.com/vsh/openpipeline.git \
-revision v4.0.0 \
-main-script target/nextflow/neighbors/find_neighbors/main.nf \
-params-file params.yaml Relationships
Used by
1 relationships
Current component
neighbors/find_neighborsopenpipeline v4.0.0
Uses
0 relationships
No component dependencies found.