selectLocalisedSites {PhosR} | R Documentation

## Select phosphosites by localisation score

### Description

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

### Usage

    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)
    dim(ppe_mat)

    # 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)

    # 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)
    dim(ppe_mat_filtered)

[Package PhosR version 1.2.0 Index]