Select phosphosites with a localisation score higher than the pre-defined probability score (default score = 0.75)

selectLocalisedSites(mat, loc=NULL, prob = 0.75)

Arguments

mat

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

loc

a vector of localisation scores

prob

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

Value

a filtered matrix

Examples


data('phospho.cells.Ins.pe')
ppe <- phospho.cells.Ins.pe
ppe_mat <- as.data.frame(SummarizedExperiment::assay(ppe))
# Before filtering
dim(ppe)
#> [1] 5000   24
dim(ppe_mat)
#> [1] 5000   24

# Generate arbitrary localisation probabilities for each phosphosite
set.seed(2020)
localisation_scores <- round(rnorm(nrow(ppe), 0.8, 0.05), 2)
table(localisation_scores >= 0.75)
#> 
#> FALSE  TRUE 
#>   709  4291 

# Filter
Localisation(ppe) <- localisation_scores
ppe_filtered <- selectLocalisedSites(ppe, prob=0.75)
ppe_mat_filtered <- selectLocalisedSites(ppe_mat, loc=localisation_scores, 
     prob=0.75)

# After filtering
dim(ppe_filtered)
#> [1] 4291   24
dim(ppe_mat_filtered)
#> [1] 4291   24