selectGrps: Select by treatment groups (replicate block)

Description Usage Arguments Value Author(s) Examples

View source: R/filter.R

Description

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.

Usage

1
selectGrps(mat, grps, percent, n)

Arguments

mat

a matrix with rows correspond to phosphosites and columns correspond to samples in replicates for different treatments.

grps

a string specifying the grouping (replciates).

percent

a percent from 0 to 1, specifying the percentage of quantified values in any treatment group.

n

an integer indicating n or more replicates pass the percentage filtering for a phosphosite to be included.

Value

a filtered matrix with at least 'percent' quantification in one or more conditions

Author(s)

Pengyi Yang, Taiyun Kim

Examples

1
2
3
4
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)

PhosR documentation built on Nov. 8, 2020, 6:54 p.m.