getRefRun: Fetch the reference run for each peptide

View source: R/utils.R

getRefRunR Documentation

Fetch the reference run for each peptide

Description

Provides the reference run based on lowest p-value.

Usage

getRefRun(peptideScores, applyFun = lapply)

Arguments

peptideScores

(list of data-frames) each dataframe has scores of a peptide across all runs.

applyFun

(function) value must be either lapply or BiocParallel::bplapply.

Value

(dataframe) has two columns:

peptide_id

(integer) a unique id for each peptide.

run

(string) run identifier.

Author(s)

Shubham Gupta, shubh.gupta@mail.utoronto.ca

ORCID: 0000-0003-3500-8152

License: (c) Author (2020) + GPL-3 Date: 2020-04-08

See Also

getPeptideScores

Examples

dataPath <- system.file("extdata", package = "DIAlignR")
fileInfo <- getRunNames(dataPath = dataPath)
precursorsInfo <- getPrecursors(fileInfo, oswMerged = TRUE, runType = "DIA_Proteomics",
                                context = "experiment-wide", maxPeptideFdr = 0.05)
peptideIDs <- unique(precursorsInfo$peptide_id)
peptidesInfo <- getPeptideScores(fileInfo, peptideIDs)
peptidesInfo <- lapply(peptideIDs, function(pep) peptidesInfo [.(pep),])
names(peptidesInfo) <- as.character(peptideIDs)
getRefRun(peptidesInfo)

shubham1637/DIAlignR documentation built on March 29, 2023, 8:45 p.m.