getGlobalFits: Calculates all global alignment needed in refRun

Description Usage Arguments Value Author(s) See Also Examples

View source: R/get_global_fit.R

Description

Calculates all global alignment needed in refRun

Usage

1
2
3
4
5
6
7
8
9
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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)

Roestlab/DIAlign documentation built on Feb. 25, 2021, 5:18 p.m.