cpu_gpu_wrappers/preprocessing/harmony_integrate
Description
Integrate observations over one or more batch/covariate columns using Harmony,
running either the GPU (rapids-singlecell) or the CPU (harmonypy) variant of
harmony_integrate, 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 the PCA embedding to integrate (basis). |
--obs_covariates | string required multiple | The .obs columns to integrate over (the batch/covariate keys passed to Harmony). Provide one or more comma-separated column names. When multiple keys are provided, a combined batch variable is created from all columns. |
Compute
Name | Type & Properties | Description |
|---|---|---|
--device_type | string | Which implementation to use for the steps that have both a CPU and a GPU variant (normalization, log1p, scaling, highly variable features, PCA, neighbors, BBKNN, Harmony, Leiden clustering and UMAP): * `cpu` (default): the scanpy implementation. * `gpu`: the rapids-singlecell implementation from the `openpipeline_rapids` package. Selecting `gpu` requires a CUDA-capable NVIDIA GPU on every executor that runs a GPU-labelled process; there is no automatic fallback to CPU. The GPU processes also need the container runtime to be given access to the devices, which is done by adding `-c src/workflows/utils/gpu.config` to the Nextflow command. |
--managed_memory | boolean_true | Only used with `--device_type gpu`. Allocate GPU memory with RMM managed memory from the start. Managed memory lets data that does not fit in VRAM spill to host RAM, at the cost of speed. By default, each GPU step runs with regular GPU memory and only switches to managed memory, retrying once, if the GPU runs out of memory. |
Outputs
Name | Type & Properties | Description |
|---|---|---|
--output | file required output | Output h5mu file containing the integrated embedding. |
--obsm_output | string | In which .obsm slot to store the Harmony-corrected embedding. |
--output_compression | string | Compression format to use for the output AnnData and/or Mudata H5 files. By default no compression is applied. |
Options
Name | Type & Properties | Description |
|---|---|---|
--theta | double multiple | Diversity clustering penalty parameter. theta=0 does not encourage any diversity; larger values result in more aggressive diversity-encouraging correction over the covariates. Provide a single value for all covariates, or one value per --obs_covariates entry. |
rapids-singlecell options
Name | Type & Properties | Description |
|---|---|---|
--overwrite | boolean | Allow overwriting the .obsm output slot if it already exists. |
--flavor | string | Which Harmony implementation to use. 'harmony2' is the faster reimplementation; 'harmony1' reproduces the original algorithm. |
--n_clusters | integer | Number of clusters used by Harmony. If not set, the value is chosen automatically. |
--max_iter_harmony | integer | Maximum number of rounds to run Harmony. |
--random_state | integer | A random seed. |
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: [ "cpu" ]
output: "$id.$key.output.h5mu"
obsm_output: [ "X_pca_integrated" ]
theta: [ 2 ]
overwrite: [ false ]
flavor: [ "harmony2" ]
max_iter_harmony: [ 10 ]
random_state: [ 0 ]
id: "run"
publish_dir: "output/"
EOM
nextflow run https://packages.viash-hub.com/vsh/openpipeline.git \
-revision v5.0.0 \
-main-script target/nextflow/cpu_gpu_wrappers/preprocessing/harmony_integrate/main.nf \
-params-file params.yaml Relationships
Used by
1 relationships
Current component
cpu_gpu_wrappers/preprocessing/harmony_integrateopenpipeline v5.0.0