integrate/harmonypy2
Description
Performs Harmony integration as described in https://github.com/immunogenomics/harmony.
Uses harmonypy 2.x (https://github.com/slowkow/harmonypy), a C++ rewrite of harmonypy
that follows the R harmony2 package. Note that the default parameters follow R harmony2
and differ from integrate/harmonypy (e.g. lambda is estimated automatically).
Arguments
Name | Type & Properties | Description |
|---|---|---|
--output_compression | string | Compression format to use for the output AnnData and/or Mudata H5 files. By default no compression is applied. |
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 a starting PCA embedding. |
--obs_covariates | string required multiple | The .obs field(s) that define the covariate(s) to regress out. Missing values are not allowed in these columns. |
Outputs
Name | Type & Properties | Description |
|---|---|---|
--output -o | file required output | Output h5mu file. |
--obsm_output | string | In which .obsm slot to store the resulting integrated embedding. |
Harmony arguments
Name | Type & Properties | Description |
|---|---|---|
--theta | double multiple | Diversity clustering penalty parameter. Can be set as a single value for all batches, as one value per covariate (in the order of --obs_covariates), or as one value per batch (the levels of each covariate in sorted order). theta=0 does not encourage any diversity. Larger values of theta result in more diverse clusters. |
--lambda | double multiple | Ridge regression penalty. Can be set as a single value for all batches, as one value per covariate or as one value per batch, all positive. When not set (or set to -1), lambda is estimated in each cluster from --alpha. |
--alpha | double | Used to estimate lambda when --lambda is not set. |
--sigma | double multiple | Width of soft kmeans clusters. Can be set as a single value for all clusters or one value per cluster. Multiple values require --nclust to be set to the number of values. |
--nclust | integer | Number of clusters in the model. When not set, min(number of cells / 30, 100) is used. |
--tau | double | Protection against overclustering small datasets with large ones. tau is the expected number of cells per cluster. 0 disables this protection. |
--block_size | double | Proportion of cells to update during clustering. |
--max_iter_harmony | integer | Maximum number of rounds to run Harmony. |
--max_iter_kmeans | integer | Maximum number of rounds to run clustering at each round of Harmony. |
--epsilon_cluster | double | Convergence tolerance for the clustering round of Harmony. |
--epsilon_harmony | double | Convergence tolerance for Harmony. |
--batch_prop_cutoff | double | Minimum proportion of a batch's cells assigned to a cluster for that batch to be corrected in that cluster. |
--random_state | integer | Random seed for reproducibility. |
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"
obsm_output: [ "X_pca_integrated" ]
theta: [ 2 ]
alpha: [ 0.2 ]
sigma: [ 0.1 ]
tau: [ 0 ]
block_size: [ 0.05 ]
max_iter_harmony: [ 10 ]
max_iter_kmeans: [ 4 ]
epsilon_cluster: [ 0.001 ]
epsilon_harmony: [ 0.01 ]
batch_prop_cutoff: [ 0.00001 ]
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/integrate/harmonypy2/main.nf \
-params-file params.yaml Relationships
Used by
0 relationships
No components use this component.
Current component
integrate/harmonypy2openpipeline v5.0.0
Uses
0 relationships
No component dependencies found.