This function is designed to convert species abundance into specific ratio-based abundance.

convert_sp2ratio(processed_se, transform = c("none", "log2"))

Arguments

processed_se

A SummarizedExperiment object constructed by as_summarized_experiment and processed by data_process.

transform

Character. Method for ratio-based abundance transformation. Allowed methods include "none" and "log2". Select 'none' to skip data transformation. Default is 'log2'.

Value

Return a SummarizedExperiment object.

Examples

data("de_data_twoGroup")
processed_se_twoGroup <- data_process(
    se=de_data_twoGroup, exclude_missing=TRUE, exclude_missing_pct=70,
    replace_na_method='min', replace_na_method_ref=0.5,
    normalization='Percentage')
ratioAbund_twoGroup <- convert_sp2ratio(
    processed_se_twoGroup, transform='log2')
#> There are 4 ratio characteristics that can be converted in your dataset.

data("se_multiGroup")
processed_se_multiGroup <- data_process(
    se=se_multiGroup, exclude_missing=TRUE, exclude_missing_pct=70,
    replace_na_method='min', replace_na_method_ref=0.5,
    normalization='Percentage')
ratioAbund_multiGroup <- convert_sp2ratio(
    processed_se_multiGroup, transform='log2')
#> There are 4 ratio characteristics that can be converted in your dataset.