getGlobalFits: Calculates all global alignment needed in refRun

View source: R/get_global_fit.R

getGlobalFitsR Documentation

Calculates all global alignment needed in refRun

Description

Calculates all global alignment needed in refRun

Usage

getGlobalFits(
  refRun,
  features,
  fileInfo,
  globalAlignment,
  globalAlignmentFdr,
  globalAlignmentSpan,
  applyFun = lapply
)

Arguments

refRun

(data-frame) Output of getRefRun function. Must have two columsn : transition_group_id and run.

features

(list of data-frames) it is output from getFeatures function.

fileInfo

(data-frame) Output of getRunNames function.

globalAlignment

(string) Must be from "loess" or "linear".

globalAlignmentFdr

(numeric) A numeric value between 0 and 1. Features should have m-score lower than this value for participation in global fit.

globalAlignmentSpan

(numeric) Spanvalue for LOESS fit. For targeted proteomics 0.1 could be used.

Value

(list) Each element is either of class lm or loess.

Author(s)

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

ORCID: 0000-0003-3500-8152

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

See Also

getRefRun, getFeatures, getGlobalAlignment

Examples

dataPath <- system.file("extdata", package = "DIAlignR")
fileInfo <- getRunNames(dataPath, oswMerged = TRUE)
features <- getFeatures(fileInfo, maxFdrQuery = 0.05)
precursors <- getPrecursors(fileInfo, TRUE, "DIA_Proteomics", "experiment-wide", 0.01)
precursors <- dplyr::arrange(precursors, .data$peptide_id, .data$transition_group_id)
peptideIDs <- unique(precursors$peptide_id)
peptideScores <- getPeptideScores(fileInfo, peptideIDs, TRUE, "DIA_Proteomics", "experiment-wide")
peptideScores <- lapply(peptideIDs, function(pep) dplyr::filter(peptideScores, .data$peptide_id == pep))
names(peptideScores) <- as.character(peptideIDs)
## Not run: 
refRun <- getRefRun(peptideScores)
fits <- getGlobalFits(refRun, features, fileInfo, "linear", 0.05, 0.1)

## End(Not run)

shubham1637/DIAlign documentation built on March 27, 2023, 7:12 a.m.