qc/calculate_qc_metrics

Description

Add basic quality control metrics to an .h5mu file.

The metrics are comparable to what scanpy.pp.calculate_qc_metrics output,
although they have slightly different names:

Var metrics (name in this component -> name in scanpy):

  • pct_dropout -> pct_dropout_by_{expr_type}

  • num_nonzero_obs -> n_cells_by_{expr_type}

  • obs_mean -> mean_{expr_type}

  • total_counts -> total_{expr_type}

Obs metrics:
- num_nonzero_vars -> n_genes_by_{expr_type}
- pct_{var_qc_metrics} -> pct_{expr_type}{qc_var}
- total_counts
{var_qc_metrics} -> total_{expr_type}{qc_var}
- pct_of_counts_in_top
{top_n_vars}vars -> pct{expr_type}in_top{n}{var_type}
- total_counts -> total
{expr_type}

Type

python_script

License

MIT

Contributors

Run this component

Run the following command to execute this component with Nextflow:

cat > params.yaml <<'EOM'  
modality: [ "rna" ]  
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" ]  
output: "$id.$key.output.h5mu"  
id: "run"  
publish_dir: "output/"  
EOM

nextflow run https://packages.viash-hub.com/vsh/openpipeline.git \  
  -revision v3.0.2 \  
  -main-script target/nextflow/qc/calculate_qc_metrics/main.nf \  
  -params-file params.yaml  

Inputs

Name
Type & Properties
--input
file
required
--modality
string
--layer
string

Metrics added to .obs

Name
Type & Properties
--var_qc_metrics
string
multiple
--var_qc_metrics_fill_na_value
boolean
--top_n_vars
integer
multiple
--output_obs_num_nonzero_vars
string
--output_obs_total_counts_vars
string

Metrics added to .var

Name
Type & Properties
--output_var_num_nonzero_obs
string
--output_var_total_counts_obs
string
--output_var_obs_mean
string
--output_var_pct_dropout
string

Outputs

Name
Type & Properties
--output
file
output
--output_compression
string

Collaborate Accelerate Succeed

Empower your organization with secure, scalable workflow solutions that simplify development, ensure compliance, and drive innovation.

Viash Hub is a platform developed by Data Intuitive, a Belgian-based bioinformatics company specializing in data workflow development and deployment.