selectGrps.Rd
Select phosphosites that have been quantified in a given percentage of treatment groups (e.g. 0.75 as 3 out of 4 replicates) in n groups.
selectGrps(mat, grps, percent, n, assay)
a matrix (PhosphoExperiment object) with rows correspond to phosphosites and columns correspond to samples in replicates for different treatments.
a string specifying the grouping (replicates).
a percent from 0 to 1, specifying the percentage of quantified values in any treatment group.
an integer indicating n or more replicates pass the percentage filtering for a phosphosite to be included.
an assay to be selected if mat
is a PhosphoExperiment
object.
a filtered matrix (or a PhosphoExperiment Oject) with at least
'percent' quantification in one or more conditions. If an input mat
is
a SummarizedExperiment object, filtered SummarizedExperiment object will be
returned.
data('phospho.cells.Ins.sample')
grps = gsub('_[0-9]{1}', '', colnames(phospho.cells.Ins))
phospho.cells.Ins.filtered <- selectGrps(phospho.cells.Ins, grps, 0.5, n=1)
# For PhosphoExperiment object
data('phospho.cells.Ins.pe')
grps = gsub('_[0-9]{1}', '', colnames(phospho.cells.Ins.pe))
phospho.cells.Ins.filtered <- selectGrps(phospho.cells.Ins.pe, grps, 0.5, n=1)