preprocessing/harmony_integrate
Description
Integrate observations over one or more batch/covariate columns on the GPU
using Harmony.
Wraps rapids-singlecell's rsc.pp.harmony_integrate, which runs Harmony batch
integration on a PCA embedding stored in .obsm and writes the corrected
embedding to a new .obsm slot. Useful for removing batch effects prior to
downstream neighbor search, clustering, and embedding.
Inputs
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 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. |
Outputs
Name | Type & Properties | Description |
|---|---|---|
--output -o | file required output | Output h5mu file containing the integrated embedding. |
--obsm_output | string | In which .obsm slot to store the Harmony-corrected embedding. |
--overwrite | boolean | Allow overwriting the .obsm output slot if it already exists. |
--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 |
|---|---|---|
--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. |
--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. |
GPU memory
Name | Type & Properties | Description |
|---|---|---|
--managed_memory | boolean_true | 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, the component runs with regular GPU memory and only switches to managed memory, retrying once, if the GPU runs out of memory. |
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"
obsm_output: [ "X_pca_harmony" ]
overwrite: [ false ]
theta: [ 2 ]
flavor: [ "harmony2" ]
max_iter_harmony: [ 10 ]
random_state: [ 0 ]
id: "run"
publish_dir: "output/"
EOM
nextflow run https://packages.viash-hub.com/vsh/openpipeline_rapids.git \
-revision v0.3.0 \
-main-script target/nextflow/preprocessing/harmony_integrate/main.nf \
-params-file params.yaml Relationships
Used by
0 relationships
No components use this component.
Current component
preprocessing/harmony_integrateopenpipeline_rapids v0.3.0
Uses
0 relationships
No component dependencies found.