filter/filter_with_quantile
Description
Filter observations or features from an .h5mu file based on quantile thresholds of numeric values.
This component removes observations or features that fall outside specified quantile ranges in .obs or .var. columns.
For example, you can filter out observations with total UMI counts in the bottom 5% (quantile < 0.05) or
top 5% (quantile > 0.95), or retain an intermediate range (0.1 < quantile < 0.9).
Inputs
Name | Type & Properties | Description |
|---|---|---|
--input | file required | Input h5mu file |
--modality | string | Which modality from the input MuData file to process. |
--obs_column | string | Name of the column in .obs to use for quantile-based filtering. If not specified, no .obs filtering will be performed. |
--var_column | string | Name of the column in .var to use for quantile-based filtering. If not specified, no .var filtering will be performed. |
Filters
Name | Type & Properties | Description |
|---|---|---|
--do_subset | boolean_true | Whether to subset before storing the output. |
--obs_log1p_transform | boolean | Apply log1p transformation to the obs_column values before calculating quantiles. The transformed values will be stored as 'log1p_{obs_column}' in .obs. This is useful for highly skewed data where log transformation can improve quantile-based filtering. |
--obs_min_quantile | double | Minimum quantile threshold for .obs filtering. Observations with values below this quantile will be removed. Value should be between 0.0 and 1.0. |
--obs_max_quantile | double | Maximum quantile threshold for .obs filtering. Observations with values above this quantile will be removed. Value should be between 0.0 and 1.0. |
--var_log1p_transform | boolean | Apply log1p transformation to the var_column values before calculating quantiles. The transformed values will be stored as 'log1p_{var_column}' in .var. This is useful for highly skewed data where log transformation can improve quantile-based filtering. |
--var_min_quantile | double | Minimum quantile threshold for .var filtering. Features with values below this quantile will be removed. Value should be between 0.0 and 1.0. |
--var_max_quantile | double | Maximum quantile threshold for .var filtering. Features with values above this quantile will be removed. Value should be between 0.0 and 1.0. |
--min_values_for_quantile | integer | Minimum number of values required to apply quantile filtering. If fewer values are present, quantile filtering will be skipped to prevent data loss. |
Outputs
Name | Type & Properties | Description |
|---|---|---|
--output | file output | Output h5mu file. |
--obs_name_filter | string | In which .obs slot to store a boolean array corresponding to which observations should be removed. |
--obs_log1p_column | string | Name for the column where log1p transformed obs values will be stored. If not provided, defaults to 'log1p_{obs_column}'. |
--var_log1p_column | string | Name for the column where log1p transformed var values will be stored. If not provided, defaults to 'log1p_{var_column}'. |
--var_name_filter | string | In which .var slot to store a boolean array corresponding to which variables should be removed. |
--output_compression | string | Compression format to use for the output AnnData and/or Mudata H5 files. By default no compression is applied. |
Run this component
Run the following command to execute this component with Nextflow:
cat > params.yaml <<'EOM'
modality: [ "rna" ]
obs_log1p_transform: [ true ]
var_log1p_transform: [ true ]
min_values_for_quantile: [ 10 ]
output: "$id.$key.output.h5mu"
obs_name_filter: [ "filter_with_quantile" ]
var_name_filter: [ "filter_with_quantile" ]
id: "run"
publish_dir: "output/"
EOM
nextflow run https://packages.viash-hub.com/vsh/openpipeline.git \
-revision v4.2.0 \
-main-script target/nextflow/filter/filter_with_quantile/main.nf \
-params-file params.yaml Relationships
Used by
0 relationships
No components use this component.
Current component
filter/filter_with_quantileopenpipeline v4.2.0
Uses
0 relationships
No component dependencies found.