dimred/densmap
Description
A modification of UMAP that adds an extra cost term in order to preserve information
about the relative local density of the data. It is performed on the same inputs as UMAP.
Inputs
Name | Type & Properties | Description |
|---|---|---|
--input | file required | Input h5mu file |
--modality | string | Which modality from the input MuData file to process. |
--uns_neighbors | string | The `.uns` neighbors slot as output by the `find_neighbors` component. |
--obsm_pca | string required | The slot in `.obsm` where the PCA results are stored. |
Outputs
Name | Type & Properties | Description |
|---|---|---|
--output -o | file required output | Output h5mu file. |
--obsm_output | string | The .obsm key to use for storing the densMAP results.. |
--output_compression | string | Compression format to use for the output AnnData and/or Mudata objects. By default no compression is applied. |
Arguments UMAP
Name | Type & Properties | Description |
|---|---|---|
--min_dist | double | The effective minimum distance between embedded points. Smaller values will result in a more clustered/clumped embedding where nearby points on the manifold are drawn closer together, while larger values will result on a more even dispersal of points. The value should be set relative to the spread value, which determines the scale at which embedded points will be spread out. |
--spread | double | The effective scale of embedded points. In combination with `min_dist` this determines how clustered/clumped the embedded points are. |
--num_components | integer | The number of dimensions of the embedding. |
--max_iter | integer | The number of iterations (epochs) of the optimization. Called `n_epochs` in the original UMAP. Default is set to 500 if neighbors['connectivities'].shape[0] <= 10000, else 200. |
--alpha | double | The initial learning rate for the embedding optimization. |
--gamma | double | Weighting applied to negative samples in low dimensional embedding optimization. Values higher than one will result in greater weight being given to negative samples. |
--negative_sample_rate | integer | The number of negative samples to select per positive sample in the optimization process. Increasing this value will result in greater repulsive force being applied, greater optimization cost, but slightly more accuracy. |
--init_pos | string | How to initialize the low dimensional embedding. Called `init` in the original UMAP. Options are: * Any key from `.obsm` * `'paga'`: positions from `paga()` * `'spectral'`: use a spectral embedding of the graph * `'random'`: assign initial embedding positions at random. |
Arguments densMAP
Name | Type & Properties | Description |
|---|---|---|
--lambda | double | Controls the regularization weight of the density correlation term in densMAP. Higher values prioritize density preservation over the UMAP objective, and vice versa for values closer to zero. Setting this parameter to zero is equivalent to running the original UMAP algorithm. |
--fraction | double | Controls the fraction of epochs (between 0 and 1) where the density-augmented objective is used in densMAP. The first (1 - dens_frac) fraction of epochs optimize the original UMAP objective before introducing the density correlation term. |
--var_shift | double | A small constant added to the variance of local radii in the embedding when calculating the density correlation objective to prevent numerical instability from dividing by a small number. |
Run this component
Run the following command to execute this component with Nextflow:
cat > params.yaml <<'EOM'
modality: [ "rna" ]
uns_neighbors: [ "neighbors" ]
output: "$id.$key.output.h5mu"
obsm_output: [ "X_densmap" ]
min_dist: [ 0.5 ]
spread: [ 1 ]
num_components: [ 2 ]
max_iter: [ 0 ]
alpha: [ 1 ]
gamma: [ 1 ]
negative_sample_rate: [ 5 ]
init_pos: [ "spectral" ]
lambda: [ 2 ]
fraction: [ 0.3 ]
var_shift: [ 0.1 ]
id: "run"
publish_dir: "output/"
EOM
nextflow run https://packages.viash-hub.com/vsh/openpipeline.git \
-revision v4.0.1 \
-main-script target/nextflow/dimred/densmap/main.nf \
-params-file params.yaml Relationships
Used by
0 relationships
No components use this component.
Current component
dimred/densmapopenpipeline v4.0.1
Uses
0 relationships
No component dependencies found.