Rna multisample

Processing unimodal multi-sample RNA transcriptomics data.

Info

ID: rna_multisample
Namespace: workflows/rna

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 1.0.1 -latest \
  -main-script target/nextflow/workflows/rna/rna_multisample/main.nf \
  --help

Run command

Example of params.yaml
# Inputs
id: # please fill in - example: "concatenated"
input: # please fill in - example: "dataset.h5mu"
modality: "rna"
# layer: "foo"

# Output
# output: "$id.$key.output.h5mu"

# Filtering highly variable features
highly_variable_features_var_output: "filter_with_hvg"
highly_variable_features_obs_batch_key: "sample_id"
highly_variable_features_flavor: "seurat"
# highly_variable_features_n_top_features: 123

# QC metrics calculation options
var_qc_metrics: ["filter_with_hvg"]
top_n_vars: [50, 100, 200, 500]
output_obs_num_nonzero_vars: "num_nonzero_vars"
output_obs_total_counts_vars: "total_counts"
output_var_num_nonzero_obs: "num_nonzero_obs"
output_var_total_counts_obs: "total_counts"
output_var_obs_mean: "obs_mean"
output_var_pct_dropout: "pct_dropout"

# Nextflow input-output arguments
publish_dir: # please fill in - example: "output/"
# param_list: "my_params.yaml"
nextflow run openpipelines-bio/openpipeline \
  -r 1.0.1 -latest \
  -profile docker \
  -main-script target/nextflow/workflows/rna/rna_multisample/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 concatenated file string, required, example: "concatenated"
--input Path to the samples. file, required, example: "dataset.h5mu"
--modality Modality to process. string, default: "rna"
--layer Input layer to use. If not specified, .X is used. string

Output

Name Description Attributes
--output Destination path to the output. file, required, example: "output.h5mu"

Filtering highly variable features

Name Description Attributes
--highly_variable_features_var_output In which .var slot to store a boolean array corresponding to the highly variable features. string, default: "filter_with_hvg"
--highly_variable_features_obs_batch_key If specified, highly-variable features are selected within each batch separately and merged. This simple process avoids the selection of batch-specific features and acts as a lightweight batch correction method. For all flavors, featues are first sorted by how many batches they are highly variable. For dispersion-based flavors ties are broken by normalized dispersion. If flavor = ‘seurat_v3’, ties are broken by the median (across batches) rank based on within-batch normalized variance. string, default: "sample_id"
--highly_variable_features_flavor Choose the flavor for identifying highly variable features. For the dispersion based methods in their default workflows, Seurat passes the cutoffs whereas Cell Ranger passes n_top_features. string, default: "seurat"
--highly_variable_features_n_top_features Number of highly-variable features to keep. Mandatory if filter_with_hvg_flavor is set to ‘seurat_v3’. integer

QC metrics calculation options

Name Description Attributes
--var_qc_metrics Keys to select a boolean (containing only True or False) column from .var. For each cell, calculate the proportion of total values for genes which are labeled ‘True’, compared to the total sum of the values for all genes. List of string, default: "filter_with_hvg", example: "ercc,highly_variable", multiple_sep: ";"
--top_n_vars Number of top vars to be used to calculate cumulative proportions. If not specified, proportions are not calculated. --top_n_vars 20,50 finds cumulative proportion to the 20th and 50th most expressed vars. List of integer, default: 50, 100, 200, 500, multiple_sep: ";"
--output_obs_num_nonzero_vars Name of column in .obs describing, for each observation, the number of stored values (including explicit zeroes). In other words, the name of the column that counts for each row the number of columns that contain data. string, default: "num_nonzero_vars"
--output_obs_total_counts_vars Name of the column for .obs describing, for each observation (row), the sum of the stored values in the columns. string, default: "total_counts"
--output_var_num_nonzero_obs Name of column describing, for each feature, the number of stored values (including explicit zeroes). In other words, the name of the column that counts for each column the number of rows that contain data. string, default: "num_nonzero_obs"
--output_var_total_counts_obs Name of the column in .var describing, for each feature (column), the sum of the stored values in the rows. string, default: "total_counts"
--output_var_obs_mean Name of the column in .obs providing the mean of the values in each row. string, default: "obs_mean"
--output_var_pct_dropout Name of the column in .obs providing for each feature the percentage of observations the feature does not appear on (i.e. is missing). Same as --num_nonzero_obs but percentage based. string, default: "pct_dropout"

Authors

  • Dries De Maeyer (author)

  • Robrecht Cannoodt (author, maintainer)

  • Dries Schaumont (author)

Visualisation

flowchart TB
    v0(Channel.fromList)
    v18(normalize_total)
    v38(log1p)
    v58(delete_layer)
    v78(highly_variable_features_scanpy)
    v189(Output)
    subgraph group_rna_qc [rna_qc]
        v90(filter)
        v108(grep_annotation_column)
        v121(mix)
        v130(calculate_qc_metrics)
        v150(publish)
    end
    v0-->v18
    v18-->v38
    v38-->v58
    v58-->v78
    v78-->v90
    v90-->v108
    v108-->v121
    v90-->v121
    v121-->v130
    v130-->v150
    v150-->v189
    style group_rna_qc fill:#F0F0F0,stroke:#969696;
    style v0 fill:#e3dcea,stroke:#7a4baa;
    style v18 fill:#e3dcea,stroke:#7a4baa;
    style v38 fill:#e3dcea,stroke:#7a4baa;
    style v58 fill:#e3dcea,stroke:#7a4baa;
    style v78 fill:#e3dcea,stroke:#7a4baa;
    style v90 fill:#e3dcea,stroke:#7a4baa;
    style v108 fill:#e3dcea,stroke:#7a4baa;
    style v121 fill:#e3dcea,stroke:#7a4baa;
    style v130 fill:#e3dcea,stroke:#7a4baa;
    style v150 fill:#e3dcea,stroke:#7a4baa;
    style v189 fill:#e3dcea,stroke:#7a4baa;