Select phosphosites that have been quantified in more than a given percentage of samples

selectOverallPercent(mat, percent, n, assay)

Arguments

mat

a matrix (or PhosphoExperiment object) with rows correspond to phosphosites and columns correspond to samples in replicates for different treatments.

percent

a percent from 0 to 1, specifying the percentage of quantified values in across all samples for retaining a phosphosite for subsequent analysis.

n

an integer indicating n or more quantified values required for retaining a phosphosite for subsequent analysis.

assay

an assay to be selected if mat is a PhosphoExperiment object.

Value

a filtered matrix

Examples


data('phospho.cells.Ins.sample')

phospho.cells.Ins.filtered <- selectOverallPercent(phospho.cells.Ins, 0.5)

# Before filtering
dim(phospho.cells.Ins)
#> [1] 5000   24
# After filtering
dim(phospho.cells.Ins.filtered)
#> [1] 1154   24