flowchart TB v0(Channel.fromList) v2(filter) v10(filter) v40(concat) v18(bbknn) v25(cross) v35(cross) v42(filter) v50(leiden) v57(cross) v67(cross) v73(filter) v81(move_obsm_to_obs) v88(cross) v98(cross) v105(mix) v106(filter) v136(concat) v114(umap) v121(cross) v131(cross) v143(cross) v150(cross) v162(cross) v169(cross) v173(Output) v105-->v106 v0-->v2 v2-->v10 v10-->v18 v18-->v25 v10-->v25 v10-->v35 v35-->v40 v42-->v50 v50-->v57 v42-->v57 v42-->v67 v73-->v81 v81-->v88 v73-->v88 v73-->v98 v106-->v114 v114-->v121 v106-->v121 v106-->v131 v131-->v136 v136-->v143 v2-->v143 v143-->v150 v2-->v150 v2-->v162 v162-->v169 v2-->v169 v169-->v173 v18-->v35 v40-->v42 v67-->v73 v50-->v67 v98-->v105 v81-->v98 v40-->v105 v114-->v131 v136-->v162 style v0 fill:#e3dcea,stroke:#7a4baa; style v2 fill:#e3dcea,stroke:#7a4baa; style v10 fill:#e3dcea,stroke:#7a4baa; style v40 fill:#e3dcea,stroke:#7a4baa; style v18 fill:#e3dcea,stroke:#7a4baa; style v25 fill:#e3dcea,stroke:#7a4baa; style v35 fill:#e3dcea,stroke:#7a4baa; style v42 fill:#e3dcea,stroke:#7a4baa; style v50 fill:#e3dcea,stroke:#7a4baa; style v57 fill:#e3dcea,stroke:#7a4baa; style v67 fill:#e3dcea,stroke:#7a4baa; style v73 fill:#e3dcea,stroke:#7a4baa; style v81 fill:#e3dcea,stroke:#7a4baa; style v88 fill:#e3dcea,stroke:#7a4baa; style v98 fill:#e3dcea,stroke:#7a4baa; style v105 fill:#e3dcea,stroke:#7a4baa; style v106 fill:#e3dcea,stroke:#7a4baa; style v136 fill:#e3dcea,stroke:#7a4baa; style v114 fill:#e3dcea,stroke:#7a4baa; style v121 fill:#e3dcea,stroke:#7a4baa; style v131 fill:#e3dcea,stroke:#7a4baa; style v143 fill:#e3dcea,stroke:#7a4baa; style v150 fill:#e3dcea,stroke:#7a4baa; style v162 fill:#e3dcea,stroke:#7a4baa; style v169 fill:#e3dcea,stroke:#7a4baa; style v173 fill:#e3dcea,stroke:#7a4baa;
Bbknn leiden
Run bbknn followed by leiden clustering and run umap on the result.
Info
ID: bbknn_leiden
Namespace: workflows/integration
Links
Example commands
You can run the pipeline using nextflow run
.
View help
You can use --help
as a parameter to get an overview of the possible parameters.
nextflow run openpipelines-bio/openpipeline \
-r 2.1.0 -latest \
-main-script target/nextflow/workflows/integration/bbknn_leiden/main.nf \
--help
Run command
Example of params.yaml
# Inputs
id: # please fill in - example: "foo"
input: # please fill in - example: "dataset.h5mu"
layer: "log_normalized"
modality: "rna"
# Outputs
# output: "$id.$key.output.h5mu"
# Bbknn
obsm_input: "X_pca"
obs_batch: "sample_id"
uns_output: "bbknn_integration_neighbors"
obsp_distances: "bbknn_integration_distances"
obsp_connectivities: "bbknn_integration_connectivities"
n_neighbors_within_batch: 3
n_pcs: 50
# n_trim: 123
# Clustering options
obs_cluster: "bbknn_integration_leiden"
leiden_resolution: [1.0]
# UMAP options
obsm_umap: "X_leiden_bbknn_umap"
# Nextflow input-output arguments
publish_dir: # please fill in - example: "output/"
# param_list: "my_params.yaml"
# Arguments
nextflow run openpipelines-bio/openpipeline \
-r 2.1.0 -latest \
-profile docker \
-main-script target/nextflow/workflows/integration/bbknn_leiden/main.nf \
-params-file params.yaml
Note
Replace -profile docker
with -profile podman
or -profile singularity
depending on the desired backend.
Argument groups
Inputs
Name | Description | Attributes |
---|---|---|
--id |
ID of the sample. | string , required, example: "foo" |
--input |
Path to the sample. | file , required, example: "dataset.h5mu" |
--layer |
use specified layer for expression values instead of the .X object from the modality. | string , default: "log_normalized" |
--modality |
Which modality to process. | string , default: "rna" |
Outputs
Name | Description | Attributes |
---|---|---|
--output |
Destination path to the output. | file , required, example: "output.h5mu" |
Bbknn
Name | Description | Attributes |
---|---|---|
--obsm_input |
The dimensionality reduction in .obsm to use for neighbour detection. Defaults to X_pca. |
string , default: "X_pca" |
--obs_batch |
.obs column name discriminating between your batches. | string , default: "sample_id" |
--uns_output |
Mandatory .uns slot to store various neighbor output objects. | string , default: "bbknn_integration_neighbors" |
--obsp_distances |
In which .obsp slot to store the distance matrix between the resulting neighbors. | string , default: "bbknn_integration_distances" |
--obsp_connectivities |
In which .obsp slot to store the connectivities matrix between the resulting neighbors. | string , default: "bbknn_integration_connectivities" |
--n_neighbors_within_batch |
How many top neighbours to report for each batch; total number of neighbours in the initial k-nearest-neighbours computation will be this number times the number of batches. | integer , default: 3 |
--n_pcs |
How many dimensions (in case of PCA, principal components) to use in the analysis. | integer , default: 50 |
--n_trim |
Trim the neighbours of each cell to these many top connectivities. May help with population independence and improve the tidiness of clustering. The lower the value the more independent the individual populations, at the cost of more conserved batch effect. If None (default), sets the parameter value automatically to 10 times neighbors_within_batch times the number of batches. Set to 0 to skip. |
integer |
Clustering options
Name | Description | Attributes |
---|---|---|
--obs_cluster |
Prefix for the .obs keys under which to add the cluster labels. Newly created columns in .obs will be created from the specified value for ‘–obs_cluster’ suffixed with an underscore and one of the resolutions resolutions specified in ‘–leiden_resolution’. | string , default: "bbknn_integration_leiden" |
--leiden_resolution |
Control the coarseness of the clustering. Higher values lead to more clusters. | List of double , default: 1 , multiple_sep: ";" |
UMAP options
Name | Description | Attributes |
---|---|---|
--obsm_umap |
In which .obsm slot to store the resulting UMAP embedding. | string , default: "X_leiden_bbknn_umap" |