filter_overimputed: Filtering overimputation of proteomics datasets

filter_overimputedR Documentation

Filtering overimputation of proteomics datasets

Description

Filtering overimputation of proteomics datasets

Usage

filter_overimputed(
  x,
  set.c,
  genes.vc = "all",
  sex.vc = "all",
  imputed_thresh.n = 0.2
)

## S4 method for signature 'SummarizedExperiment'
filter_overimputed(
  x,
  set.c,
  genes.vc = "LAT",
  sex.vc = c("M", "F"),
  imputed_thresh.n = 0.2
)

## S4 method for signature 'ExpressionSet'
filter_overimputed(
  x,
  set.c,
  genes.vc = "LAT",
  sex.vc = c("M", "F"),
  imputed_thresh.n = 0.2
)

Arguments

x

An S4 object of class SummarizedExperiment or ExpressionSet

set.c

Character: name of the data set

genes.vc

Character vector: with elements in 'LAT', 'MX2', and 'WT'

sex.vc

Character vector: with elements in 'M' and 'F'

imputed_thresh.n

Numeric: for proteomics datasets, the features with a too high proportion of imputed values in all conditions to be compared will be discarded

Value

logical vector corresponding to the selected features

Examples

set.c <- "proteomics_plasma"

# SummarizedExperiment

proteo.mae <- phenomis::reading(ProMetIS::post_processed_dir.c(),
                                subsets.vc = set.c)
proteo.se <- proteo.mae[[set.c]]
## adding (common) sample metadata to the summarized experiment
sample_meta.DF <- SummarizedExperiment::colData(proteo.mae)
SummarizedExperiment::colData(proteo.se)[, "gene"] <- sample_meta.DF[colnames(proteo.se), "gene"]
SummarizedExperiment::colData(proteo.se)[, "sex"] <- sample_meta.DF[colnames(proteo.se), "sex"]
feat_select.vl <- ProMetIS:::filter_overimputed(proteo.se, set.c = set.c, genes.vc = "MX2")
message(round(sum(feat_select.vl) / length(feat_select.vl) * 100), "% of selected features")

# ExpressionSet

proteo.mset <- phenomis::reading(ProMetIS::post_processed_dir.c(),
                                 subsets.vc = set.c,
                                 output.c = "set")
proteo.eset <- proteo.mset[[set.c]]
feat_select.vl <- ProMetIS:::filter_overimputed(proteo.eset, set.c = set.c, genes.vc = "MX2")

IFB-ElixirFr/ProMetIS documentation built on May 21, 2024, 8:02 p.m.