Title: | Tools for the Differential Analysis of Proteins Abundance with R |
---|---|
Description: | The package DAPAR is a Bioconductor distributed R package which provides all the necessary functions to analyze quantitative data from label-free proteomics experiments. Contrarily to most other similar R packages, it is endowed with rich and user-friendly graphical interfaces, so that no programming skill is required (see `Prostar` package). |
Authors: | c(person(given = "Samuel", family = "Wieczorek", email = "[email protected]", role = c("aut","cre")), person(given = "Florence", family ="Combes", email = "[email protected]", role = "aut"), person(given = "Thomas", family ="Burger", email = "[email protected]", role = "aut"), person(given = "Vasile-Cosmin", family ="Lazar", email = "[email protected]", role = "ctb"), person(given = "Enora", family ="Fremy", email = "[email protected]", role = "ctb"), person(given = "Helene", family ="Borges", email = "[email protected]", role = "ctb")) |
Maintainer: | Samuel Wieczorek <[email protected]> |
License: | Artistic-2.0 |
Version: | 1.39.0 |
Built: | 2024-11-29 07:59:35 UTC |
Source: | https://github.com/bioc/DAPAR |
xxxx
aggregateIter(obj.pep, X, init.method = "Sum", method = "Mean", n = NULL)
aggregateIter(obj.pep, X, init.method = "Sum", method = "Mean", n = NULL)
obj.pep |
xxxxx |
X |
xxxx |
init.method |
xxxxx |
method |
xxxxx |
n |
xxxx |
A protein object of class MSnset
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") protID <- "Protein_group_IDs" X <- BuildAdjacencyMatrix(Exp1_R25_pept[seq_len(10)], protID, FALSE) ll.agg <- aggregateIter(Exp1_R25_pept[seq_len(10)], X = X)
data(Exp1_R25_pept, package="DAPARdata") protID <- "Protein_group_IDs" X <- BuildAdjacencyMatrix(Exp1_R25_pept[seq_len(10)], protID, FALSE) ll.agg <- aggregateIter(Exp1_R25_pept[seq_len(10)], X = X)
xxxx
aggregateIterParallel( obj.pep, X, init.method = "Sum", method = "Mean", n = NULL )
aggregateIterParallel( obj.pep, X, init.method = "Sum", method = "Mean", n = NULL )
obj.pep |
xxxxx |
X |
xxxx |
init.method |
xxxxx |
method |
xxxxx |
n |
xxxx |
xxxxx
Samuel Wieczorek
## Not run: data(Exp1_R25_pept, package="DAPARdata") protID <- "Protein_group_IDs" obj.pep <- Exp1_R25_pept[seq_len(10)] X <- BuildAdjacencyMatrix(obj.pep, protID, FALSE) obj.agg <- aggregateIterParallel(obj.pep, X) ## End(Not run)
## Not run: data(Exp1_R25_pept, package="DAPARdata") protID <- "Protein_group_IDs" obj.pep <- Exp1_R25_pept[seq_len(10)] X <- BuildAdjacencyMatrix(obj.pep, protID, FALSE) obj.agg <- aggregateIterParallel(obj.pep, X) ## End(Not run)
#' This function computes the intensity of proteins as the mean of the intensities of their peptides.
aggregateMean(obj.pep, X)
aggregateMean(obj.pep, X)
obj.pep |
A peptide object of class |
X |
An adjacency matrix in which lines and columns correspond respectively to peptides and proteins. |
A matrix of intensities of proteins
Alexia Dorffer
data(Exp1_R25_pept, package="DAPARdata") obj.pep <- Exp1_R25_pept[seq_len(10)] obj.pep.imp <- wrapper.impute.detQuant(obj.pep, na.type = c("Missing POV", "Missing MEC")) protID <- "Protein_group_IDs" X <- BuildAdjacencyMatrix(obj.pep.imp, protID, FALSE) ll.agg <- aggregateMean(obj.pep.imp, X)
data(Exp1_R25_pept, package="DAPARdata") obj.pep <- Exp1_R25_pept[seq_len(10)] obj.pep.imp <- wrapper.impute.detQuant(obj.pep, na.type = c("Missing POV", "Missing MEC")) protID <- "Protein_group_IDs" X <- BuildAdjacencyMatrix(obj.pep.imp, protID, FALSE) ll.agg <- aggregateMean(obj.pep.imp, X)
Execute a product two matrices: the first is an adjacency one while the second if a simple dataframe
AggregateMetacell(X, obj.pep)
AggregateMetacell(X, obj.pep)
X |
An adjacency matrix between peptides and proteins |
obj.pep |
A dataframe of the cell metadata for peptides |
xxxx
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj.pep <- Exp1_R25_pept[seq_len(10)] protID <- "Protein_group_IDs" X <- BuildAdjacencyMatrix(obj.pep, protID, FALSE) agg.meta <- AggregateMetacell(X, obj.pep)
data(Exp1_R25_pept, package="DAPARdata") obj.pep <- Exp1_R25_pept[seq_len(10)] protID <- "Protein_group_IDs" X <- BuildAdjacencyMatrix(obj.pep, protID, FALSE) agg.meta <- AggregateMetacell(X, obj.pep)
This function computes the intensity of proteins based on the sum of the intensities of their peptides.
aggregateSum(obj.pep, X)
aggregateSum(obj.pep, X)
obj.pep |
A matrix of intensities of peptides |
X |
An adjacency matrix in which lines and columns correspond respectively to peptides and proteins. |
A matrix of intensities of proteins
Alexia Dorffer
data(Exp1_R25_pept, package="DAPARdata") obj.pep <- Exp1_R25_pept[seq_len(20)] obj.pep.imp <- wrapper.impute.detQuant(obj.pep, na.type = c("Missing POV", "Missing MEC")) protID <- "Protein_group_IDs" X <- BuildAdjacencyMatrix(obj.pep, protID, FALSE) ll.agg <- aggregateSum(obj.pep.imp, X)
data(Exp1_R25_pept, package="DAPARdata") obj.pep <- Exp1_R25_pept[seq_len(20)] obj.pep.imp <- wrapper.impute.detQuant(obj.pep, na.type = c("Missing POV", "Missing MEC")) protID <- "Protein_group_IDs" X <- BuildAdjacencyMatrix(obj.pep, protID, FALSE) ll.agg <- aggregateSum(obj.pep.imp, X)
This function computes the intensity of proteins as the sum of the intensities of their n best peptides.
aggregateTopn(obj.pep, X, method = "Mean", n = 10)
aggregateTopn(obj.pep, X, method = "Mean", n = 10)
obj.pep |
A matrix of intensities of peptides |
X |
An adjacency matrix in which lines and columns correspond respectively to peptides and proteins. |
method |
xxx |
n |
The maximum number of peptides used to aggregate a protein. |
A matrix of intensities of proteins
Alexia Dorffer, Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj.pep <- Exp1_R25_pept[seq_len(10)] protID <- "Protein_group_IDs" X <- BuildAdjacencyMatrix(obj.pep, protID, FALSE) ll.agg <- aggregateTopn(obj.pep, X, n = 3)
data(Exp1_R25_pept, package="DAPARdata") obj.pep <- Exp1_R25_pept[seq_len(10)] protID <- "Protein_group_IDs" X <- BuildAdjacencyMatrix(obj.pep, protID, FALSE) ll.agg <- aggregateTopn(obj.pep, X, n = 3)
iteratively applies OWAnova() on the features of an MSnSet object
applyAnovasOnProteins(obj)
applyAnovasOnProteins(obj)
obj |
an MSnSet object ' |
a list of linear models
Thomas Burger
data(Exp1_R25_prot, package='DAPARdata') exdata <- Exp1_R25_prot[1:5,] applyAnovasOnProteins(exdata)
data(Exp1_R25_prot, package='DAPARdata') exdata <- Exp1_R25_prot[1:5,] applyAnovasOnProteins(exdata)
Calculate the average of the abundances for each protein in each condition for an ExpressionSet or MSnSet. Needs to have the array expression data ordered in the same way as the phenotype data (columns of the array data in the same order than the condition column in the phenotype data).
averageIntensities(ESet_obj)
averageIntensities(ESet_obj)
ESet_obj |
ExpressionSet object containing all the data |
a dataframe in wide format providing (in the case of 3 or more conditions) the means of intensities for each protein/peptide in each condition. If there are less than 3 conditions, an error message is returned.
Helene Borges
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(1000)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") averageIntensities(obj$new)
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(1000)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") averageIntensities(obj$new)
highcharter
A barplot of GO enrichment analysis
barplotEnrichGO_HC(ego, maxRes = 5, title = NULL)
barplotEnrichGO_HC(ego, maxRes = 5, title = NULL)
ego |
The result of the GO enrichment, provides either by the function
|
maxRes |
The maximum number of categories to display in the plot |
title |
The title of the plot |
A barplot
Samuel Wieczorek
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(10)] if (!requireNamespace("org.Sc.sgd.db", quietly = TRUE)) { stop("Please install org.Sc.sgd.db: BiocManager::install('org.Sc.sgd.db')") } library(org.Sc.sgd.db) univ <- univ_AnnotDbPkg("org.Sc.sgd.db") ego <- enrich_GO( data = Biobase::fData(obj)$Protein.IDs, idFrom = "UNIPROT", orgdb = "org.Sc.sgd.db", ont = "MF", pval = 0.05, universe = univ ) barplotEnrichGO_HC(ego)
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(10)] if (!requireNamespace("org.Sc.sgd.db", quietly = TRUE)) { stop("Please install org.Sc.sgd.db: BiocManager::install('org.Sc.sgd.db')") } library(org.Sc.sgd.db) univ <- univ_AnnotDbPkg("org.Sc.sgd.db") ego <- enrich_GO( data = Biobase::fData(obj)$Protein.IDs, idFrom = "UNIPROT", orgdb = "org.Sc.sgd.db", ont = "MF", pval = 0.05, universe = univ ) barplotEnrichGO_HC(ego)
highcharter
A barplot which shows the result of a GO classification, using the
package highcharter
barplotGroupGO_HC(ggo, maxRes = 5, title = "")
barplotGroupGO_HC(ggo, maxRes = 5, title = "")
ggo |
The result of the GO classification, provides either by the
function |
maxRes |
An integer which is the maximum number of classes to display in the plot |
title |
The title of the plot |
A barplot
Samuel Wieczorek
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(10)] if (!requireNamespace("org.Sc.sgd.db", quietly = TRUE)) { stop("Please install org.Sc.sgd.db: BiocManager::install('org.Sc.sgd.db')") } library(org.Sc.sgd.db) univ <- univ_AnnotDbPkg("org.Sc.sgd.db") ggo <- group_GO( data = Biobase::fData(obj)$Protein.IDs, idFrom = "UNIPROT", orgdb = "org.Sc.sgd.db", ont = "MF", level = 2 ) barplotGroupGO_HC(ggo)
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(10)] if (!requireNamespace("org.Sc.sgd.db", quietly = TRUE)) { stop("Please install org.Sc.sgd.db: BiocManager::install('org.Sc.sgd.db')") } library(org.Sc.sgd.db) univ <- univ_AnnotDbPkg("org.Sc.sgd.db") ggo <- group_GO( data = Biobase::fData(obj)$Protein.IDs, idFrom = "UNIPROT", orgdb = "org.Sc.sgd.db", ont = "MF", level = 2 ) barplotGroupGO_HC(ggo)
highcharter
Builds a boxplot from a dataframe using the package highcharter
boxPlotD_HC( obj, conds, keyId = NULL, legend = NULL, pal = NULL, subset.view = NULL )
boxPlotD_HC( obj, conds, keyId = NULL, legend = NULL, pal = NULL, subset.view = NULL )
obj |
Numeric matrix |
conds |
xxx |
keyId |
xxxx |
legend |
A vector of the conditions (one condition per sample). |
pal |
A basis palette for the boxes which length must be equal to the number of unique conditions in the dataset. |
subset.view |
A vector of index indicating which rows to highlight |
A boxplot
Samuel Wieczorek, Anais Courtier, Enora Fremy
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot conds <- legend <- Biobase::pData(obj)$Condition key <- "Protein_IDs" pal <- ExtendPalette(length(unique(conds))) boxPlotD_HC(obj, conds, key, legend, pal, seq_len(10))
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot conds <- legend <- Biobase::pData(obj)$Condition key <- "Protein_IDs" pal <- ExtendPalette(length(unique(conds))) boxPlotD_HC(obj, conds, key, legend, pal, seq_len(10))
Method to create a binary matrix with proteins in columns and peptides
in lines on a MSnSet
object (peptides)
BuildAdjacencyMatrix(obj.pep, protID, unique = TRUE)
BuildAdjacencyMatrix(obj.pep, protID, unique = TRUE)
obj.pep |
An object (peptides) of class |
protID |
The name of proteins ID column |
unique |
A boolean to indicate whether only the unique peptides must be considered (TRUE) or if the shared peptides have to be integrated (FALSE). |
A binary matrix
Florence Combes, Samuel Wieczorek, Alexia Dorffer
data(Exp1_R25_pept, package="DAPARdata") protId <- "Protein_group_IDs" BuildAdjacencyMatrix(Exp1_R25_pept[seq_len(10)], protId, TRUE)
data(Exp1_R25_pept, package="DAPARdata") protId <- "Protein_group_IDs" BuildAdjacencyMatrix(Exp1_R25_pept[seq_len(10)], protId, TRUE)
This function creates a column for the protein dataset after aggregation by using the previous peptide dataset.
BuildColumnToProteinDataset(peptideData, matAdj, columnName, proteinNames)
BuildColumnToProteinDataset(peptideData, matAdj, columnName, proteinNames)
peptideData |
A data.frame of meta data of peptides. It is the fData of the MSnset object. |
matAdj |
The adjacency matrix used to agregate the peptides data. |
columnName |
The name of the column in Biobase::fData(peptides_MSnset) that the user wants to keep in the new protein data.frame. |
proteinNames |
The names of the protein in the new dataset (i.e. rownames) |
A vector
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") protID <- "Protein_group_IDs" obj.pep <- Exp1_R25_pept[seq_len(10)] M <- BuildAdjacencyMatrix(obj.pep, protID, FALSE) data <- Biobase::fData(obj.pep) protData <- aggregateMean(obj.pep, M) name <- "Protein_group_IDs" proteinNames <- rownames(Biobase::fData(protData$obj.prot)) new.col <- BuildColumnToProteinDataset(data, M, name, proteinNames)
data(Exp1_R25_pept, package="DAPARdata") protID <- "Protein_group_IDs" obj.pep <- Exp1_R25_pept[seq_len(10)] M <- BuildAdjacencyMatrix(obj.pep, protID, FALSE) data <- Biobase::fData(obj.pep) protData <- aggregateMean(obj.pep, M) name <- "Protein_group_IDs" proteinNames <- rownames(Biobase::fData(protData$obj.prot)) new.col <- BuildColumnToProteinDataset(data, M, name, proteinNames)
Display a CC
buildGraph(The.CC, X)
buildGraph(The.CC, X)
The.CC |
A cc (a list) |
X |
xxxxx |
A plot
Thomas Burger, Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(100)] X <- BuildAdjacencyMatrix(obj, "Protein_group_IDs", FALSE) ll <- get.pep.prot.cc(X) g <- buildGraph(ll[[1]], X)
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(100)] X <- BuildAdjacencyMatrix(obj, "Protein_group_IDs", FALSE) ll <- get.pep.prot.cc(X) g <- buildGraph(ll[[1]], X)
This function the cells metadata info base on the origin of identification for entities. There are actually two different type of origin which are managed by DAPAR: - "Maxquant-like" info which is represented by strings/tags, - Proline-like where the info which is used is an integer
BuildMetaCell(from, level, qdata = NULL, conds = NULL, df = NULL)
BuildMetaCell(from, level, qdata = NULL, conds = NULL, df = NULL)
from |
A string which is the name of the software from which the data are. Available values are 'maxquant', 'proline' and 'DIA-NN' |
level |
xxx |
qdata |
An object of class |
conds |
xxx |
df |
A list of integer xxxxxxx |
xxxxx
Samuel Wieczorek
file <- system.file("extdata", "Exp1_R25_pept.txt", package = "DAPARdata") data <- read.table(file, header = TRUE, sep = "\t", stringsAsFactors = FALSE) metadataFile <- system.file("extdata", "samples_Exp1_R25.txt", package = "DAPARdata") metadata <- read.table(metadataFile, header = TRUE, sep = "\t", as.is = TRUE, stringsAsFactors = FALSE) conds <- metadata$Condition qdata <- data[, seq.int(from = 56, to = 61)] df <- data[, seq.int(from = 43, to = 48)] df <- BuildMetaCell( from = "maxquant", level = "peptide", qdata = qdata, conds = conds, df = df) df <- BuildMetaCell( from = "proline", level = "peptide", qdata = qdata, conds = conds, df = df)
file <- system.file("extdata", "Exp1_R25_pept.txt", package = "DAPARdata") data <- read.table(file, header = TRUE, sep = "\t", stringsAsFactors = FALSE) metadataFile <- system.file("extdata", "samples_Exp1_R25.txt", package = "DAPARdata") metadata <- read.table(metadataFile, header = TRUE, sep = "\t", as.is = TRUE, stringsAsFactors = FALSE) conds <- metadata$Condition qdata <- data[, seq.int(from = 56, to = 61)] df <- data[, seq.int(from = 43, to = 48)] df <- BuildMetaCell( from = "maxquant", level = "peptide", qdata = qdata, conds = conds, df = df) df <- BuildMetaCell( from = "proline", level = "peptide", qdata = qdata, conds = conds, df = df)
xxx
Check_NbValues_In_Columns(qdata)
Check_NbValues_In_Columns(qdata)
qdata |
xxx |
Check if the design is valid
check.conditions(conds)
check.conditions(conds)
conds |
A vector |
A list
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") check.conditions(Biobase::pData(Exp1_R25_pept)$Condition)
data(Exp1_R25_pept, package="DAPARdata") check.conditions(Biobase::pData(Exp1_R25_pept)$Condition)
Check if the design is valid
check.design(sTab)
check.design(sTab)
sTab |
The data.frame which correspond to the 'pData()' function of package 'MSnbase'. |
A boolean
Thomas Burger, Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") check.design(Biobase::pData(Exp1_R25_pept)[, seq_len(3)])
data(Exp1_R25_pept, package="DAPARdata") check.design(Biobase::pData(Exp1_R25_pept)[, seq_len(3)])
The first step is to standardize the data (with the Mfuzz
package). Then the function checks that these data are clusterizable or not
(use of [diptest::dip.test()] to determine whether the distribution is
unimodal or multimodal). Finally, it determines the "optimal" k by
the Gap statistic approach.
checkClusterability(standards, b = 500)
checkClusterability(standards, b = 500)
standards |
a matrix or dataframe containing only the standardized mean intensities returned by the function [standardiseMeanIntensities()] |
b |
Parameter B of the function [gap_cluster()] |
a list of 2 elements: * dip_test: the result of the clusterability of the data * gap_cluster: the gap statistic obtained with the function [cluster::clusGap()].
Helene Borges
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(100)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") averaged_means <- averageIntensities(obj$new) only_means <- dplyr::select_if(averaged_means, is.numeric) only_features <- dplyr::select_if(averaged_means, is.character) means <- purrr::map(purrr::array_branch(as.matrix(only_means), 1), mean) centered <- only_means - unlist(means) centered_means <- dplyr::bind_cols( feature = dplyr::as_tibble(only_features), dplyr::as_tibble(centered)) checkClust <- checkClusterability(centered_means, b = 100)
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(100)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") averaged_means <- averageIntensities(obj$new) only_means <- dplyr::select_if(averaged_means, is.numeric) only_features <- dplyr::select_if(averaged_means, is.character) means <- purrr::map(purrr::array_branch(as.matrix(only_means), 1), mean) centered <- only_means - unlist(means) centered_means <- dplyr::bind_cols( feature = dplyr::as_tibble(only_features), dplyr::as_tibble(centered)) checkClust <- checkClusterability(centered_means, b = 100)
xxx
Children(level, parent = NULL)
Children(level, parent = NULL)
level |
xxx |
parent |
xxx |
Children('protein', 'Missing') Children('protein', 'Missing POV') Children('protein', c('Missing POV', 'Missing MEC')) Children('protein', c('Missing', 'Missing POV', 'Missing MEC'))
Children('protein', 'Missing') Children('protein', 'Missing POV') Children('protein', c('Missing POV', 'Missing MEC')) Children('protein', c('Missing', 'Missing POV', 'Missing MEC'))
Function to perform a One-way Anova statistical test on a MsnBase dataset
classic1wayAnova(current_line, conditions)
classic1wayAnova(current_line, conditions)
current_line |
The line currently treated from the quantitative data to perform the ANOVA |
conditions |
The conditions represent the different classes of the studied factor |
A named vector containing all the different values of the aov model
Hélène Borges
## Not run: examples/ex_classic1wayAnova.R
## Not run: examples/ex_classic1wayAnova.R
highcharter
Plot to compare the quantitative proteomics data before and after
normalization using the package highcharter
compareNormalizationD_HC( qDataBefore, qDataAfter, keyId = NULL, conds = NULL, pal = NULL, subset.view = NULL, n = 1, type = "scatter" )
compareNormalizationD_HC( qDataBefore, qDataAfter, keyId = NULL, conds = NULL, pal = NULL, subset.view = NULL, n = 1, type = "scatter" )
qDataBefore |
A dataframe that contains quantitative data before normalization. |
qDataAfter |
A dataframe that contains quantitative data after normalization. |
keyId |
xxx |
conds |
A vector of the conditions (one condition per sample). |
pal |
xxx |
subset.view |
xxx |
n |
An integer that is equal to the maximum number of displayed points. This number must be less or equal to the size of the dataset. If it is less than it, it is a random selection |
type |
scatter or line |
A plot
Samuel Wieczorek
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot qDataBefore <- Biobase::exprs(obj) conds <- Biobase::pData(obj)[, "Condition"] id <- Biobase::fData(obj)[, 'Protein_IDs'] pal <- ExtendPalette(2) objAfter <- wrapper.normalizeD(obj, method = "QuantileCentering", conds = conds, type = "within conditions" ) n <- 1 compareNormalizationD_HC( qDataBefore = qDataBefore, qDataAfter = Biobase::exprs(objAfter), keyId = id, pal = pal, n = n, subset.view = seq_len(n), conds = conds)
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot qDataBefore <- Biobase::exprs(obj) conds <- Biobase::pData(obj)[, "Condition"] id <- Biobase::fData(obj)[, 'Protein_IDs'] pal <- ExtendPalette(2) objAfter <- wrapper.normalizeD(obj, method = "QuantileCentering", conds = conds, type = "within conditions" ) n <- 1 compareNormalizationD_HC( qDataBefore = qDataBefore, qDataAfter = Biobase::exprs(objAfter), keyId = id, pal = pal, n = n, subset.view = seq_len(n), conds = conds)
xxxxxx
compute_t_tests(obj, contrast = "OnevsOne", type = "Student")
compute_t_tests(obj, contrast = "OnevsOne", type = "Student")
obj |
A matrix of quantitative data, without any missing values. |
contrast |
Indicates if the test consists of the comparison of each biological condition versus each of the other ones (contrast=1; for example H0:"C1=C2" vs H1:"C1!=C2", etc.) or each condition versus all others (contrast=2; e.g. H0:"C1=(C2+C3)/2" vs H1:"C1!=(C2+C3)/2", etc. if there are three conditions). |
type |
xxxxx |
A list of two items : logFC and P_Value; both are dataframe. The first one contains the logFC values of all the comparisons (one column for one comparison), the second one contains the pvalue of all the comparisons (one column for one comparison). The names of the columns for those two dataframes are identical and correspond to the description of the comparison.
Florence Combes, Samuel Wieczorek
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(1000)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") ttest <- compute_t_tests(obj$new)
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(1000)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") ttest <- compute_t_tests(obj$new)
Applies an FDR threshold on a table of adjusted p-values and summarizes the results
compute.selection.table(x, fdr.threshold)
compute.selection.table(x, fdr.threshold)
x |
a table of adjusted p-values |
fdr.threshold |
an FDR threshold |
a summary of the number of significantly differentially abundant proteins, overall and per contrast
Thomas Burger
data(Exp1_R25_prot, package='DAPARdata') exdata <- Exp1_R25_prot[1:5,] adjpvaltab <- globalAdjPval(testAnovaModels(applyAnovasOnProteins(exdata), "TukeyHSD")$P_Value) seltab <- compute.selection.table(adjpvaltab, 0.2) seltab
data(Exp1_R25_prot, package='DAPARdata') exdata <- Exp1_R25_prot[1:5,] adjpvaltab <- globalAdjPval(testAnovaModels(applyAnovasOnProteins(exdata), "TukeyHSD")$P_Value) seltab <- compute.selection.table(adjpvaltab, 0.2) seltab
Biobase::exprs()
table.Displays a correlation matrix of the quantitative data of the
Biobase::exprs()
table.
corrMatrixD_HC(object, samplesData = NULL, rate = 0.5, showValues = TRUE)
corrMatrixD_HC(object, samplesData = NULL, rate = 0.5, showValues = TRUE)
object |
The result of the |
samplesData |
A dataframe in which lines correspond to samples and columns to the meta-data for those samples. |
rate |
The rate parameter to control the exponential law for the gradient of colors |
showValues |
xxx |
A colored correlation matrix
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") qData <- Biobase::exprs(Exp1_R25_pept) samplesData <- Biobase::pData(Exp1_R25_pept) res <- cor(qData, use = "pairwise.complete.obs") corrMatrixD_HC(res, samplesData)
data(Exp1_R25_pept, package="DAPARdata") qData <- Biobase::exprs(Exp1_R25_pept) samplesData <- Biobase::pData(Exp1_R25_pept) res <- cor(qData, use = "pairwise.complete.obs") corrMatrixD_HC(res, samplesData)
This function computes the number of peptides used to aggregate proteins.
CountPep(M)
CountPep(M)
M |
A "valued" adjacency matrix in which lines and columns correspond respectively to peptides and proteins. |
A vector of boolean which is the adjacency matrix but with NA values if they exist in the intensity matrix.
Alexia Dorffer
data(Exp1_R25_pept, package="DAPARdata") protID <- "Protein_group_IDs" M <- BuildAdjacencyMatrix(Exp1_R25_pept[seq_len(10)], protID, FALSE) CountPep(M)
data(Exp1_R25_pept, package="DAPARdata") protID <- "Protein_group_IDs" M <- BuildAdjacencyMatrix(Exp1_R25_pept[seq_len(10)], protID, FALSE) CountPep(M)
MSnSet
from text fileBuilds an object of class MSnSet
from a single tabulated-like file
for quantitative and meta-data and a dataframe for the samples description.
It differs from the original MSnSet
builder which requires three
separated files tabulated-like quantitative proteomic data into a
MSnSet
object, including metadata.
createMSnset( file, metadata = NULL, indExpData, colnameForID = NULL, indexForMetacell = NULL, logData = FALSE, replaceZeros = FALSE, pep_prot_data = NULL, proteinId = NULL, software = NULL )
createMSnset( file, metadata = NULL, indExpData, colnameForID = NULL, indexForMetacell = NULL, logData = FALSE, replaceZeros = FALSE, pep_prot_data = NULL, proteinId = NULL, software = NULL )
file |
The name of a tab-separated file that contains the data. |
metadata |
A dataframe describing the samples (in lines). |
indExpData |
A vector of string where each element is the name
of a column in designTable that have to be integrated in
the |
colnameForID |
The name of the column containing the ID of entities (peptides or proteins) |
indexForMetacell |
xxxxxxxxxxx |
logData |
A boolean value to indicate if the data have to be log-transformed (Default is FALSE) |
replaceZeros |
A boolean value to indicate if the 0 and NaN values of intensity have to be replaced by NA (Default is FALSE) |
pep_prot_data |
A string that indicates whether the dataset is about |
proteinId |
xxxx |
software |
xxx |
An instance of class MSnSet
.
Florence Combes, Samuel Wieczorek
require(Matrix) exprsFile <- system.file("extdata", "Exp1_R25_pept.txt", package = "DAPARdata") metadataFile <- system.file("extdata", "samples_Exp1_R25.txt", package = "DAPARdata" ) metadata <- read.table(metadataFile, header = TRUE, sep = "\t", as.is = TRUE) indExpData <- seq.int(from=56, to=61) colnameForID <- "id" obj <- createMSnset(exprsFile, metadata, indExpData, colnameForID, indexForMetacell = seq.int(from=43, to=48), pep_prot_data = "peptide", software = "maxquant" ) exprsFile <- system.file("extdata", "Exp1_R25_pept.txt", package = "DAPARdata") metadataFile <- system.file("extdata", "samples_Exp1_R25.txt", package = "DAPARdata") metadata <- read.table(metadataFile, header = TRUE, sep = "\t", as.is = TRUE) indExpData <- seq.int(from = 56, to = 61) colnameForID <- "AutoID" obj <- createMSnset(exprsFile, metadata, indExpData, colnameForID, indexForMetacell = seq.int(from = 43, to = 48), pep_prot_data = "peptide", software = "maxquant" )
require(Matrix) exprsFile <- system.file("extdata", "Exp1_R25_pept.txt", package = "DAPARdata") metadataFile <- system.file("extdata", "samples_Exp1_R25.txt", package = "DAPARdata" ) metadata <- read.table(metadataFile, header = TRUE, sep = "\t", as.is = TRUE) indExpData <- seq.int(from=56, to=61) colnameForID <- "id" obj <- createMSnset(exprsFile, metadata, indExpData, colnameForID, indexForMetacell = seq.int(from=43, to=48), pep_prot_data = "peptide", software = "maxquant" ) exprsFile <- system.file("extdata", "Exp1_R25_pept.txt", package = "DAPARdata") metadataFile <- system.file("extdata", "samples_Exp1_R25.txt", package = "DAPARdata") metadata <- read.table(metadataFile, header = TRUE, sep = "\t", as.is = TRUE) indExpData <- seq.int(from = 56, to = 61) colnameForID <- "AutoID" obj <- createMSnset(exprsFile, metadata, indExpData, colnameForID, indexForMetacell = seq.int(from = 43, to = 48), pep_prot_data = "peptide", software = "maxquant" )
MSnSet
from text fileBuilds an object of class MSnSet
from a single tabulated-like file
for quantitative and meta-data and a dataframe for the samples description.
It differs from the original MSnSet
builder which requires three
separated files tabulated-like quantitative proteomic data into a
MSnSet
object, including metadata.
createMSnset2( file, metadata = NULL, qdataNames, colnameForID = NULL, metacellNames = NULL, logData = FALSE, replaceZeros = FALSE, pep_prot_data = NULL, proteinId = NULL, software = NULL )
createMSnset2( file, metadata = NULL, qdataNames, colnameForID = NULL, metacellNames = NULL, logData = FALSE, replaceZeros = FALSE, pep_prot_data = NULL, proteinId = NULL, software = NULL )
file |
The name of a tab-separated file that contains the data. |
metadata |
A dataframe describing the samples (in lines). |
qdataNames |
A vector of string where each element is the name
of a column in designTable that have to be integrated in
the |
colnameForID |
The name of the column containing the ID of entities (peptides or proteins) |
metacellNames |
xxxxxxxxxxx |
logData |
A boolean value to indicate if the data have to be log-transformed (Default is FALSE) |
replaceZeros |
A boolean value to indicate if the 0 and NaN values of intensity have to be replaced by NA (Default is FALSE) |
pep_prot_data |
A string that indicates whether the dataset is about |
proteinId |
xxxx |
software |
xxx |
An instance of class MSnSet
.
Florence Combes, Samuel Wieczorek
require(Matrix) exprsFile <- system.file("extdata", "Exp1_R25_pept.txt", package = "DAPARdata") metadataFile <- system.file("extdata", "samples_Exp1_R25.txt", package = "DAPARdata" ) metadata <- read.table(metadataFile, header = TRUE, sep = "\t", as.is = TRUE) indExpData <- seq.int(from=56, to=61) colnameForID <- "id" obj <- createMSnset(exprsFile, metadata, indExpData, colnameForID, indexForMetacell = seq.int(from=43, to=48), pep_prot_data = "peptide", software = "maxquant" ) exprsFile <- system.file("extdata", "Exp1_R25_pept.txt", package = "DAPARdata") metadataFile <- system.file("extdata", "samples_Exp1_R25.txt", package = "DAPARdata") metadata <- read.table(metadataFile, header = TRUE, sep = "\t", as.is = TRUE) indExpData <- seq.int(from = 56, to = 61) colnameForID <- "AutoID" obj <- createMSnset(exprsFile, metadata, indExpData, colnameForID, indexForMetacell = seq.int(from = 43, to = 48), pep_prot_data = "peptide", software = "maxquant" )
require(Matrix) exprsFile <- system.file("extdata", "Exp1_R25_pept.txt", package = "DAPARdata") metadataFile <- system.file("extdata", "samples_Exp1_R25.txt", package = "DAPARdata" ) metadata <- read.table(metadataFile, header = TRUE, sep = "\t", as.is = TRUE) indExpData <- seq.int(from=56, to=61) colnameForID <- "id" obj <- createMSnset(exprsFile, metadata, indExpData, colnameForID, indexForMetacell = seq.int(from=43, to=48), pep_prot_data = "peptide", software = "maxquant" ) exprsFile <- system.file("extdata", "Exp1_R25_pept.txt", package = "DAPARdata") metadataFile <- system.file("extdata", "samples_Exp1_R25.txt", package = "DAPARdata") metadata <- read.table(metadataFile, header = TRUE, sep = "\t", as.is = TRUE) indExpData <- seq.int(from = 56, to = 61) colnameForID <- "AutoID" obj <- createMSnset(exprsFile, metadata, indExpData, colnameForID, indexForMetacell = seq.int(from = 43, to = 48), pep_prot_data = "peptide", software = "maxquant" )
Builds a densityplot of the CV of entities in the Biobase::exprs() table
of a object. The CV is calculated for each condition present
in the dataset (see the slot 'Condition'
in the
Biobase::pData()
table)
CVDistD_HC(qData, conds = NULL, pal = NULL)
CVDistD_HC(qData, conds = NULL, pal = NULL)
qData |
A dataframe that contains quantitative data. |
conds |
A vector of the conditions (one condition per sample). |
pal |
xxx |
A density plot
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") conds <- Biobase::pData(Exp1_R25_pept)[, "Condition"] CVDistD_HC(Biobase::exprs(Exp1_R25_pept), conds) pal <- ExtendPalette(2, "Dark2") CVDistD_HC(Biobase::exprs(Exp1_R25_pept), conds, pal)
data(Exp1_R25_pept, package="DAPARdata") conds <- Biobase::pData(Exp1_R25_pept)[, "Condition"] CVDistD_HC(Biobase::exprs(Exp1_R25_pept), conds) pal <- ExtendPalette(2, "Dark2") CVDistD_HC(Biobase::exprs(Exp1_R25_pept), conds, pal)
Customised resetZoomButton of highcharts plots
dapar_hc_chart(hc, chartType, zoomType = "None", width = 0, height = 0)
dapar_hc_chart(hc, chartType, zoomType = "None", width = 0, height = 0)
hc |
A highcharter object |
chartType |
The type of the plot |
zoomType |
The type of the zoom (one of "x", "y", "xy", "None") |
width |
xxx |
height |
xxx |
A highchart plot
Samuel Wieczorek
library("highcharter") hc <- highchart() hc <- dapar_hc_chart(hc, chartType = "line", zoomType = "x") hc_add_series(hc, data = c(29, 71, 40))
library("highcharter") hc <- highchart() hc <- dapar_hc_chart(hc, chartType = "line", zoomType = "x") hc_add_series(hc, data = c(29, 71, 40))
Customised contextual menu of highcharts plots
dapar_hc_ExportMenu(hc, filename)
dapar_hc_ExportMenu(hc, filename)
hc |
A highcharter object |
filename |
The filename under which the plot has to be saved |
A contextual menu for highcharts plots
Samuel Wieczorek
library("highcharter") hc <- highchart() hc_chart(hc, type = "line") hc_add_series(hc, data = c(29, 71, 40)) dapar_hc_ExportMenu(hc, filename = "foo")
library("highcharter") hc <- highchart() hc_chart(hc, type = "line") hc_add_series(hc, data = c(29, 71, 40)) dapar_hc_ExportMenu(hc, filename = "foo")
Delete the lines in the matrix of intensities and the metadata table given their indice.
deleteLinesFromIndices(obj, deleteThat = NULL, processText = "")
deleteLinesFromIndices(obj, deleteThat = NULL, processText = "")
obj |
An object of class |
deleteThat |
A vector of integers which are the indices of lines to delete. |
processText |
A string to be included in the |
An instance of class MSnSet
that have been filtered.
Florence Combes, Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj <- deleteLinesFromIndices(Exp1_R25_pept[seq_len(100)], c(seq_len(10)))
data(Exp1_R25_pept, package="DAPARdata") obj <- deleteLinesFromIndices(Exp1_R25_pept[seq_len(100)], c(seq_len(10)))
Densityplot of quantitative proteomics data over samples.
densityPlotD_HC(obj, legend = NULL, pal = NULL)
densityPlotD_HC(obj, legend = NULL, pal = NULL)
obj |
xxx |
legend |
A vector of the conditions (one condition per sample). |
pal |
xxx |
A density plot
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") densityPlotD_HC(Exp1_R25_pept) conds <- Biobase::pData(Exp1_R25_pept)$Condition pal <- ExtendPalette(2, "Dark2") densityPlotD_HC(Exp1_R25_pept, pal = pal)
data(Exp1_R25_pept, package="DAPARdata") densityPlotD_HC(Exp1_R25_pept) conds <- Biobase::pData(Exp1_R25_pept)$Condition pal <- ExtendPalette(2, "Dark2") densityPlotD_HC(Exp1_R25_pept, pal = pal)
This function is a wrapper to the function adjust.p from the 'cp4p' package.
It returns the FDR corresponding to the p-values of the differential
analysis. The FDR is computed with the function p.adjust
{stats}.
diffAnaComputeAdjustedPValues(pval, pi0Method = 1)
diffAnaComputeAdjustedPValues(pval, pi0Method = 1)
pval |
The result (p-values) of the differential analysis processed
by |
pi0Method |
The parameter pi0.method of the method adjust.p in the
package |
The computed adjusted p-values
Samuel Wieczorek
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(1000)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") qData <- Biobase::exprs(obj$new) sTab <- Biobase::pData(obj$new) limma <- limmaCompleteTest(qData, sTab) df <- data.frame(id = rownames(limma$logFC), logFC = limma$logFC[, 1], pval = limma$P_Value[, 1]) diffAnaComputeAdjustedPValues(pval = limma$P_Value[, 1])
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(1000)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") qData <- Biobase::exprs(obj$new) sTab <- Biobase::pData(obj$new) limma <- limmaCompleteTest(qData, sTab) df <- data.frame(id = rownames(limma$logFC), logFC = limma$logFC[, 1], pval = limma$P_Value[, 1]) diffAnaComputeAdjustedPValues(pval = limma$P_Value[, 1])
This function is a wrapper to the function adjust.p from the 'cp4p' package.
It returns the FDR corresponding to the p-values of the differential
analysis. The FDR is computed with the function p.adjust
{stats}.
diffAnaComputeFDR(adj.pvals)
diffAnaComputeFDR(adj.pvals)
adj.pvals |
xxxx |
The computed FDR value (floating number)
Samuel Wieczorek
NULL
NULL
Returns a MSnSet object with only proteins significant after differential analysis.
diffAnaGetSignificant(obj)
diffAnaGetSignificant(obj)
obj |
An object of class |
A MSnSet
Alexia Dorffer
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(100)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") qData <- Biobase::exprs(obj$new) sTab <- Biobase::pData(obj$new) allComp <- limmaCompleteTest(qData, sTab) data <- list(logFC = allComp$logFC[1], P_Value = allComp$P_Value[1]) obj$new <- diffAnaSave(obj$new, allComp, data) signif <- diffAnaGetSignificant(obj$new)
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(100)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") qData <- Biobase::exprs(obj$new) sTab <- Biobase::pData(obj$new) allComp <- limmaCompleteTest(qData, sTab) data <- list(logFC = allComp$logFC[1], P_Value = allComp$P_Value[1]) obj$new <- diffAnaSave(obj$new, allComp, data) signif <- diffAnaGetSignificant(obj$new)
MSnSet
object with the results of the differential
analysis performed with limma
package.This method returns a class MSnSet
object with the results of
differential analysis.
diffAnaSave(obj, allComp, data = NULL, th_pval = 0, th_logFC = 0)
diffAnaSave(obj, allComp, data = NULL, th_pval = 0, th_logFC = 0)
obj |
An object of class |
allComp |
A list of two items which is the result of the function wrapper.limmaCompleteTest or xxxx |
data |
The result of the differential analysis processed
by |
th_pval |
xxx |
th_logFC |
xxx |
A MSnSet
Alexia Dorffer, Samuel Wieczorek
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(100)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") qData <- Biobase::exprs(obj$new) sTab <- Biobase::pData(obj$new) allComp <- limmaCompleteTest(qData, sTab) data <- list(logFC = allComp$logFC[1], P_Value = allComp$P_Value[1]) diffAnaSave(obj$new, allComp, data)
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(100)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") qData <- Biobase::exprs(obj$new) sTab <- Biobase::pData(obj$new) allComp <- limmaCompleteTest(qData, sTab) data <- list(logFC = allComp$logFC[1], P_Value = allComp$P_Value[1]) diffAnaSave(obj$new, allComp, data)
Plots a volcanoplot after the differential analysis.
Typically, the log of Fold Change is represented on the X-axis and the
log10 of the p-value is drawn on the Y-axis. When the threshold_pVal
and the threshold_logFC
are set, two lines are drawn respectively on
the y-axis and the X-axis to visually distinguish between differential and
non differential data.
diffAnaVolcanoplot( logFC = NULL, pVal = NULL, threshold_pVal = 1e-60, threshold_logFC = 0, conditions = NULL, colors = NULL )
diffAnaVolcanoplot( logFC = NULL, pVal = NULL, threshold_pVal = 1e-60, threshold_logFC = 0, conditions = NULL, colors = NULL )
logFC |
A vector of the log(fold change) values of the differential analysis. |
pVal |
A vector of the p-value values returned by the differential analysis. |
threshold_pVal |
A floating number which represents the p-value that separates differential and non-differential data. |
threshold_logFC |
A floating number which represents the log of the Fold Change that separates differential and non-differential data. |
conditions |
A list of the names of condition 1 and 2 used for the differential analysis. |
colors |
xxx |
A volcanoplot
Florence Combes, Samuel Wieczorek
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(100)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") qData <- Biobase::exprs(obj$new) sTab <- Biobase::pData(obj$new) limma <- limmaCompleteTest(qData, sTab) diffAnaVolcanoplot(limma$logFC[, 1], limma$P_Value[, 1])
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(100)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") qData <- Biobase::exprs(obj$new) sTab <- Biobase::pData(obj$new) limma <- limmaCompleteTest(qData, sTab) diffAnaVolcanoplot(limma$logFC[, 1], limma$P_Value[, 1])
#' Plots an interactive volcanoplot after the differential analysis.
Typically, the log of Fold Change is represented on the X-axis and the
log10 of the p-value is drawn on the Y-axis. When the threshold_pVal
and the threshold_logFC
are set, two lines are drawn respectively on
the y-axis and the X-axis to visually distinguish between differential and
non differential data. With the use of the package Highcharter, a
customizable tooltip appears when the user put the mouse's pointer over
a point of the scatter plot.
diffAnaVolcanoplot_rCharts( df, threshold_pVal = 1e-60, threshold_logFC = 0, conditions = NULL, clickFunction = NULL, pal = NULL )
diffAnaVolcanoplot_rCharts( df, threshold_pVal = 1e-60, threshold_logFC = 0, conditions = NULL, clickFunction = NULL, pal = NULL )
df |
A dataframe which contains the following slots : x : a vector of the log(fold change) values of the differential analysis, y : a vector of the p-value values returned by the differential analysis. index : a vector of the rowanmes of the data. This dataframe must has been built with the option stringsAsFactors set to FALSE. There may be additional slots which will be used to show informations in the tooltip. The name of these slots must begin with the prefix "tooltip_". It will be automatically removed in the plot. |
threshold_pVal |
A floating number which represents the p-value that separates differential and non-differential data. |
threshold_logFC |
A floating number which represents the log of the Fold Change that separates differential and non-differential data. |
conditions |
A list of the names of condition 1 and 2 used for the differential analysis. |
clickFunction |
A string that contains a JavaScript function used to show info from slots in df. The variable this.index refers to the slot named index and allows to retrieve the right row to show in the tooltip. |
pal |
xxx |
An interactive volcanoplot
Samuel Wieczorek
library(highcharter) data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(100)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete")$new qData <- Biobase::exprs(obj) sTab <- Biobase::pData(obj) data <- limmaCompleteTest(qData, sTab) df <- data.frame( x = data$logFC, y = -log10(data$P_Value), index = as.character(rownames(obj)) ) colnames(df) <- c("x", "y", "index") tooltipSlot <- c("Fasta_headers", "Sequence_length") df <- cbind(df, Biobase::fData(obj)[, tooltipSlot]) colnames(df) <- gsub(".", "_", colnames(df), fixed = TRUE) if (ncol(df) > 3) { colnames(df)[seq.int(from = 4, to = ncol(df))] <- paste("tooltip_", colnames(df)[seq.int(from = 4, to = ncol(df))], sep = "") } hc_clickFunction <- JS("function(event) { Shiny.onInputChange('eventPointClicked', [this.index]+'_'+ [this.series.name]);}") cond <- c("25fmol", "10fmol") diffAnaVolcanoplot_rCharts(df, 2.5, 1, cond, hc_clickFunction)
library(highcharter) data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(100)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete")$new qData <- Biobase::exprs(obj) sTab <- Biobase::pData(obj) data <- limmaCompleteTest(qData, sTab) df <- data.frame( x = data$logFC, y = -log10(data$P_Value), index = as.character(rownames(obj)) ) colnames(df) <- c("x", "y", "index") tooltipSlot <- c("Fasta_headers", "Sequence_length") df <- cbind(df, Biobase::fData(obj)[, tooltipSlot]) colnames(df) <- gsub(".", "_", colnames(df), fixed = TRUE) if (ncol(df) > 3) { colnames(df)[seq.int(from = 4, to = ncol(df))] <- paste("tooltip_", colnames(df)[seq.int(from = 4, to = ncol(df))], sep = "") } hc_clickFunction <- JS("function(event) { Shiny.onInputChange('eventPointClicked', [this.index]+'_'+ [this.series.name]);}") cond <- c("25fmol", "10fmol") diffAnaVolcanoplot_rCharts(df, 2.5, 1, cond, hc_clickFunction)
Display a CC
display.CC.visNet( g, layout = layout_nicely, obj = NULL, prot.tooltip = NULL, pept.tooltip = NULL )
display.CC.visNet( g, layout = layout_nicely, obj = NULL, prot.tooltip = NULL, pept.tooltip = NULL )
g |
A cc (a list) |
layout |
xxxxx |
obj |
xxx |
prot.tooltip |
xxx |
pept.tooltip |
xxx |
A plot
Thomas Burger, Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(100)] X <- BuildAdjacencyMatrix(obj, "Protein_group_IDs", FALSE) ll <- get.pep.prot.cc(X) g <- buildGraph(ll[[1]], X) display.CC.visNet(g)
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(100)] X <- BuildAdjacencyMatrix(obj, "Protein_group_IDs", FALSE) ll <- get.pep.prot.cc(X) g <- buildGraph(ll[[1]], X) display.CC.visNet(g)
This function is a wrappper to the function enrichGO from the package 'clusterProfiler'. Given a vector of genes/proteins, it returns an enrichResult instance.
enrich_GO(data, idFrom, orgdb, ont, readable = FALSE, pval, universe)
enrich_GO(data, idFrom, orgdb, ont, readable = FALSE, pval, universe)
data |
A vector of ID (among ENSEMBL, ENTREZID, GENENAME, REFSEQ, UNIGENE, UNIPROT -can be different according to organisms) |
idFrom |
character indicating the input ID format (among ENSEMBL, ENTREZID, GENENAME, REFSEQ, UNIGENE, UNIPROT) |
orgdb |
annotation Bioconductor package to use (character format) |
ont |
One of "MF", "BP", and "CC" subontologies |
readable |
TRUE or FALSE (default FALSE) |
pval |
The qvalue cutoff (same parameter as in the function
|
universe |
a list of ID to be considered as the background for enrichment calculation |
A groupGOResult instance.
Florence Combes
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(10)] if (!requireNamespace("org.Sc.sgd.db", quietly = TRUE)) { stop("Please install org.Sc.sgd.db: BiocManager::install('org.Sc.sgd.db')") } library(org.Sc.sgd.db) univ <- univ_AnnotDbPkg("org.Sc.sgd.db") # univ is the background ego <- enrich_GO( data = Biobase::fData(obj)$Protein.IDs, idFrom = "UNIPROT", orgdb = "org.Sc.sgd.db", ont = "MF", pval = 0.05, universe = univ )
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(10)] if (!requireNamespace("org.Sc.sgd.db", quietly = TRUE)) { stop("Please install org.Sc.sgd.db: BiocManager::install('org.Sc.sgd.db')") } library(org.Sc.sgd.db) univ <- univ_AnnotDbPkg("org.Sc.sgd.db") # univ is the background ego <- enrich_GO( data = Biobase::fData(obj)$Protein.IDs, idFrom = "UNIPROT", orgdb = "org.Sc.sgd.db", ont = "MF", pval = 0.05, universe = univ )
The colors in the returned palette are always in the same order
ExtendPalette(n = NULL, base = "Set1")
ExtendPalette(n = NULL, base = "Set1")
n |
The number of desired colors in the palette |
base |
The name of the palette of the package RColorBrewer from which the extended palette is built. Default value is 'Set1'. |
A vector composed of n color code.
Samuel Wieczorek
ExtendPalette(12) nPalette <- 10 par(mfrow = c(nPalette, 1)) par(mar = c(0.5, 4.5, 0.5, 0.5)) for (i in seq_len(nPalette)) { pal <- ExtendPalette(n = i, base = "Dark2") barplot(seq_len(length(pal)), col = pal) print(pal) }
ExtendPalette(12) nPalette <- 10 par(mfrow = c(nPalette, 1)) par(mar = c(0.5, 4.5, 0.5, 0.5)) for (i in seq_len(nPalette)) { pal <- ExtendPalette(n = i, base = "Dark2") barplot(seq_len(length(pal)), col = pal) print(pal) }
Method to finalize the aggregation process
finalizeAggregation(obj.pep, pepData, protData, protMetacell, X)
finalizeAggregation(obj.pep, pepData, protData, protMetacell, X)
obj.pep |
A peptide object of class |
pepData |
xxxx |
protData |
xxxxx |
protMetacell |
xxx |
X |
An adjacency matrix in which lines and columns correspond respectively to peptides and proteins. |
A protein object of class MSnset
Samuel Wieczorek
NULL
NULL
MSnSet
objectFinds the LAPALA into a MSnSet
object
findMECBlock(obj)
findMECBlock(obj)
obj |
An object of class |
A data.frame that contains the indexes of LAPALA
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(100)] lapala <- findMECBlock(obj)
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(100)] lapala <- findMECBlock(obj)
xxx
formatHSDResults(post_hoc_models_summaries)
formatHSDResults(post_hoc_models_summaries)
post_hoc_models_summaries |
xxx |
xxx
Thomas Burger
NULL
NULL
xxxx
formatLimmaResult(fit, conds, contrast, design.level)
formatLimmaResult(fit, conds, contrast, design.level)
fit |
xxxx |
conds |
xxxx |
contrast |
xxxx |
design.level |
xxx |
A list of two dataframes : logFC and P_Value. The first one contains the logFC values of all the comparisons (one column for one comparison), the second one contains the pvalue of all the comparisons (one column for one comparison). The names of the columns for those two dataframes are identical and correspond to the description of the comparison.
Samuel Wieczorek
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(100)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") qData <- Biobase::exprs(obj$new) sTab <- Biobase::pData(obj$new) limma <- limmaCompleteTest(qData, sTab)
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(100)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") qData <- Biobase::exprs(obj$new) sTab <- Biobase::pData(obj$new) limma <- limmaCompleteTest(qData, sTab)
Extract logFC and raw pvalues from multiple post-hoc models summaries
formatPHResults(post_hoc_models_summaries)
formatPHResults(post_hoc_models_summaries)
post_hoc_models_summaries |
a list of summaries of post-hoc models. |
a list of 2 dataframes containing the logFC values and pvalues for each comparison.
Hélène Borges
## Not run: examples/ex_formatPHResults.R
## Not run: examples/ex_formatPHResults.R
xxx
formatPHTResults(post_hoc_models_summaries)
formatPHTResults(post_hoc_models_summaries)
post_hoc_models_summaries |
xxx |
xxx
Thomas Burger
NULL
NULL
#' fudge2LRT: heuristic to choose the value of the hyperparameter (fudge factor) used to regularize the variance estimator in the likelihood ratio statistic (as implemented in samLRT). We follow the heuristic described in [1] and adapt the code of the fudge2 function in the siggene R package. [1] Tusher, Tibshirani and Chu, Significance analysis of microarrays applied to the ionizing radiation response, PNAS 2001 98: 5116-5121, (Apr 24).
fudge2LRT( lmm.res.h0, lmm.res.h1, cc, n, p, s, alpha = seq(0, 1, 0.05), include.zero = TRUE )
fudge2LRT( lmm.res.h0, lmm.res.h1, cc, n, p, s, alpha = seq(0, 1, 0.05), include.zero = TRUE )
lmm.res.h0 |
a vector of object containing the estimates (used to compute the statistic) under H0 for each connected component. If the fast version of the estimator was used (as implemented in this package), lmm.res.h0 is a vector containing averages of squared residuals. If a fixed effect model was used, it is a vector of lm objects and if a mixed effect model was used it is a vector or lmer object. |
lmm.res.h1 |
similar to lmm.res.h0, a vector of object containing the estimates (used to compute the statistic) under H1 for each protein. |
cc |
a list containing the indices of peptides and proteins belonging to each connected component. |
n |
the number of samples used in the test |
p |
the number of proteins in the experiment |
s |
a vector containing the maximum likelihood estimate of the variance for the chosen model. When using the fast version of the estimator implemented in this package, this is the same thing as the input lmm.res.h1. For other models (e.g. mixed models) it can be obtained from samLRT. |
alpha |
A vector of proportions used to build candidate values for the regularizer. We use quantiles of s with these proportions. Default to seq(0, 1, 0.05) |
include.zero |
logical value indicating if 0 should be included in the list of candidates. Default to TRUE. |
(same as the fudge2 function of siggene): s.zero: the value of the fudge factor s0. alpha.hat: the optimal quantile of the 's' values. If s0=0, 'alpha.hat' will not be returned. vec.cv: the vector of the coefficients of variations. Following Tusher et al. (2001), the optimal 'alpha' quantile is given by the quantile that leads to the smallest CV of the modified test statistics. msg: a character string summarizing the most important information about the fudge factor.
Thomas Burger, Laurent Jacob
NULL
NULL
MSnSet
.This method returns a list of the statistical tests performed with DAPAR and
recorded in an object of class MSnSet
.
Get_AllComparisons(obj)
Get_AllComparisons(obj)
obj |
An object of class |
A list of two slots: logFC and P_Value
Samuel Wieczorek
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(1000)] level <- GetTypeofData(obj) metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") qData <- Biobase::exprs(obj$new) sTab <- Biobase::pData(obj$new) allComp <- limmaCompleteTest(qData, sTab) data <- list(logFC = allComp$logFC[1], P_Value = allComp$P_Value[1]) obj$new <- diffAnaSave(obj$new, allComp, data) ll <- Get_AllComparisons(obj$new)
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(1000)] level <- GetTypeofData(obj) metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") qData <- Biobase::exprs(obj$new) sTab <- Biobase::pData(obj$new) allComp <- limmaCompleteTest(qData, sTab) data <- list(logFC = allComp$logFC[1], P_Value = allComp$P_Value[1]) obj$new <- diffAnaSave(obj$new, allComp, data) ll <- Get_AllComparisons(obj$new)
Build the list of connex composant of the adjacency matrix
get.pep.prot.cc(X)
get.pep.prot.cc(X)
X |
An adjacency matrix |
A list of CC
Thomas Burger, Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10)] X <- BuildAdjacencyMatrix(obj, "Protein_group_IDs", FALSE) ll <- get.pep.prot.cc(X)
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10)] X <- BuildAdjacencyMatrix(obj, "Protein_group_IDs", FALSE) ll <- get.pep.prot.cc(X)
MSnSet
Returns the contains of the slot processing of an object of
class MSnSet
GetCC(obj)
GetCC(obj)
obj |
An object (peptides) of class |
A list of connected components
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") Xshared <- BuildAdjacencyMatrix(Exp1_R25_pept[seq_len(100)], "Protein_group_IDs", FALSE) Xunique <- BuildAdjacencyMatrix(Exp1_R25_pept[seq_len(100)], "Protein_group_IDs", TRUE) ll.X <- list(matWithSharedPeptides = Xshared, matWithUniquePeptides = Xunique) Exp1_R25_pept <- SetMatAdj(Exp1_R25_pept, ll.X) ll1 <- get.pep.prot.cc(GetMatAdj(Exp1_R25_pept)$matWithSharedPeptides) ll2 <- get.pep.prot.cc( GetMatAdj(Exp1_R25_pept)$matWithUniquePeptides) cc <- list(allPep = ll1, onlyUniquePep = ll2) Exp1_R25_pept <- SetCC(Exp1_R25_pept, cc) ll.cc <- GetCC(Exp1_R25_pept)
data(Exp1_R25_pept, package="DAPARdata") Xshared <- BuildAdjacencyMatrix(Exp1_R25_pept[seq_len(100)], "Protein_group_IDs", FALSE) Xunique <- BuildAdjacencyMatrix(Exp1_R25_pept[seq_len(100)], "Protein_group_IDs", TRUE) ll.X <- list(matWithSharedPeptides = Xshared, matWithUniquePeptides = Xunique) Exp1_R25_pept <- SetMatAdj(Exp1_R25_pept, ll.X) ll1 <- get.pep.prot.cc(GetMatAdj(Exp1_R25_pept)$matWithSharedPeptides) ll2 <- get.pep.prot.cc( GetMatAdj(Exp1_R25_pept)$matWithUniquePeptides) cc <- list(allPep = ll1, onlyUniquePep = ll2) Exp1_R25_pept <- SetCC(Exp1_R25_pept, cc) ll.cc <- GetCC(Exp1_R25_pept)
xxxx
GetColorsForConditions(conds, pal = NULL)
GetColorsForConditions(conds, pal = NULL)
conds |
The extended vector of samples conditions |
pal |
A vector of HEX color code that form the basis palette from which to build the complete color vector for the conditions. |
A vector composed of HEX color code for the conditions
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") conditions <- Biobase::pData(Exp1_R25_pept)$Condition GetColorsForConditions(conditions, ExtendPalette(2))
data(Exp1_R25_pept, package="DAPARdata") conditions <- Biobase::pData(Exp1_R25_pept)$Condition GetColorsForConditions(conditions, ExtendPalette(2))
xxx
getDesignLevel(sTab)
getDesignLevel(sTab)
sTab |
xxx |
data(Exp1_R25_pept, package="DAPARdata") sTab <- Biobase::pData(Exp1_R25_pept) getDesignLevel(sTab)
data(Exp1_R25_pept, package="DAPARdata") sTab <- Biobase::pData(Exp1_R25_pept) getDesignLevel(sTab)
Method to compute the detailed number of quantified peptides for each protein
GetDetailedNbPeptides(X)
GetDetailedNbPeptides(X)
X |
An adjacency matrix |
A data.frame
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj.pep <- Exp1_R25_pept[seq_len(10)] protID <- "Protein_group_IDs" X <- BuildAdjacencyMatrix(obj.pep, protID, FALSE) n <- GetDetailedNbPeptides(X)
data(Exp1_R25_pept, package="DAPARdata") obj.pep <- Exp1_R25_pept[seq_len(10)] protID <- "Protein_group_IDs" X <- BuildAdjacencyMatrix(obj.pep, protID, FALSE) n <- GetDetailedNbPeptides(X)
Method to compute the detailed number of quantified peptides used for aggregating each protein
GetDetailedNbPeptidesUsed(X, qdata.pep)
GetDetailedNbPeptidesUsed(X, qdata.pep)
X |
An adjacency matrix |
qdata.pep |
A data.frame of quantitative data |
A list of two items
Samuel Wieczorek library(MSnbase) data(Exp1_R25_pept, package="DAPARdata") protID <- "Protein_group_IDs" X <- BuildAdjacencyMatrix(Exp1_R25_pept[seq_len(10)], protID, FALSE) ll.n <- GetDetailedNbPeptidesUsed(X, Biobase::exprs(Exp1_R25_pept[seq_len(10)]))
NULL
NULL
This function looks for the lines that respect the request in either all conditions or at least one condition.
GetIndices_BasedOnConditions(metacell.mask, type, conds, percent, op, th)
GetIndices_BasedOnConditions(metacell.mask, type, conds, percent, op, th)
metacell.mask |
xxx |
type |
Available values are: * 'AllCond' (the query is valid in all the conditions), * 'AtLeatOneCond' (the query is valid in at leat one condition. |
conds |
xxx |
percent |
xxx |
op |
String for operator to use. List of operators is available with SymFilteringOperators(). |
th |
The theshold to apply |
xxx
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10)] level <- GetTypeofData(obj) pattern <- 'Missing' metacell.mask <- match.metacell(metadata=GetMetacell(obj), pattern=pattern, level=level) type <- 'AllCond' conds <- Biobase::pData(obj)$Condition op <- '>=' th <- 0.5 percent <- TRUE ind <- GetIndices_BasedOnConditions(metacell.mask, type, conds, percent, op, th)
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10)] level <- GetTypeofData(obj) pattern <- 'Missing' metacell.mask <- match.metacell(metadata=GetMetacell(obj), pattern=pattern, level=level) type <- 'AllCond' conds <- Biobase::pData(obj)$Condition op <- '>=' th <- 0.5 percent <- TRUE ind <- GetIndices_BasedOnConditions(metacell.mask, type, conds, percent, op, th)
Delete the lines in the matrix of intensities and the metadata table given their indice.
GetIndices_MetacellFiltering( obj, level, pattern = NULL, type = NULL, percent, op, th )
GetIndices_MetacellFiltering( obj, level, pattern = NULL, type = NULL, percent, op, th )
obj |
An object of class |
level |
A vector of integers which are the indices of lines to delete. |
pattern |
A string to be included in the |
type |
xxx |
percent |
xxx |
op |
xxx |
th |
xxx |
An instance of class MSnSet
that have been filtered.
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10)] level <- GetTypeofData(obj) pattern <- c("Missing", "Missing POV") type <- "AtLeastOneCond" percent <- FALSE op <- ">=" th <- 1 indices <- GetIndices_MetacellFiltering(obj, level, pattern, type, percent, op, th) pattern <- "Quantified" type <- "AtLeastOneCond" percent <- FALSE op <- ">=" th <- 4 indices2.1 <- GetIndices_MetacellFiltering(obj, level, pattern, type, percent, op, th) pattern <- "Quant. by direct id" type <- "AtLeastOneCond" percent <- FALSE op <- ">=" th <- 3 indices2.2 <- GetIndices_MetacellFiltering(obj, level, pattern, type, percent, op, th)
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10)] level <- GetTypeofData(obj) pattern <- c("Missing", "Missing POV") type <- "AtLeastOneCond" percent <- FALSE op <- ">=" th <- 1 indices <- GetIndices_MetacellFiltering(obj, level, pattern, type, percent, op, th) pattern <- "Quantified" type <- "AtLeastOneCond" percent <- FALSE op <- ">=" th <- 4 indices2.1 <- GetIndices_MetacellFiltering(obj, level, pattern, type, percent, op, th) pattern <- "Quant. by direct id" type <- "AtLeastOneCond" percent <- FALSE op <- ">=" th <- 3 indices2.2 <- GetIndices_MetacellFiltering(obj, level, pattern, type, percent, op, th)
This function looks for the lines where each element respect the query.
GetIndices_WholeLine(metacell.mask)
GetIndices_WholeLine(metacell.mask)
metacell.mask |
xxx |
xxx
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq.int(from=20, to=30)] level <- 'peptide' pattern <- "Missing POV" metacell.mask <- match.metacell(metadata = GetMetacell(obj), pattern = pattern, level = level) ind <- GetIndices_WholeLine(metacell.mask)
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq.int(from=20, to=30)] level <- 'peptide' pattern <- "Missing POV" metacell.mask <- match.metacell(metadata = GetMetacell(obj), pattern = pattern, level = level) ind <- GetIndices_WholeLine(metacell.mask)
This function looks for the lines that respect the request in either all conditions or at least one condition.
GetIndices_WholeMatrix(metacell.mask, op = "==", percent = FALSE, th = 0)
GetIndices_WholeMatrix(metacell.mask, op = "==", percent = FALSE, th = 0)
metacell.mask |
xxx |
op |
String for operator to use. List of operators is available with SymFilteringOperators(). |
percent |
A boolean to indicate whether the threshold represent an absolute value (percent = FALSE) or a percentage (percent=TRUE). |
th |
A floating number which is in the interval [0, 1] |
xxx
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10)] level <- 'peptide' pattern <- "Missing" metacell.mask <- match.metacell(metadata = GetMetacell(obj), pattern = pattern, level = level) percent <- FALSE th <- 3 op <- ">=" ind <- GetIndices_WholeMatrix(metacell.mask, op, percent, th)
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10)] level <- 'peptide' pattern <- "Missing" metacell.mask <- match.metacell(metadata = GetMetacell(obj), pattern = pattern, level = level) percent <- FALSE th <- 3 op <- ">=" ind <- GetIndices_WholeMatrix(metacell.mask, op, percent, th)
Returns a list for the two conditions where each slot is a vector of indices for the samples.
getIndicesConditions(conds, cond1, cond2)
getIndicesConditions(conds, cond1, cond2)
conds |
A vector of strings containing the column "Condition" of
the |
cond1 |
A vector of Conditions (a slot in the |
cond2 |
A vector of Conditions (a slot in the |
A list with two slots iCond1
and iCond2
containing
respectively the indices of samples in the Biobase::pData()
table
of the dataset.
Florence Combes, Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") conds <- Biobase::pData(Exp1_R25_pept)[, "Condition"] getIndicesConditions(conds, "25fmol", "10fmol")
data(Exp1_R25_pept, package="DAPARdata") conds <- Biobase::pData(Exp1_R25_pept)[, "Condition"] getIndicesConditions(conds, "25fmol", "10fmol")
Get the indices of the lines to delete, based on a prefix string
getIndicesOfLinesToRemove(obj, idLine2Delete = NULL, prefix = NULL)
getIndicesOfLinesToRemove(obj, idLine2Delete = NULL, prefix = NULL)
obj |
An object of class |
idLine2Delete |
The name of the column that correspond to the data to filter |
prefix |
A character string that is the prefix to find in the data |
A vector of integers.
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") ind <- getIndicesOfLinesToRemove(Exp1_R25_pept[seq_len(100)], "Potential_contaminant", prefix = "+" )
data(Exp1_R25_pept, package="DAPARdata") ind <- getIndicesOfLinesToRemove(Exp1_R25_pept[seq_len(100)], "Potential_contaminant", prefix = "+" )
xxxx
GetKeyId(obj)
GetKeyId(obj)
obj |
xxx |
xxx
data(Exp1_R25_pept, package="DAPARdata") GetKeyId(Exp1_R25_pept)
data(Exp1_R25_pept, package="DAPARdata") GetKeyId(Exp1_R25_pept)
Returns the possible number of values in lines in the data
getListNbValuesInLines(obj, type)
getListNbValuesInLines(obj, type)
obj |
An object of class |
type |
xxxxxxx |
An integer
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") getListNbValuesInLines(Exp1_R25_pept, "WholeMatrix")
data(Exp1_R25_pept, package="DAPARdata") getListNbValuesInLines(Exp1_R25_pept, "WholeMatrix")
MSnSet
Returns the contains of the slot processing of an object of
class MSnSet
GetMatAdj(obj)
GetMatAdj(obj)
obj |
An object (peptides) of class |
The slot processing of obj@processingData
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") Xshared <- BuildAdjacencyMatrix(Exp1_R25_pept[seq_len(100)], "Protein_group_IDs", FALSE) Xunique <- BuildAdjacencyMatrix(Exp1_R25_pept[seq_len(100)], "Protein_group_IDs", TRUE) ll.X <- list(matWithSharedPeptides = Xshared, matWithUniquePeptides = Xunique) Exp1_R25_pept <- SetMatAdj(Exp1_R25_pept, ll.X) ll.X <- GetMatAdj(Exp1_R25_pept)
data(Exp1_R25_pept, package="DAPARdata") Xshared <- BuildAdjacencyMatrix(Exp1_R25_pept[seq_len(100)], "Protein_group_IDs", FALSE) Xunique <- BuildAdjacencyMatrix(Exp1_R25_pept[seq_len(100)], "Protein_group_IDs", TRUE) ll.X <- list(matWithSharedPeptides = Xshared, matWithUniquePeptides = Xunique) Exp1_R25_pept <- SetMatAdj(Exp1_R25_pept, ll.X) ll.X <- GetMatAdj(Exp1_R25_pept)
xxxx
GetMetacell(obj)
GetMetacell(obj)
obj |
xxxx |
xxx
NULL
NULL
This function gives the list of metacell tags available in DAPAR.
- onlyPresent: In this case, the function gives the tags found in a dataset. In addition, and w.r.t to the hierarchy of tags, if all leaves of a node are present, then the tag corresponding to this node is added.
GetMetacellTags(level = NULL, obj = NULL, onlyPresent = FALSE, all = FALSE)
GetMetacellTags(level = NULL, obj = NULL, onlyPresent = FALSE, all = FALSE)
level |
xxx |
obj |
An object of class |
onlyPresent |
A boolean that indicates if one wants a list with only the tags present in the dataset. |
all |
A boolean that indicates if one wants the whole list |
A vector of tags..
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept GetMetacellTags(level="peptide") GetMetacellTags(level="peptide", obj, onlyPresent=TRUE)
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept GetMetacellTags(level="peptide") GetMetacellTags(level="peptide", obj, onlyPresent=TRUE)
Method to compute the number of quantified peptides used for aggregating each protein
GetNbPeptidesUsed(X, pepData)
GetNbPeptidesUsed(X, pepData)
X |
An adjacency matrix |
pepData |
A data.frame of quantitative data |
A data.frame
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") protID <- "Protein_group_IDs" obj.pep <- Exp1_R25_pept[seq_len(10)] X <- BuildAdjacencyMatrix(obj.pep, protID, FALSE) pepData <- Biobase::exprs(obj.pep) GetNbPeptidesUsed(X, pepData)
data(Exp1_R25_pept, package="DAPARdata") protID <- "Protein_group_IDs" obj.pep <- Exp1_R25_pept[seq_len(10)] X <- BuildAdjacencyMatrix(obj.pep, protID, FALSE) pepData <- Biobase::exprs(obj.pep) GetNbPeptidesUsed(X, pepData)
Number of each metacell tags
GetNbTags(obj)
GetNbTags(obj)
obj |
A instance of the class 'MSnset' |
NULL
NULL
Returns the number of lines, in a given column, where content matches the prefix.
getNumberOf(obj, name = NULL, prefix = NULL)
getNumberOf(obj, name = NULL, prefix = NULL)
obj |
An object of class |
name |
The name of a column. |
prefix |
A string |
An integer
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") getNumberOf(Exp1_R25_pept[seq_len(100)], "Potential_contaminant", "+")
data(Exp1_R25_pept, package="DAPARdata") getNumberOf(Exp1_R25_pept[seq_len(100)], "Potential_contaminant", "+")
Returns the number of empty lines in a matrix.
getNumberOfEmptyLines(qData)
getNumberOfEmptyLines(qData)
qData |
A matrix corresponding to the quantitative data. |
An integer
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") qData <- Biobase::exprs(Exp1_R25_pept) getNumberOfEmptyLines(qData)
data(Exp1_R25_pept, package="DAPARdata") qData <- Biobase::exprs(Exp1_R25_pept) getNumberOfEmptyLines(qData)
Returns the percentage of missing values in the quantitative
data (Biobase::exprs()
table of the dataset).
getPourcentageOfMV(obj)
getPourcentageOfMV(obj)
obj |
An object of class |
A floating number
Florence Combes, Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") getPourcentageOfMV(Exp1_R25_pept[seq_len(100), ])
data(Exp1_R25_pept, package="DAPARdata") getPourcentageOfMV(Exp1_R25_pept[seq_len(100), ])
MSnSet
Returns the contains of the slot processing of an object of
class MSnSet
getProcessingInfo(obj)
getProcessingInfo(obj)
obj |
An object (peptides) of class |
The slot processing of obj@processingData
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") getProcessingInfo(Exp1_R25_pept)
data(Exp1_R25_pept, package="DAPARdata") getProcessingInfo(Exp1_R25_pept)
This function computes the number of proteins that are only defined by specific peptides, shared peptides or a mixture of two.
getProteinsStats(matShared)
getProteinsStats(matShared)
matShared |
The adjacency matrix with both specific and shared peptides. |
A list
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") protID <- "Protein_group_IDs" obj <- Exp1_R25_pept[seq_len(20)] MShared <- BuildAdjacencyMatrix(obj, protID, FALSE) getProteinsStats(matShared = MShared)
data(Exp1_R25_pept, package="DAPARdata") protID <- "Protein_group_IDs" obj <- Exp1_R25_pept[seq_len(20)] MShared <- BuildAdjacencyMatrix(obj, protID, FALSE) getProteinsStats(matShared = MShared)
This method returns the q-th quantile of each column of an expression set, up to a scaling factor
getQuantile4Imp(qdata, qval = 0.025, factor = 1)
getQuantile4Imp(qdata, qval = 0.025, factor = 1)
qdata |
An expression set containing quantitative values of various replicates |
qval |
The quantile used to define the imputation value |
factor |
A scaling factor to multiply the imputation value with |
A list of two vectors, respectively containing the imputation values and the rescaled imputation values
Thomas Burger
data(Exp1_R25_prot, package="DAPARdata") qdata <- Biobase::exprs(Exp1_R25_prot) quant <- getQuantile4Imp(qdata)
data(Exp1_R25_prot, package="DAPARdata") qdata <- Biobase::exprs(Exp1_R25_prot) quant <- getQuantile4Imp(qdata)
The set of softwares available
GetSoftAvailables()
GetSoftAvailables()
GetSoftAvailables()
GetSoftAvailables()
* includeSharedPeptides, * operator, * considerPeptides, * proteinId, * topN
getTextForAggregation(l.params)
getTextForAggregation(l.params)
l.params |
A list of parameters related to the process of the dataset |
A string
Samuel Wieczorek
params <- list() getTextForAggregation(params)
params <- list() getTextForAggregation(params)
* Condition1 * Condition2 * Comparison * filterType * filter_th_NA * calibMethod * numValCalibMethod * th_pval * FDR * NbSelected
getTextForAnaDiff(l.params)
getTextForAnaDiff(l.params)
l.params |
A list of parameters related to the process of the dataset |
A string
Samuel Wieczorek
getTextForAnaDiff(list(design = "OnevsOne", method = "Limma"))
getTextForAnaDiff(list(design = "OnevsOne", method = "Limma"))
Build the text information for the filtering process
getTextForFiltering(l.params)
getTextForFiltering(l.params)
l.params |
A list of parameters related to the process of the dataset |
A string
Samuel Wieczorek
getTextForFiltering(list(filename = "foo.msnset"))
getTextForFiltering(list(filename = "foo.msnset"))
Build the text information for the Aggregation process
getTextForGOAnalysis(l.params)
getTextForGOAnalysis(l.params)
l.params |
A list of parameters related to the process of the dataset |
A string
Samuel Wieczorek
getTextForGOAnalysis(list())
getTextForGOAnalysis(list())
* design, * method, * ttest_options, * th_logFC, * AllPairwiseCompNames = list( * logFC, * P_Value)
getTextForHypothesisTest(l.params)
getTextForHypothesisTest(l.params)
l.params |
A list of parameters related to the process of the dataset |
A string
Samuel Wieczorek
params <- list(design = "OnevsOne", method = "limma") getTextForHypothesisTest(params)
params <- list(design = "OnevsOne", method = "limma") getTextForHypothesisTest(params)
Build the text information for a new dataset
getTextForNewDataset(l.params)
getTextForNewDataset(l.params)
l.params |
A list of parameters related to the process of the dataset |
A string
Samuel Wieczorek
getTextForNewDataset(list(filename = "foo.msnset"))
getTextForNewDataset(list(filename = "foo.msnset"))
The items of the parameter list for the normalisation is: * method, * type, * varReduction, * quantile,
getTextForNormalization(l.params)
getTextForNormalization(l.params)
l.params |
A list of parameters related to the process of the dataset |
A string
Samuel Wieczorek
getTextForNormalization(list(method = "SumByColumns"))
getTextForNormalization(list(method = "SumByColumns"))
* pepLevel_algorithm, * pepLevel_basicAlgorithm, * pepLevel_detQuantile, * pepLevel_detQuant_factor, * pepLevel_imp4p_nbiter, * pepLevel_imp4p_withLapala, * pepLevel_imp4p_qmin, * pepLevel_imp4pLAPALA_distrib
getTextForpeptideImputation(l.params)
getTextForpeptideImputation(l.params)
l.params |
A list of parameters related to the process of the dataset |
A string
Samuel Wieczorek
params <- list() getTextForpeptideImputation(params)
params <- list() getTextForpeptideImputation(params)
* POV_algorithm, * POV_detQuant_quantile, * POV_detQuant_factor, * POV_KNN_n, * MEC_algorithm, * MEC_detQuant_quantile, * MEC_detQuant_factor, * MEC_fixedValue
getTextForproteinImputation(l.params)
getTextForproteinImputation(l.params)
l.params |
A list of parameters related to the process of the dataset |
A string
Samuel Wieczorek
params <- list() getTextForproteinImputation(params)
params <- list() getTextForproteinImputation(params)
xxxx
GetTypeofData(obj)
GetTypeofData(obj)
obj |
xxx |
xxx
data(Exp1_R25_pept, package="DAPARdata") GetTypeofData(Exp1_R25_pept)
data(Exp1_R25_pept, package="DAPARdata") GetTypeofData(Exp1_R25_pept)
Computes the adjusted p-values on all the stacked contrasts using CP4P
globalAdjPval(x, pval.threshold = 1.05, method = 1, display = T)
globalAdjPval(x, pval.threshold = 1.05, method = 1, display = T)
x |
a proteins x contrasts dataframe of (raw) p-values |
pval.threshold |
all the p-values above the threshold are not considered. Default is 1.05 (which is equivalent to have no threshold). Applying a threshold nearby 1 can be instrumental to improve the uniformity under the null, notably in case of upstream mutliple contrat correction (for experienced users only) |
method |
method a method to estimate pi_0, see CP4P |
display |
if T, a calibration plot is diplayed using CP4P |
a proteins x contrasts table of adjusted p-values
Thomas Burger
data(Exp1_R25_prot, package='DAPARdata') exdata <- Exp1_R25_prot[1:5,] globalAdjPval(testAnovaModels(applyAnovasOnProteins(exdata), "TukeyHSD")$P_Value)
data(Exp1_R25_prot, package='DAPARdata') exdata <- Exp1_R25_prot[1:5,] globalAdjPval(testAnovaModels(applyAnovasOnProteins(exdata), "TukeyHSD")$P_Value)
Normalisation GlobalQuantileAlignement
GlobalQuantileAlignment(qData)
GlobalQuantileAlignment(qData)
qData |
xxxx |
A normalized numeric matrix
Samuel Wieczorek, Thomas Burger, Helene Borges, Anais Courtier, Enora Fremy
data(Exp1_R25_pept, package="DAPARdata") qData <- Biobase::exprs(Exp1_R25_pept) normalized <- GlobalQuantileAlignment(qData)
data(Exp1_R25_pept, package="DAPARdata") qData <- Biobase::exprs(Exp1_R25_pept) normalized <- GlobalQuantileAlignment(qData)
MSnSet
object with the results of the GO analysis
performed with the functions enrichGO
and/or groupGO
of the
'clusterProfiler' package.This method returns an MSnSet
object with the results of the Gene
Ontology analysis.
GOAnalysisSave( obj, ggo_res = NULL, ego_res = NULL, organism, ontology, levels, pvalueCutoff, typeUniverse )
GOAnalysisSave( obj, ggo_res = NULL, ego_res = NULL, organism, ontology, levels, pvalueCutoff, typeUniverse )
obj |
An object of the class |
ggo_res |
The object returned by the function |
ego_res |
The object returned by the function |
organism |
The parameter OrgDb of the functions |
ontology |
One of "MF", "BP", and "CC" subontologies |
levels |
A vector of the different GO grouping levels to save |
pvalueCutoff |
The qvalue cutoff (same parameter as in the function
|
typeUniverse |
The type of background to be used. Values are 'Entire Organism', 'Entire dataset' or 'Custom'. In the latter case, a file should be uploaded by the user |
An object of the class MSnSet
Samuel Wieczorek
NULL
NULL
Method to create a plot with proteins and peptides on a MSnSet object (peptides)
GraphPepProt(mat)
GraphPepProt(mat)
mat |
An adjacency matrix. |
A histogram
Alexia Dorffer, Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") mat <- BuildAdjacencyMatrix(Exp1_R25_pept[seq_len(10)], "Protein_group_IDs") GraphPepProt(mat)
data(Exp1_R25_pept, package="DAPARdata") mat <- BuildAdjacencyMatrix(Exp1_R25_pept[seq_len(10)], "Protein_group_IDs") GraphPepProt(mat)
This function is a wrappper to the function groupGO from the package 'clusterProfiler'. Given a vector of genes/proteins, it returns the GO profile at a specific level. It returns a groupGOResult instance.
group_GO(data, idFrom, orgdb, ont, level, readable = FALSE)
group_GO(data, idFrom, orgdb, ont, level, readable = FALSE)
data |
A vector of ID (among ENSEMBL, ENTREZID, GENENAME, REFSEQ, UNIGENE, UNIPROT -can be different according to organisms) |
idFrom |
character indicating the input ID format (among ENSEMBL, ENTREZID, GENENAME, REFSEQ, UNIGENE, UNIPROT) |
orgdb |
annotation Bioconductor package to use (character format) |
ont |
on which ontology to perform the analysis (MF, BP or CC) |
level |
level of the ontolofy to perform the analysis |
readable |
TRUE or FALSE (default FALSE) |
GO profile at a specific level
Florence Combes
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(10)] if (!requireNamespace("org.Sc.sgd.db", quietly = TRUE)) { stop("Please install org.Sc.sgd.db: BiocManager::install('org.Sc.sgd.db')") } library(org.Sc.sgd.db) ggo <- group_GO( data = Biobase::fData(obj)$Protein.IDs, idFrom = "UNIPROT", orgdb = "org.Sc.sgd.db", ont = "MF", level = 2 )
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(10)] if (!requireNamespace("org.Sc.sgd.db", quietly = TRUE)) { stop("Please install org.Sc.sgd.db: BiocManager::install('org.Sc.sgd.db')") } library(org.Sc.sgd.db) ggo <- group_GO( data = Biobase::fData(obj)$Protein.IDs, idFrom = "UNIPROT", orgdb = "org.Sc.sgd.db", ont = "MF", level = 2 )
This function show the density plots of Fold Change (the same as calculated by limma) for a list of the comparisons of conditions in a differential analysis.
hc_logFC_DensityPlot(df_logFC, threshold_LogFC = 0, pal = NULL)
hc_logFC_DensityPlot(df_logFC, threshold_LogFC = 0, pal = NULL)
df_logFC |
A dataframe that contains the logFC values |
threshold_LogFC |
The threshold on log(Fold Change) to distinguish between differential and non-differential data |
pal |
xxx |
A highcharts density plot
Samuel Wieczorek
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(100)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") qData <- Biobase::exprs(obj$new) sTab <- Biobase::pData(obj$new) res <- limmaCompleteTest(qData, sTab, comp.type = "OnevsAll") pal <- ExtendPalette(2, "Dark2") hc_logFC_DensityPlot(res$logFC, threshold_LogFC = 1, pal = pal)
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(100)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") qData <- Biobase::exprs(obj$new) sTab <- Biobase::pData(obj$new) res <- limmaCompleteTest(qData, sTab, comp.type = "OnevsAll") pal <- ExtendPalette(2, "Dark2") hc_logFC_DensityPlot(res$logFC, threshold_LogFC = 1, pal = pal)
This method shows density plots which represents the repartition of
Partial Observed Values for each replicate in the dataset.
The colors correspond to the different conditions (slot Condition in in the
dataset of class MSnSet
).
The x-axis represent the mean of intensity for one condition and one
entity in the dataset (i. e. a protein)
whereas the y-axis count the number of observed values for this entity
and the considered condition.
hc_mvTypePlot2(obj, pal = NULL, pattern, typeofMV = NULL, title = NULL)
hc_mvTypePlot2(obj, pal = NULL, pattern, typeofMV = NULL, title = NULL)
obj |
xxx |
pal |
The different colors for conditions |
pattern |
xxx |
typeofMV |
xxx |
title |
The title of the plot |
Density plots
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(100)] conds <- Biobase::pData(obj)$Condition pal <- ExtendPalette(length(unique(conds)), "Dark2") hc_mvTypePlot2(obj, pattern = "Missing MEC", title = "POV distribution", pal = pal)
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(100)] conds <- Biobase::pData(obj)$Condition pal <- ExtendPalette(length(unique(conds)), "Dark2") hc_mvTypePlot2(obj, pattern = "Missing MEC", title = "POV distribution", pal = pal)
heatmap.2
that displays
quantitative data in the Biobase::exprs()
table of an object of
class MSnSet
This function is a wrapper to heatmap.2
that displays
quantitative data in the Biobase::exprs()
table of an object of
class MSnSet
heatmapD( qData, conds, distance = "euclidean", cluster = "complete", dendro = FALSE )
heatmapD( qData, conds, distance = "euclidean", cluster = "complete", dendro = FALSE )
qData |
A dataframe that contains quantitative data. |
conds |
A vector containing the conditions |
distance |
The distance used by the clustering algorithm to compute
the dendrogram. See |
cluster |
the clustering algorithm used to build the dendrogram.
See |
dendro |
A boolean to indicate fi the dendrogram has to be displayed |
A heatmap
Florence Combes, Samuel Wieczorek, Enor Fremy
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10), ] level <- 'peptide' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeLine(metacell.mask) qData <- Biobase::exprs(obj) conds <- Biobase::pData(obj)[["Condition"]] heatmapD(qData, conds)
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10), ] level <- 'peptide' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeLine(metacell.mask) qData <- Biobase::exprs(obj) conds <- Biobase::pData(obj)[["Condition"]] heatmapD(qData, conds)
This function is inspired from the function heatmap.2
that displays quantitative data in the Biobase::exprs()
table of an
object of
class MSnSet
. For more information, please refer to the help
of the heatmap.2 function.
heatmapForMissingValues( x, col = NULL, srtCol = NULL, labCol = NULL, labRow = NULL, key = TRUE, key.title = NULL, main = NULL, ylab = NULL )
heatmapForMissingValues( x, col = NULL, srtCol = NULL, labCol = NULL, labRow = NULL, key = TRUE, key.title = NULL, main = NULL, ylab = NULL )
x |
A dataframe that contains quantitative data. |
col |
colors used for the image. Defaults to heat colors (heat.colors). |
srtCol |
angle of column conds, in degrees from horizontal |
labCol |
character vectors with column conds to use. |
labRow |
character vectors with row conds to use. |
key |
logical indicating whether a color-key should be shown. |
key.title |
main title of the color key. If set to NA no title will be plotted. |
main |
main title; default to none. |
ylab |
y-axis title; default to none. |
A heatmap
Samuel Wieczorek
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(100)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeLine(metacell.mask) obj <- MetaCellFiltering(obj, indices, cmd = "delete") qData <- Biobase::exprs(obj$new) heatmapForMissingValues(qData)
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(100)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeLine(metacell.mask) obj <- MetaCellFiltering(obj, indices, cmd = "delete") qData <- Biobase::exprs(obj$new) heatmapForMissingValues(qData)
Plots a histogram ov p-values
histPValue_HC(pval_ll, bins = 80, pi0 = 1)
histPValue_HC(pval_ll, bins = 80, pi0 = 1)
pval_ll |
xxx |
bins |
xxx |
pi0 |
xxx |
A plot
Samuel Wieczorek
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(100)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") qData <- Biobase::exprs(obj$new) sTab <- Biobase::pData(obj$new) allComp <- limmaCompleteTest(qData, sTab) histPValue_HC(allComp$P_Value[1])
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(100)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") qData <- Biobase::exprs(obj$new) sTab <- Biobase::pData(obj$new) allComp <- limmaCompleteTest(qData, sTab) histPValue_HC(allComp$P_Value[1])
MSnSet
objectThis method is a variation to the function impute.pa()
from the
package imp4p
.
impute.pa2( tab, conditions, q.min = 0, q.norm = 3, eps = 0, distribution = "unif" )
impute.pa2( tab, conditions, q.min = 0, q.norm = 3, eps = 0, distribution = "unif" )
tab |
An object of class |
conditions |
A vector of conditions in the dataset |
q.min |
A quantile value of the observed values allowing defining the maximal value which can be generated. This maximal value is defined by the quantile q.min of the observed values distribution minus eps. Default is 0 (the maximal value is the minimum of observed values minus eps). |
q.norm |
A quantile value of a normal distribution allowing defining the minimal value which can be generated. Default is 3 (the minimal value is the maximal value minus qn*median(sd(observed values)) where sd is the standard deviation of a row in a condition). |
eps |
A value allowing defining the maximal value which can be generated. This maximal value is defined by the quantile q.min of the observed values distribution minus eps. Default is 0. |
distribution |
The type of distribution used. Values are unif or beta. |
The object obj
which has been imputed
Thomas Burger, Samuel Wieczorek
utils::data(Exp1_R25_pept, package = "DAPARdata") obj.imp <- wrapper.impute.pa2(Exp1_R25_pept[seq_len(100)], distribution = "beta")
utils::data(Exp1_R25_pept, package = "DAPARdata") obj.imp <- wrapper.impute.pa2(Exp1_R25_pept[seq_len(100)], distribution = "beta")
Method to xxxxx
inner.aggregate.iter( pepData, X, init.method = "Sum", method = "Mean", n = NULL )
inner.aggregate.iter( pepData, X, init.method = "Sum", method = "Mean", n = NULL )
pepData |
xxxxx |
X |
xxxx |
init.method |
xxx |
method |
xxx |
n |
xxxx |
xxxxx
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept protID <- "Protein_group_IDs" X <- BuildAdjacencyMatrix(obj[seq_len(10)], protID, FALSE) qdata.agg <- inner.aggregate.iter(Biobase::exprs(obj[seq_len(10)]), X)
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept protID <- "Protein_group_IDs" X <- BuildAdjacencyMatrix(obj[seq_len(10)], protID, FALSE) qdata.agg <- inner.aggregate.iter(Biobase::exprs(obj[seq_len(10)]), X)
xxxx
inner.aggregate.topn(pepData, X, method = "Mean", n = 10)
inner.aggregate.topn(pepData, X, method = "Mean", n = 10)
pepData |
A data.frame of quantitative data |
X |
An adjacency matrix |
method |
xxxxx |
n |
xxxxx |
xxxxx
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10)] protID <- "Protein_group_IDs" X <- BuildAdjacencyMatrix(obj, protID, FALSE) inner.aggregate.topn(Biobase::exprs(obj), X)
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10)] protID <- "Protein_group_IDs" X <- BuildAdjacencyMatrix(obj, protID, FALSE) inner.aggregate.topn(Biobase::exprs(obj), X)
xxxx
inner.mean(pepData, X)
inner.mean(pepData, X)
pepData |
A data.frame of quantitative data |
X |
An adjacency matrix |
xxxxx
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10)] protID <- "Protein_group_IDs" X <- BuildAdjacencyMatrix(obj, protID, FALSE) inner.mean(Biobase::exprs(obj), X)
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10)] protID <- "Protein_group_IDs" X <- BuildAdjacencyMatrix(obj, protID, FALSE) inner.mean(Biobase::exprs(obj), X)
xxxx
inner.sum(pepData, X)
inner.sum(pepData, X)
pepData |
A data.frame of quantitative data |
X |
An adjacency matrix |
A matrix
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10)] protID <- "Protein_group_IDs" X <- BuildAdjacencyMatrix(obj, protID, FALSE) inner.sum(Biobase::exprs(obj), X)
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10)] protID <- "Protein_group_IDs" X <- BuildAdjacencyMatrix(obj, protID, FALSE) inner.sum(Biobase::exprs(obj), X)
xxx
is.subset(set1, set2)
is.subset(set1, set2)
set1 |
xxx |
set2 |
xxx |
xxx
is.subset('a', letters) is.subset(c('a', 'c', 't'), letters) is.subset(c('a', 3, 't'), letters) is.subset(3, letters)
is.subset('a', letters) is.subset(c('a', 'c', 't'), letters) is.subset(c('a', 3, 't'), letters) is.subset(3, letters)
xxxxxx
LH0(X, y1, y2)
LH0(X, y1, y2)
X |
an n.pep*n.prot indicator matrix. |
y1 |
n.pep*n.samples matrice giving the observed counts for |
y2 |
n.pep*n.samples matrice giving the observed counts for |
xxxxxxxxxx..
Thomas Burger, Laurent Jacob
NULL
NULL
xxxxxx
LH0.lm(X, y1, y2)
LH0.lm(X, y1, y2)
X |
an n.pep*n.prot indicator matrix. |
y1 |
n.pep*n.samples matrice giving the observed counts for each peptide in each sample from the condition 1 |
y2 |
n.pep*n.samples matrice giving the observed counts for each peptide in each sample from the condition 2 |
xxxxxxxxxx..
Thomas Burger, Laurent Jacob
NULL
NULL
xxxxxx
LH1(X, y1, y2, j)
LH1(X, y1, y2, j)
X |
an n.pep*n.prot indicator matrix. |
y1 |
n.pep*n.samples matrice giving the observed counts for |
y2 |
n.pep*n.samples matrice giving the observed counts for |
j |
the index of the protein being tested, ie which has different |
xxxxxxxxxx..
Thomas Burger, Laurent Jacob
NULL
NULL
xxxxxx
LH1.lm(X, y1, y2, j)
LH1.lm(X, y1, y2, j)
X |
an n.pep*n.prot indicator matrix. |
y1 |
n.pep*n.samples matrix giving the observed counts for |
y2 |
n.pep*n.samples matrix giving the observed counts for |
j |
the index of the protein being tested, ie which has different |
xxxxxxxxxx..
Thomas Burger, Laurent Jacob
NULL
NULL
Computes a hierarchical differential analysis
limmaCompleteTest(qData, sTab, comp.type = "OnevsOne")
limmaCompleteTest(qData, sTab, comp.type = "OnevsOne")
qData |
A matrix of quantitative data, without any missing values. |
sTab |
A dataframe of experimental design (Biobase::pData()). |
comp.type |
A string that corresponds to the type of comparison. Values are: 'anova1way', 'OnevsOne' and 'OnevsAll'; default is 'OnevsOne'. |
A list of two dataframes : logFC and P_Value. The first one contains the logFC values of all the comparisons (one column for one comparison), the second one contains the pvalue of all the comparisons (one column for one comparison). The names of the columns for those two dataframes are identical and correspond to the description of the comparison.
Hélène Borges, Thomas Burger, Quentin Giai-Gianetto, Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept qData <- Biobase::exprs(obj) sTab <- Biobase::pData(obj) limma <- limmaCompleteTest(qData, sTab, comp.type = "anova1way")
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept qData <- Biobase::exprs(obj) sTab <- Biobase::pData(obj) limma <- limmaCompleteTest(qData, sTab, comp.type = "anova1way")
This function returns the list of the sheets names in a Excel file.
listSheets(file)
listSheets(file)
file |
The name of the Excel file. |
A vector
Samuel Wieczorek
NULL
NULL
Normalisation LOESS
LOESS(qData, conds, type = "overall", span = 0.7)
LOESS(qData, conds, type = "overall", span = 0.7)
qData |
A numeric matrix. |
conds |
xxx |
type |
"overall" (shift all the sample distributions at once) or "within conditions" (shift the sample distributions within each condition at a time). |
span |
xxx |
A normalized numeric matrix
Thomas Burger, Helene Borges, Anais Courtier, Enora Fremy
data(Exp1_R25_pept, package="DAPARdata") qData <- Biobase::exprs(Exp1_R25_pept) conds <- Biobase::pData(Exp1_R25_pept)$Condition normalized <- LOESS(qData, conds, type = "overall")
data(Exp1_R25_pept, package="DAPARdata") qData <- Biobase::exprs(Exp1_R25_pept) conds <- Biobase::pData(Exp1_R25_pept)$Condition normalized <- LOESS(qData, conds, type = "overall")
Builds the contrast matrix
make.contrast(design, condition, contrast = 1, design.level = 1)
make.contrast(design, condition, contrast = 1, design.level = 1)
design |
The data.frame which correspond to the 'pData()' function of package 'MSnbase'. |
condition |
xxxxx |
contrast |
An integer that Indicates if the test consists of the comparison of each biological condition versus each of the other ones (Contrast=1; for example H0:"C1=C2" vs H1:"C1!=C2", etc.) or each condition versus all others (Contrast=2; e.g. H0:"C1=(C2+C3)/2" vs H1:"C1!=(C2+C3)/2", etc. if there are three conditions). |
design.level |
xxx |
A constrat matrix
Thomas Burger, Quentin Giai-Gianetto, Samuel Wieczorek
data(Exp1_R25_pept, package='DAPARdata') design <- make.design(Biobase::pData(Exp1_R25_pept)) conds <- Biobase::pData(Exp1_R25_pept)$Condition make.contrast(design, conds)
data(Exp1_R25_pept, package='DAPARdata') design <- make.design(Biobase::pData(Exp1_R25_pept)) conds <- Biobase::pData(Exp1_R25_pept)$Condition make.contrast(design, conds)
Builds the design matrix
make.design(sTab)
make.design(sTab)
sTab |
The data.frame which correspond to the 'pData()' function of package 'MSnbase'. |
A design matrix
Thomas Burger, Quentin Giai-Gianetto, Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") make.design(Biobase::pData(Exp1_R25_pept))
data(Exp1_R25_pept, package="DAPARdata") make.design(Biobase::pData(Exp1_R25_pept))
Builds the design matrix for designs of level 1
make.design.1(sTab)
make.design.1(sTab)
sTab |
The data.frame which correspond to the 'pData()' function of package 'MSnbase'. |
A design matrix
Thomas Burger, Quentin Giai-Gianetto, Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") make.design.1(Biobase::pData(Exp1_R25_pept))
data(Exp1_R25_pept, package="DAPARdata") make.design.1(Biobase::pData(Exp1_R25_pept))
Builds the design matrix for designs of level 2
make.design.2(sTab)
make.design.2(sTab)
sTab |
The data.frame which correspond to the 'pData()' function of package 'MSnbase'. |
A design matrix
Thomas Burger, Quentin Giai-Gianetto, Samuel Wieczorek
data(Exp1_R25_pept, package='DAPARdata') make.design.2(Biobase::pData(Exp1_R25_pept))
data(Exp1_R25_pept, package='DAPARdata') make.design.2(Biobase::pData(Exp1_R25_pept))
Builds the design matrix for designs of level 3
make.design.3(sTab)
make.design.3(sTab)
sTab |
The data.frame which correspond to the 'pData()' function of package 'MSnbase'. |
A design matrix
Thomas Burger, Quentin Giai-Gianetto, Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") sTab <- cbind(Biobase::pData(Exp1_R25_pept), Tech.Rep = 1:6) make.design.3(sTab)
data(Exp1_R25_pept, package="DAPARdata") sTab <- cbind(Biobase::pData(Exp1_R25_pept), Tech.Rep = 1:6) make.design.3(sTab)
is.na
but focused on the equality
with the paramter 'type'.Similar to the function is.na
but focused on the equality
with the paramter 'type'.
match.metacell(metadata, pattern = NULL, level)
match.metacell(metadata, pattern = NULL, level)
metadata |
A data.frame |
pattern |
The value to search in the dataframe |
level |
xxx |
A boolean dataframe
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10), ] metadata <- GetMetacell(obj) m <- match.metacell(metadata, pattern = "Missing", level = "peptide") m <- match.metacell(metadata, pattern = NULL, level = "peptide") m <- match.metacell(metadata, pattern = c('Missing', 'Missing POV'), level = "peptide")
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10), ] metadata <- GetMetacell(obj) m <- match.metacell(metadata, pattern = "Missing", level = "peptide") m <- match.metacell(metadata, pattern = NULL, level = "peptide") m <- match.metacell(metadata, pattern = c('Missing', 'Missing POV'), level = "peptide")
Normalisation MeanCentering
MeanCentering( qData, conds, type = "overall", subset.norm = NULL, scaling = FALSE )
MeanCentering( qData, conds, type = "overall", subset.norm = NULL, scaling = FALSE )
qData |
xxx |
conds |
xxx |
type |
"overall" (shift all the sample distributions at once) or "within conditions" (shift the sample distributions within each condition at a time). |
subset.norm |
A vector of index indicating rows to be used for normalization |
scaling |
A boolean that indicates if the variance of the data have to be forced to unit (variance reduction) or not. |
A normalized numeric matrix
Samuel Wieczorek, Thomas Burger, Helene Borges, Anais Courtier, Enora Fremy
data(Exp1_R25_pept, package="DAPARdata") qData <- Biobase::exprs(Exp1_R25_pept) conds <- Biobase::pData(Exp1_R25_pept)$Condition normalized <- MeanCentering(qData, conds, type = "overall")
data(Exp1_R25_pept, package="DAPARdata") qData <- Biobase::exprs(Exp1_R25_pept) conds <- Biobase::pData(Exp1_R25_pept)$Condition normalized <- MeanCentering(qData, conds, type = "overall")
Actually, this function uses the generic function to generate metacell info
Metacell_DIA_NN(qdata, conds, df, level = NULL)
Metacell_DIA_NN(qdata, conds, df, level = NULL)
qdata |
An object of class |
conds |
xxx |
df |
A list of integer xxxxxxx |
level |
xxx |
xxxxx
Samuel Wieczorek
file <- system.file("extdata", "Exp1_R25_pept.txt", package = "DAPARdata") data <- read.table(file, header = TRUE, sep = "\t", stringsAsFactors = FALSE) metadataFile <- system.file("extdata", "samples_Exp1_R25.txt", package = "DAPARdata" ) metadata <- read.table(metadataFile, header = TRUE, sep = "\t", as.is = TRUE, stringsAsFactors = FALSE ) conds <- metadata$Condition qdata <- data[seq_len(100), seq.int(from = 56, to = 61)] df <- data[seq_len(100), seq.int(from = 43, to = 48)] df <- Metacell_DIA_NN(qdata, conds, df, level = "peptide")
file <- system.file("extdata", "Exp1_R25_pept.txt", package = "DAPARdata") data <- read.table(file, header = TRUE, sep = "\t", stringsAsFactors = FALSE) metadataFile <- system.file("extdata", "samples_Exp1_R25.txt", package = "DAPARdata" ) metadata <- read.table(metadataFile, header = TRUE, sep = "\t", as.is = TRUE, stringsAsFactors = FALSE ) conds <- metadata$Condition qdata <- data[seq_len(100), seq.int(from = 56, to = 61)] df <- data[seq_len(100), seq.int(from = 43, to = 48)] df <- Metacell_DIA_NN(qdata, conds, df, level = "peptide")
In the quantitative columns, a missing value is identified by no value rather than a value equal to 0. Conversion rules QuantiTag NA or 0 NA The only information detected with this function are about missing values ( MEC and POV).
Metacell_generic(qdata, conds, level)
Metacell_generic(qdata, conds, level)
qdata |
An object of class |
conds |
xxx |
level |
xxx |
xxxxx
Samuel Wieczorek
file <- system.file("extdata", "Exp1_R25_pept.txt", package = "DAPARdata") data <- read.table(file, header = TRUE, sep = "\t", stringsAsFactors = FALSE) metadataFile <- system.file("extdata", "samples_Exp1_R25.txt", package = "DAPARdata" ) metadata <- read.table(metadataFile, header = TRUE, sep = "\t", as.is = TRUE, stringsAsFactors = FALSE ) conds <- metadata$Condition qdata <- data[seq_len(100), seq.int(from = 56, to = 61)] df <- data[seq_len(100), seq.int(from = 43, to = 48)] df <- Metacell_generic(qdata, conds, level = "peptide")
file <- system.file("extdata", "Exp1_R25_pept.txt", package = "DAPARdata") data <- read.table(file, header = TRUE, sep = "\t", stringsAsFactors = FALSE) metadataFile <- system.file("extdata", "samples_Exp1_R25.txt", package = "DAPARdata" ) metadata <- read.table(metadataFile, header = TRUE, sep = "\t", as.is = TRUE, stringsAsFactors = FALSE ) conds <- metadata$Condition qdata <- data[seq_len(100), seq.int(from = 56, to = 61)] df <- data[seq_len(100), seq.int(from = 43, to = 48)] df <- Metacell_generic(qdata, conds, level = "peptide")
Initial conversion rules for maxquant |————|———————–|——–| | Quanti | Identification | Tag | |————|———————–|——–| | == 0 | whatever | 2.0 | | > 0 | 'By MS/MS' | 1.1 | | > 0 | 'By matching' | 1.2 | | > 0 | unknown col | 1.0 | |————|———————–|——–|
Metacell_maxquant(qdata, conds, df, level = NULL)
Metacell_maxquant(qdata, conds, df, level = NULL)
qdata |
An object of class |
conds |
xxx |
df |
A list of integer xxxxxxx |
level |
xxx |
xxxxx
Samuel Wieczorek
file <- system.file("extdata", "Exp1_R25_pept.txt", package = "DAPARdata") data <- read.table(file, header = TRUE, sep = "\t", stringsAsFactors = FALSE) metadataFile <- system.file("extdata", "samples_Exp1_R25.txt", package = "DAPARdata" ) metadata <- read.table(metadataFile, header = TRUE, sep = "\t", as.is = TRUE, stringsAsFactors = FALSE ) conds <- metadata$Condition qdata <- data[seq_len(10), seq.int(from = 56, to = 61)] df <- data[seq_len(10), seq.int(from = 43, to = 48)] df2 <- Metacell_maxquant(qdata, conds, df, level = "peptide")
file <- system.file("extdata", "Exp1_R25_pept.txt", package = "DAPARdata") data <- read.table(file, header = TRUE, sep = "\t", stringsAsFactors = FALSE) metadataFile <- system.file("extdata", "samples_Exp1_R25.txt", package = "DAPARdata" ) metadata <- read.table(metadataFile, header = TRUE, sep = "\t", as.is = TRUE, stringsAsFactors = FALSE ) conds <- metadata$Condition qdata <- data[seq_len(10), seq.int(from = 56, to = 61)] df <- data[seq_len(10), seq.int(from = 43, to = 48)] df2 <- Metacell_maxquant(qdata, conds, df, level = "peptide")
In the quantitative columns, a missing value is identified by no value rather than a value equal to 0.
In these datasets, the metacell info is computed from the 'PSM count' columns.
Conversion rules Initial conversion rules for proline |————–|—————–|—–| | Quanti | PSM count | Tag | |————–|—————–|—–| | == 0 | N.A. | whatever | 2.0 | | > 0 | > 0 | 1.1 | | > 0 | == 0 | 1.2 | | > 0 | unknown col | 1.0 | |————–|—————–|—–|
Metacell_proline(qdata, conds, df, level = NULL)
Metacell_proline(qdata, conds, df, level = NULL)
qdata |
An object of class |
conds |
xxx |
df |
A list of integer xxxxxxx |
level |
xxx |
xxxxx
Samuel Wieczorek
file <- system.file("extdata", "Exp1_R25_pept.txt", package = "DAPARdata") data <- read.table(file, header = TRUE, sep = "\t", stringsAsFactors = FALSE) metadataFile <- system.file("extdata", "samples_Exp1_R25.txt", package = "DAPARdata") metadata <- read.table(metadataFile, header = TRUE, sep = "\t", as.is = TRUE, stringsAsFactors = FALSE) conds <- metadata$Condition qdata <- data[seq_len(100), seq.int(from = 56, to = 61)] df <- data[seq_len(100), seq.int(from = 43, to = 48)] df <- Metacell_proline(qdata, conds, df, level = "peptide")
file <- system.file("extdata", "Exp1_R25_pept.txt", package = "DAPARdata") data <- read.table(file, header = TRUE, sep = "\t", stringsAsFactors = FALSE) metadataFile <- system.file("extdata", "samples_Exp1_R25.txt", package = "DAPARdata") metadata <- read.table(metadataFile, header = TRUE, sep = "\t", as.is = TRUE, stringsAsFactors = FALSE) conds <- metadata$Condition qdata <- data[seq_len(100), seq.int(from = 56, to = 61)] df <- data[seq_len(100), seq.int(from = 43, to = 48)] df <- Metacell_proline(qdata, conds, df, level = "peptide")
This function gives the vocabulary used for the metadata of each entity in each condition.
Peptide-level vocabulary
|– 'Any' | | | |– 1.0 'Quantified' | | | | | |– 1.1 "Quant. by direct id" (color 4, white) | | | | | |– 1.2 "Quant. by recovery" (color 3, lightgrey) | | | |– 2.0 "Missing" (no color) | | | | | |– 2.1 "Missing POV" (color 1) | | | | | |– 2.2 'Missing MEC' (color 2) | | | |– 3.0 'Imputed' | | | | | |– 3.1 'Imputed POV' (color 1) | | | | | |– 3.2 'Imputed MEC' (color 2)
Protein-level vocabulary: |– 'Any' | | | |– 1.0 'Quantified' | | | | | |– 1.1 "Quant. by direct id" (color 4, white) | | | | | |– 1.2 "Quant. by recovery" (color 3, lightgrey) | | | |– 2.0 "Missing" | | | | | |– 2.1 "Missing POV" (color 1) | | | | | |– 2.2 'Missing MEC' (color 2) | | | |– 3.0 'Imputed' | | | | | |– 3.1 'Imputed POV' (color 1) | | | | | |– 3.2 'Imputed MEC' (color 2) | | | |– 4.0 'Combined tags' (color 3bis, lightgrey)
metacell.def(level)
metacell.def(level)
level |
A string designing the type of entity/pipeline. Available values are: 'peptide', 'protein' |
xxx
Thomas Burger, Samuel Wieczorek
metacell.def('protein') metacell.def('peptide')
metacell.def('protein') metacell.def('peptide')
#' Filters the lines of Biobase::exprs()
table with conditions on the
number of missing values.
The user chooses the minimum amount of intensities that is acceptable and
the filter delete lines that do not respect this condition.
The condition may be on the whole line or condition by condition.
The different methods are :
"WholeMatrix": given a threshold th
, only the lines that contain
at least th
values are kept.
"AllCond": given a threshold th
, only the lines which contain
at least th
values for each of the conditions are kept.
"AtLeastOneCond": given a threshold th
, only the lines that contain
at least th
values, and for at least one condition, are kept.
MetaCellFiltering(obj, indices, cmd, processText = "")
MetaCellFiltering(obj, indices, cmd, processText = "")
obj |
An object of class |
indices |
A vector of integers which are the indices of lines to keep. |
cmd |
xxxx. Available values are: 'delete', 'keep'. |
processText |
A string to be included in the |
An instance of class MSnSet
that have been filtered.
Florence Combes, Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(100)] level <- 'peptide' #' #' Delete lines which are entirely filled with any missing values ('Missing MEC' and 'Missing POV') metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeLine(metacell.mask) obj.filter <- MetaCellFiltering(obj, indices, "delete") obj <- obj[1:10] pattern <- "Quantified" type <- "AtLeastOneCond" percent <- FALSE op <- ">=" th <- 3 indices <- GetIndices_MetacellFiltering(obj, level, pattern, type, percent, op, th) obj <- MetaCellFiltering(obj, indices, "keep")$new #fData(obj)[, obj@experimentData@other$names_metacell] pattern <- "Quant. by direct id" type <- "AtLeastOneCond" percent <- FALSE op <- ">=" th <- 3 indices <- GetIndices_MetacellFiltering(obj, level, pattern, type, percent, op, th) obj <- MetaCellFiltering(obj, indices, "keep")$new #fData(obj)[, obj@experimentData@other$names_metacell] names.1 <- rownames(obj) obj <- Exp1_R25_pept[seq_len(100)] pattern <- "Quant. by direct id" type <- "AtLeastOneCond" percent <- FALSE op <- ">=" th <- 3 indices <- GetIndices_MetacellFiltering(obj, level, pattern, type, percent, op, th) obj <- MetaCellFiltering(obj, indices, "keep")$new #fData(obj)[, obj@experimentData@other$names_metacell] pattern <- "Quantified" type <- "AtLeastOneCond" percent <- FALSE op <- ">=" th <- 3 indices <- GetIndices_MetacellFiltering(obj, level, pattern, type, percent, op, th) obj <- MetaCellFiltering(obj, indices, "keep")$new #fData(obj)[, obj@experimentData@other$names_metacell] names.2 <- rownames(obj)
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(100)] level <- 'peptide' #' #' Delete lines which are entirely filled with any missing values ('Missing MEC' and 'Missing POV') metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeLine(metacell.mask) obj.filter <- MetaCellFiltering(obj, indices, "delete") obj <- obj[1:10] pattern <- "Quantified" type <- "AtLeastOneCond" percent <- FALSE op <- ">=" th <- 3 indices <- GetIndices_MetacellFiltering(obj, level, pattern, type, percent, op, th) obj <- MetaCellFiltering(obj, indices, "keep")$new #fData(obj)[, obj@experimentData@other$names_metacell] pattern <- "Quant. by direct id" type <- "AtLeastOneCond" percent <- FALSE op <- ">=" th <- 3 indices <- GetIndices_MetacellFiltering(obj, level, pattern, type, percent, op, th) obj <- MetaCellFiltering(obj, indices, "keep")$new #fData(obj)[, obj@experimentData@other$names_metacell] names.1 <- rownames(obj) obj <- Exp1_R25_pept[seq_len(100)] pattern <- "Quant. by direct id" type <- "AtLeastOneCond" percent <- FALSE op <- ">=" th <- 3 indices <- GetIndices_MetacellFiltering(obj, level, pattern, type, percent, op, th) obj <- MetaCellFiltering(obj, indices, "keep")$new #fData(obj)[, obj@experimentData@other$names_metacell] pattern <- "Quantified" type <- "AtLeastOneCond" percent <- FALSE op <- ">=" th <- 3 indices <- GetIndices_MetacellFiltering(obj, level, pattern, type, percent, op, th) obj <- MetaCellFiltering(obj, indices, "keep")$new #fData(obj)[, obj@experimentData@other$names_metacell] names.2 <- rownames(obj)
Lists the metacell scopes for filtering
MetacellFilteringScope()
MetacellFilteringScope()
xxx
MetacellFilteringScope()
MetacellFilteringScope()
#' This method plots a histogram of missing values. Same as the function
mvHisto
but uses the package highcharter
metacellHisto_HC( obj, pattern = NULL, indLegend = "auto", showValues = FALSE, pal = NULL )
metacellHisto_HC( obj, pattern = NULL, indLegend = "auto", showValues = FALSE, pal = NULL )
obj |
xxx |
pattern |
xxx |
indLegend |
The indices of the column name's in |
showValues |
A logical that indicates wether numeric values should be drawn above the bars. |
pal |
xxx |
A histogram
Florence Combes, Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept pattern <- "Missing POV" pal <- ExtendPalette(2, "Dark2") metacellHisto_HC(obj, pattern, showValues = TRUE, pal = pal)
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept pattern <- "Missing POV" pal <- ExtendPalette(2, "Dark2") metacellHisto_HC(obj, pattern, showValues = TRUE, pal = pal)
This method plots a bar plot which represents the distribution of the number of missing values (NA) per lines (ie proteins).
metacellPerLinesHisto_HC( obj, pattern = NULL, detailed = FALSE, indLegend = "auto", showValues = FALSE )
metacellPerLinesHisto_HC( obj, pattern = NULL, detailed = FALSE, indLegend = "auto", showValues = FALSE )
obj |
xxx. |
pattern |
xxx |
detailed |
'value' or 'percent' |
indLegend |
The indice of the column name's in |
showValues |
A logical that indicates whether numeric values should be drawn above the bars. |
A bar plot
Florence Combes, Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept obj <- obj[1:10] metacellPerLinesHisto_HC(obj, pattern = "Missing POV") metacellPerLinesHisto_HC(obj) metacellPerLinesHisto_HC(obj, pattern = "Quantified") metacellPerLinesHisto_HC(obj, pattern = "Quant. by direct id") metacellPerLinesHisto_HC(obj, pattern = "Quant. by recovery") metacellPerLinesHisto_HC(obj, pattern = c("Quantified", "Quant. by direct id", "Quant. by recovery"))
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept obj <- obj[1:10] metacellPerLinesHisto_HC(obj, pattern = "Missing POV") metacellPerLinesHisto_HC(obj) metacellPerLinesHisto_HC(obj, pattern = "Quantified") metacellPerLinesHisto_HC(obj, pattern = "Quant. by direct id") metacellPerLinesHisto_HC(obj, pattern = "Quant. by recovery") metacellPerLinesHisto_HC(obj, pattern = c("Quantified", "Quant. by direct id", "Quant. by recovery"))
This method plots a bar plot which represents the distribution of the number of missing values (NA) per lines (ie proteins) and per conditions.
metacellPerLinesHistoPerCondition_HC( obj, pattern = NULL, indLegend = "auto", showValues = FALSE, pal = NULL )
metacellPerLinesHistoPerCondition_HC( obj, pattern = NULL, indLegend = "auto", showValues = FALSE, pal = NULL )
obj |
xxx |
pattern |
xxx |
indLegend |
The indice of the column name's in |
showValues |
A logical that indicates wether numeric values should be drawn above the bars. |
pal |
xxx |
A bar plot
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept pal <- ExtendPalette(length(unique(Biobase::pData(obj)$Condition)), "Dark2") metacellPerLinesHistoPerCondition_HC(obj, c("Missing POV", "Missing MEC"), pal = pal) metacellPerLinesHistoPerCondition_HC(obj, "Quantified")
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept pal <- ExtendPalette(length(unique(Biobase::pData(obj)$Condition)), "Dark2") metacellPerLinesHistoPerCondition_HC(obj, c("Missing POV", "Missing MEC"), pal = pal) metacellPerLinesHistoPerCondition_HC(obj, "Quantified")
Aggregation rules for the cells metadata of peptides. Please refer to the metacell vocabulary in 'metacell.def()'
# Basic aggregation (RULE 1) Aggregation of a mix of missing values (2.X) with quantitative and/or imputed values (1.X, 3.X) |—————————- Not possible (tag : 'STOP') |—————————-
Aggregation of different types of missing values (among 2.1, 2.2) |—————————- * (RULE 2) Aggregation of 2.1 peptides between each other gives a missing value (2.0) * (RULE 3) Aggregation of 2.2 peptides between each other gives a missing value (2.0) * (RULE 4) Aggregation of a mix of 2.1 and 2.2 gives a missing value (2.0) |—————————-
Aggregation of a mix of quantitative and/or imputed values (among 1.x and 3.X) |—————————- * (RULE 5) if the type of all the peptides to agregate is either 1.0, 1.1 or 1.2, then the final metadata is set to the corresponding tag * (RULE 5bis) if the type of all the peptides to agregate is either 3.0, 3.1 or 3.2, then the final metadata is set to the corresponding tag * (RULE 6) if the set of metacell to agregate is a mix of 1.x, then the final metadata is set to 1.0 * (RULE 7) if the set of metacell to agregate is a mix of 3.x, then the final metadata is set to 3.0 * (RULE 8) if the set of metacell to agregate is a mix of 3.X and 1.X, then the final metadata is set to 4.0
# Post processing Update metacell with POV/MEC status for the categories 2.0 and 3.0 TODO
metacombine(met, level)
metacombine(met, level)
met |
xxx |
level |
xxx |
xxx
ll <- metacell.def("peptide")$node for (i in seq_len(length(ll))) { test <- lapply( combn(ll, i, simplify = FALSE), function(x) tag <- metacombine(x, "peptide") ) } metacombine(c('Quant. by direct id', 'Missing POV'), 'peptide')
ll <- metacell.def("peptide")$node for (i in seq_len(length(ll))) { test <- lapply( combn(ll, i, simplify = FALSE), function(x) tag <- metacombine(x, "peptide") ) } metacombine(c('Quant. by direct id', 'Missing POV'), 'peptide')
#' Plots a heatmap of the quantitative data. Each column represent one of
the conditions in the object of class MSnSet
and
the color is proportional to the mean of intensity for each line of
the dataset.
The lines have been sorted in order to vizualize easily the different
number of missing values. A white square is plotted for missing values.
mvImage(qData, conds)
mvImage(qData, conds)
qData |
A dataframe that contains quantitative data. |
conds |
A vector of the conditions (one condition per sample). |
A heatmap
Samuel Wieczorek, Thomas Burger
data(Exp1_R25_pept, package="DAPARdata") qData <- Biobase::exprs(Exp1_R25_pept) conds <- Biobase::pData(Exp1_R25_pept)[, "Condition"] mvImage(qData, conds)
data(Exp1_R25_pept, package="DAPARdata") qData <- Biobase::exprs(Exp1_R25_pept) conds <- Biobase::pData(Exp1_R25_pept)[, "Condition"] mvImage(qData, conds)
Customised resetZoomButton of highcharts plots
my_hc_chart(hc, chartType, zoomType = "None")
my_hc_chart(hc, chartType, zoomType = "None")
hc |
A highcharter object |
chartType |
The type of the plot |
zoomType |
The type of the zoom (one of "x", "y", "xy", "None") |
A highchart plot
Samuel Wieczorek
library("highcharter") hc <- highchart() hc_chart(hc, type = "line") hc_add_series(hc, data = c(29, 71, 40)) my_hc_ExportMenu(hc, filename = "foo")
library("highcharter") hc <- highchart() hc_chart(hc, type = "line") hc_add_series(hc, data = c(29, 71, 40)) my_hc_ExportMenu(hc, filename = "foo")
Customised contextual menu of highcharts plots
my_hc_ExportMenu(hc, filename)
my_hc_ExportMenu(hc, filename)
hc |
A highcharter object |
filename |
The filename under which the plot has to be saved |
A contextual menu for highcharts plots
Samuel Wieczorek
library("highcharter") hc <- highchart() hc_chart(hc, type = "line") hc_add_series(hc, data = c(29, 71, 40)) my_hc_ExportMenu(hc, filename = "foo")
library("highcharter") hc <- highchart() hc_chart(hc, type = "line") hc_add_series(hc, data = c(29, 71, 40)) my_hc_ExportMenu(hc, filename = "foo")
This function retrieves the indices of non-zero elements in sparse matrices
of class dgCMatrix from package Matrix. This function is largely inspired
from the package RINGO
nonzero(x)
nonzero(x)
x |
A sparse matrix of class dgCMatrix |
A two-column matrix
Samuel Wieczorek
library(Matrix) mat <- Matrix(c(0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1), nrow = 5, byrow = TRUE, sparse = TRUE ) res <- nonzero(mat)
library(Matrix) mat <- Matrix(c(0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1), nrow = 5, byrow = TRUE, sparse = TRUE ) res <- nonzero(mat)
List normalization methods with tracking option
normalizeMethods.dapar(withTracking = FALSE)
normalizeMethods.dapar(withTracking = FALSE)
withTracking |
xxx |
xxx
normalizeMethods.dapar()
normalizeMethods.dapar()
This function removes lines in the dataset based on numerical conditions.
NumericalFiltering(obj, name = NULL, value = NULL, operator = NULL)
NumericalFiltering(obj, name = NULL, value = NULL, operator = NULL)
obj |
An object of class |
name |
The name of the column that correspond to the line to filter |
value |
A number |
operator |
A string |
An list of 2 items :
* obj : an object of class MSnSet
in which the lines have been
deleted,
* deleted : an object of class MSnSet
which contains the deleted lines
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") NumericalFiltering(Exp1_R25_pept[seq_len(100)], "A_Count", "6", "==")
data(Exp1_R25_pept, package="DAPARdata") NumericalFiltering(Exp1_R25_pept[seq_len(100)], "A_Count", "6", "==")
This function returns the indices of the lines to delete, based on a prefix string
NumericalgetIndicesOfLinesToRemove( obj, name = NULL, value = NULL, operator = NULL )
NumericalgetIndicesOfLinesToRemove( obj, name = NULL, value = NULL, operator = NULL )
obj |
An object of class |
name |
The name of the column that correspond to the data to filter |
value |
xxxx |
operator |
A xxxx |
A vector of integers.
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") NumericalgetIndicesOfLinesToRemove(Exp1_R25_pept[seq_len(100)], "A_Count", value = "6", operator = "==")
data(Exp1_R25_pept, package="DAPARdata") NumericalgetIndicesOfLinesToRemove(Exp1_R25_pept[seq_len(100)], "A_Count", value = "6", operator = "==")
Applies aov() on a vector of protein abundances using the design derived from the sample names (simple aov wrapper)
OWAnova(current_protein, conditions)
OWAnova(current_protein, conditions)
current_protein |
a real vector |
conditions |
the list of groups the protein belongs to |
see aov()
Thomas Burger
protein_abundance <- rep(rnorm(3, mean= 18, sd=2), each=3) + rnorm(9) groups <- c(rep("group1",3),rep("group2",3),rep("group3",3)) OWAnova(protein_abundance,groups)
protein_abundance <- rep(rnorm(3, mean= 18, sd=2), each=3) + rnorm(9) groups <- c(rep("group1",3),rep("group2",3),rep("group3",3)) OWAnova(protein_abundance,groups)
xxx
Parent(level, node = NULL)
Parent(level, node = NULL)
level |
xxx |
node |
xxx #' @examples Parent('protein', 'Missing') Parent('protein', 'Missing POV') Parent('protein', c('Missing POV', 'Missing MEC')) Parent('protein', c('Missing', 'Missing POV', 'Missing MEC')) |
PEptide based Protein differential Abundance test
pepa.test(X, y, n1, n2, global = FALSE, use.lm = FALSE)
pepa.test(X, y, n1, n2, global = FALSE, use.lm = FALSE)
X |
Binary q x p design matrix for q peptides and p proteins. X_(ij)=1 if peptide i belongs to protein j, 0 otherwise. |
y |
q x n matrix representing the log intensities of q peptides among n MS samples. |
n1 |
number of samples under condition 1. It is assumed that the first n1 columns of y correspond to observations under condition 1. |
n2 |
number of samples under condition 2. |
global |
if TRUE, the test statistic for each protein uses all residues, including the ones for peptides in different connected components. Can be much faster as it does not require to compute connected components. However the p-values are not well calibrated in this case, as it amounts to adding a ridge to the test statistic. Calibrating the p-value would require knowing the amplitude of the ridge, which in turns would require computing the connected components. |
use.lm |
if TRUE (and if global=FALSE), use lm() rather than the result in Proposition 1 to compute the test statistic |
A list of the following elements: llr: log likelihood ratio statistic (maximum likelihood version). llr.map: log likelihood ratio statistic (maximum a posteriori version). llr.pv: p-value for llr. llr.map.pv: p-value for llr.map. mse.h0: Mean squared error under H0 mse.h1: Mean squared error under H1 s: selected regularization hyperparameter for llr.map. wchi2: weight used to make llr.map chi2-distributed under H0.
Thomas Burger, Laurent Jacob
data(Exp1_R25_pept, package="DAPARdata") protID <- "Protein_group_IDs" obj <- Exp1_R25_pept[seq_len(20)] X <- BuildAdjacencyMatrix(obj, protID, FALSE)
data(Exp1_R25_pept, package="DAPARdata") protID <- "Protein_group_IDs" obj <- Exp1_R25_pept[seq_len(20)] X <- BuildAdjacencyMatrix(obj, protID, FALSE)
Checks if a package is available to load it
pkgs.require(ll.deps)
pkgs.require(ll.deps)
ll.deps |
A 'character()' vector which contains packages names |
Samuel Wieczorek
pkgs.require('DAPAR')
pkgs.require('DAPAR')
Jitter plot of CC
plotJitter(list.of.cc = NULL)
plotJitter(list.of.cc = NULL)
list.of.cc |
List of cc such as returned by the function get.pep.prot.cc |
A plot
Thomas Burger
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(100)] X <- BuildAdjacencyMatrix(obj, "Protein_group_IDs", TRUE) ll <- get.pep.prot.cc(X) plotJitter(ll)
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(100)] X <- BuildAdjacencyMatrix(obj, "Protein_group_IDs", TRUE) ll <- get.pep.prot.cc(X) plotJitter(ll)
Display a a jitter plot for CC
plotJitter_rCharts(df, clickFunction = NULL)
plotJitter_rCharts(df, clickFunction = NULL)
df |
xxxx |
clickFunction |
xxxx |
A plot
Thomas Burger, Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(100)] X <- BuildAdjacencyMatrix(obj, "Protein_group_IDs", TRUE) ll <- get.pep.prot.cc(X)[1:4] n.prot <- unlist(lapply(ll, function(x) {length(x$proteins)})) n.pept <- unlist(lapply(ll, function(x) {length(x$peptides)})) df <- tibble::tibble( x = jitter(n.pept), y = jitter(n.prot), index = seq_len(length(ll)) ) plotJitter_rCharts(df)
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(100)] X <- BuildAdjacencyMatrix(obj, "Protein_group_IDs", TRUE) ll <- get.pep.prot.cc(X)[1:4] n.prot <- unlist(lapply(ll, function(x) {length(x$proteins)})) n.pept <- unlist(lapply(ll, function(x) {length(x$peptides)})) df <- tibble::tibble( x = jitter(n.pept), y = jitter(n.prot), index = seq_len(length(ll)) ) plotJitter_rCharts(df)
Plots the eigen values of PCA
plotPCA_Eigen(res.pca)
plotPCA_Eigen(res.pca)
res.pca |
xxx |
A histogram
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") res.pca <- wrapper.pca(Exp1_R25_pept, ncp = 6) plotPCA_Eigen(res.pca)
data(Exp1_R25_pept, package="DAPARdata") res.pca <- wrapper.pca(Exp1_R25_pept, ncp = 6) plotPCA_Eigen(res.pca)
Plots the eigen values of PCA with the highcharts library
plotPCA_Eigen_hc(res.pca)
plotPCA_Eigen_hc(res.pca)
res.pca |
xxx |
A histogram
Samuel Wieczorek
data(Exp1_R25_pept, package='DAPARdata') res.pca <- wrapper.pca(Exp1_R25_pept, ncp = 6) plotPCA_Eigen_hc(res.pca)
data(Exp1_R25_pept, package='DAPARdata') res.pca <- wrapper.pca(Exp1_R25_pept, ncp = 6) plotPCA_Eigen_hc(res.pca)
Plots individuals of PCA
plotPCA_Ind(res.pca, chosen.axes = c(1, 2))
plotPCA_Ind(res.pca, chosen.axes = c(1, 2))
res.pca |
xxx |
chosen.axes |
The dimensions to plot |
A plot
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") res.pca <- wrapper.pca(Exp1_R25_pept) plotPCA_Ind(res.pca)
data(Exp1_R25_pept, package="DAPARdata") res.pca <- wrapper.pca(Exp1_R25_pept) plotPCA_Ind(res.pca)
Plots variables of PCA
plotPCA_Var(res.pca, chosen.axes = c(1, 2))
plotPCA_Var(res.pca, chosen.axes = c(1, 2))
res.pca |
xxx |
chosen.axes |
The dimensions to plot |
A plot
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") res.pca <- wrapper.pca(Exp1_R25_pept) plotPCA_Var(res.pca)
data(Exp1_R25_pept, package="DAPARdata") res.pca <- wrapper.pca(Exp1_R25_pept) plotPCA_Var(res.pca)
This function allows to compute a post-hoc test after a 1-way
ANOVA analysis. It expects as input an object obtained with the function
classic1wayAnova
. The second parameter allows to choose between 2
different post-hoc tests: the Tukey Honest Significant Differences
(specified as "TukeyHSD") and the Dunnett test (specified as "Dunnett").
postHocTest(aov_fits, post_hoc_test = "TukeyHSD")
postHocTest(aov_fits, post_hoc_test = "TukeyHSD")
aov_fits |
a list containing aov fitted model objects |
post_hoc_test |
a character string indicating which post-hoc test to use. Possible values are "TukeyHSD" or "Dunnett". See details for what to choose according to your experimental design. |
This is a function allowing to realise post-hoc tests for a set of
proteins/peptides for which a classic 1-way anova has been performed with
the function classic1wayAnova
. Two types of tests are currently
available: The Tukey HSD's test and the Dunnett's test. Default is Tukey's
test.
The Tukey HSD's test compares all possible pairs of means, and is based on a
studentized range distribution. Here is used the TukeyHSD()
function,
which can be applied to balanced designs (same number of samples in each
group), but also to midly unbalanced designs.
The Dunnett's test compares a single control group to all other groups.
Make sure the factor levels are properly ordered.
a list of 2 dataframes: first one called "LogFC" contains all pairwise comparisons logFC values (one column for one comparison) for each analysed feature; The second one named "P_Value" contains the corresponding pvalues.
Hélène Borges
## Not run: examples/ex_postHocTest.R
## Not run: examples/ex_postHocTest.R
Plots a barplot of proportion of contaminants and reverse. Same as the
function proportionConRev
but uses the package highcharter
proportionConRev_HC(nBoth = 0, nCont = 0, nRev = 0, lDataset = 0)
proportionConRev_HC(nBoth = 0, nCont = 0, nRev = 0, lDataset = 0)
nBoth |
The number of both contaminants and reverse identified in the dataset. |
nCont |
The number of contaminants identified in the dataset. |
nRev |
The number of reverse entities identified in the dataset. |
lDataset |
The total length (number of rows) of the dataset |
A barplot
Samuel Wieczorek
proportionConRev_HC(10, 20, 100)
proportionConRev_HC(10, 20, 100)
Normalisation QuantileCentering
QuantileCentering( qData, conds = NULL, type = "overall", subset.norm = NULL, quantile = 0.15 )
QuantileCentering( qData, conds = NULL, type = "overall", subset.norm = NULL, quantile = 0.15 )
qData |
xxx |
conds |
xxx |
type |
"overall" (shift all the sample distributions at once) or "within conditions" (shift the sample distributions within each condition at a time). |
subset.norm |
A vector of index indicating rows to be used for normalization |
quantile |
A float that corresponds to the quantile used to align the data. |
A normalized numeric matrix
Samuel Wieczorek, Thomas Burger, Helene Borges, Anais Courtier, Enora Fremy
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept conds <- Biobase::pData(Exp1_R25_pept)$Condition normalized <- QuantileCentering(Biobase::exprs(obj), conds, type = "within conditions", subset.norm = seq_len(10) )
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept conds <- Biobase::pData(Exp1_R25_pept)$Condition normalized <- QuantileCentering(Biobase::exprs(obj), conds, type = "within conditions", subset.norm = seq_len(10) )
rbind
but applies on two subsets of
the same MSnSet
object.Similar to the function rbind
but applies on two subsets of
the same MSnSet
object.
rbindMSnset(df1 = NULL, df2)
rbindMSnset(df1 = NULL, df2)
df1 |
An object (or subset of) of class |
df2 |
A subset of the same object as df1 |
An instance of class MSnSet
.
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") df1 <- Exp1_R25_pept[seq_len(100)] df2 <- Exp1_R25_pept[seq.int(from = 200, to = 250)] rbindMSnset(df1, df2)
data(Exp1_R25_pept, package="DAPARdata") df1 <- Exp1_R25_pept[seq_len(100)] df2 <- Exp1_R25_pept[seq.int(from = 200, to = 250)] rbindMSnset(df1, df2)
This function reads a sheet of an Excel file and put the data into a data.frame.
readExcel(file, sheet = NULL)
readExcel(file, sheet = NULL)
file |
The name of the Excel file. |
sheet |
The name of the sheet |
A data.frame
Samuel Wieczorek
NULL
NULL
MSnSet
objectPut back LAPALA into a MSnSet
object
reIntroduceMEC(obj, MECIndex)
reIntroduceMEC(obj, MECIndex)
obj |
An object of class |
MECIndex |
A data.frame that contains index of MEC (see findMECBlock) . |
The object obj
where LAPALA have been reintroduced
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(100)] lapala <- findMECBlock(obj) obj <- wrapper.impute.detQuant(obj, na.type = c("Missing POV", "Missing MEC")) obj <- reIntroduceMEC(obj, lapala)
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(100)] lapala <- findMECBlock(obj) obj <- wrapper.impute.detQuant(obj, na.type = c("Missing POV", "Missing MEC")) obj <- reIntroduceMEC(obj, lapala)
Removes lines in the dataset based on a prefix string.
removeLines(obj, idLine2Delete = NULL, prefix = NULL)
removeLines(obj, idLine2Delete = NULL, prefix = NULL)
obj |
An object of class |
idLine2Delete |
The name of the column that correspond to the data to filter |
prefix |
A character string that is the prefix to find in the data |
An object of class MSnSet
.
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") removeLines(Exp1_R25_pept[seq_len(100)], "Potential_contaminant") removeLines(Exp1_R25_pept[seq_len(100)], "Reverse")
data(Exp1_R25_pept, package="DAPARdata") removeLines(Exp1_R25_pept[seq_len(100)], "Potential_contaminant") removeLines(Exp1_R25_pept[seq_len(100)], "Reverse")
This function computes a regularized version of the likelihood ratio statistic. The regularization adds a user-input fudge factor s1 to the variance estimator. This is straightforward when using a fixed effect model (cases 'numeric' and 'lm') but requires some more care when using a mixed model.
samLRT(lmm.res.h0, lmm.res.h1, cc, n, p, s1)
samLRT(lmm.res.h0, lmm.res.h1, cc, n, p, s1)
lmm.res.h0 |
a vector of object containing the estimates (used to compute the statistic) under H0 for each connected component. If the fast version of the estimator was used (as implemented in this package), lmm.res.h0 is a vector containing averages of squared residuals. If a fixed effect model was used, it is a vector of lm objects and if a mixed effect model was used it is a vector or lmer object. |
lmm.res.h1 |
similar to lmm.res.h0, a vector of object containing the estimates (used to compute the statistic) under H1 for each protein. |
cc |
a list containing the indices of peptides and proteins belonging to each connected component. |
n |
the number of samples used in the test |
p |
the number of proteins in the experiment |
s1 |
the fudge factor to be added to the variance estimate |
llr.sam: a vector of numeric containing the regularized log likelihood ratio statistic for each protein. s: a vector containing the maximum likelihood estimate of the variance for the chosen model. When using the fast version of the estimator implemented in this package, this is the same thing as the input lmm.res.h1. lh1.sam: a vector of numeric containing the regularized log likelihood under H1 for each protein. lh0.sam: a vector of numeric containing the regularized log likelihood under H0 for each connected component. sample.sizes: a vector of numeric containing the sample size (number of biological samples times number of peptides) for each protein. This number is the same for all proteins within each connected component.
Thomas Burger, Laurent Jacob
NULL
NULL
Saves the parameters of a tool in the pipeline of Prostar
saveParameters(obj, name.dataset = NULL, name = NULL, l.params = NULL)
saveParameters(obj, name.dataset = NULL, name = NULL, l.params = NULL)
obj |
An object of class |
name.dataset |
The name of the dataset |
name |
The name of the tool. Available values are: "Norm, Imputation, anaDiff, GOAnalysis,Aggregation" |
l.params |
A list that contains the parameters |
An instance of class MSnSet
.
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") l.params <- list(method = "Global quantile alignment", type = "overall") saveParameters(Exp1_R25_pept, "Filtered.peptide", "Imputation", l.params)
data(Exp1_R25_pept, package="DAPARdata") l.params <- list(method = "Global quantile alignment", type = "overall") saveParameters(Exp1_R25_pept, "Filtered.peptide", "Imputation", l.params)
highcharter
A scatter plot of GO enrichment analysis
scatterplotEnrichGO_HC(ego, maxRes = 10, title = NULL)
scatterplotEnrichGO_HC(ego, maxRes = 10, title = NULL)
ego |
The result of the GO enrichment, provides either by the function
enrichGO in |
maxRes |
The maximum number of categories to display in the plot |
title |
The title of the plot |
A dotplot
Samuel Wieczorek
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot if (!requireNamespace("org.Sc.sgd.db", quietly = TRUE)) { stop("Please install org.Sc.sgd.db: BiocManager::install('org.Sc.sgd.db')") } library(org.Sc.sgd.db) univ <- univ_AnnotDbPkg("org.Sc.sgd.db") ego <- enrich_GO( data = Biobase::fData(obj)$Protein.IDs, idFrom = "UNIPROT", orgdb = "org.Sc.sgd.db", ont = "MF", pval = 0.05, universe = univ ) scatterplotEnrichGO_HC(ego)
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot if (!requireNamespace("org.Sc.sgd.db", quietly = TRUE)) { stop("Please install org.Sc.sgd.db: BiocManager::install('org.Sc.sgd.db')") } library(org.Sc.sgd.db) univ <- univ_AnnotDbPkg("org.Sc.sgd.db") ego <- enrich_GO( data = Biobase::fData(obj)$Protein.IDs, idFrom = "UNIPROT", orgdb = "org.Sc.sgd.db", ont = "MF", pval = 0.05, universe = univ ) scatterplotEnrichGO_HC(ego)
Gives all the tags of the metadata vocabulary containing the pattern (parent and all its children).
search.metacell.tags(pattern, level, depth = "1")
search.metacell.tags(pattern, level, depth = "1")
pattern |
The string to search. |
level |
The available levels are : names() |
depth |
xxx |
xxx
Samuel Wieczorek
search.metacell.tags("Missing POV", "peptide") search.metacell.tags("Quantified", "peptide", depth = "0")
search.metacell.tags("Missing POV", "peptide") search.metacell.tags("Quantified", "peptide", depth = "0")
Computes the adjusted p-values separately on contrast using CP4P
separateAdjPval(x, pval.threshold = 1.05, method = 1)
separateAdjPval(x, pval.threshold = 1.05, method = 1)
x |
a proteins x contrasts dataframe of (raw) p-values |
pval.threshold |
all the p-values above the threshold are not considered. Default is 1.05 (which is equivalent to have no threshold). Applying a threshold nearby 1 can be instrumental to improve the uniformity under the null, notably in case of upstream mutliple contrat correction (for experienced users only) |
method |
a method to estimate pi_0, see CP4P |
a proteins x contrasts table of adjusted p-values
Thomas Burger
data(Exp1_R25_prot, package='DAPARdata') exdata <- Exp1_R25_prot[1:5,] separateAdjPval(testAnovaModels(applyAnovasOnProteins(exdata), "TukeyHSD")$P_Value)
data(Exp1_R25_prot, package='DAPARdata') exdata <- Exp1_R25_prot[1:5,] separateAdjPval(testAnovaModels(applyAnovasOnProteins(exdata), "TukeyHSD")$P_Value)
This function is based on the metacell dataframe to look for either missing values (used to update an initial dataset) or imputed values (used when post processing protein metacell after aggregation)
Set_POV_MEC_tags(conds, df, level)
Set_POV_MEC_tags(conds, df, level)
conds |
xxx |
df |
An object of class |
level |
Type of entity/pipeline |
An instance of class MSnSet
.
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10)] cols.for.ident <- c("metacell_Intensity_C_R1", "metacell_Intensity_C_R2", "metacell_Intensity_C_R3", "metacell_Intensity_D_R1", "metacell_Intensity_D_R2", "metacell_Intensity_D_R3") conds <- Biobase::pData(obj)$Condition df <- Biobase::fData(obj)[, cols.for.ident] df <- Set_POV_MEC_tags(conds, df, level = "peptide")
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10)] cols.for.ident <- c("metacell_Intensity_C_R1", "metacell_Intensity_C_R2", "metacell_Intensity_C_R3", "metacell_Intensity_D_R1", "metacell_Intensity_D_R2", "metacell_Intensity_D_R3") conds <- Biobase::pData(obj)$Condition df <- Biobase::fData(obj)[, cols.for.ident] df <- Set_POV_MEC_tags(conds, df, level = "peptide")
Returns the connected components
SetCC(obj, cc)
SetCC(obj, cc)
obj |
An object (peptides) of class |
cc |
The connected components list |
xxx
Samuel Wieczorek
data(Exp1_R25_pept, package='DAPARdata') Xshared <- BuildAdjacencyMatrix(Exp1_R25_pept[seq_len(100)], "Protein_group_IDs", FALSE) Xunique <- BuildAdjacencyMatrix(Exp1_R25_pept[seq_len(100)], "Protein_group_IDs", TRUE) ll.X <- list(matWithSharedPeptides = Xshared, matWithUniquePeptides = Xunique) Exp1_R25_pept <- SetMatAdj(Exp1_R25_pept, ll.X) ll1 <- get.pep.prot.cc(GetMatAdj(Exp1_R25_pept)$matWithSharedPeptides) ll2 <- get.pep.prot.cc( GetMatAdj(Exp1_R25_pept)$matWithUniquePeptides) cc <- list(allPep = ll1, onlyUniquePep = ll2) Exp1_R25_pept <- SetCC(Exp1_R25_pept, cc)
data(Exp1_R25_pept, package='DAPARdata') Xshared <- BuildAdjacencyMatrix(Exp1_R25_pept[seq_len(100)], "Protein_group_IDs", FALSE) Xunique <- BuildAdjacencyMatrix(Exp1_R25_pept[seq_len(100)], "Protein_group_IDs", TRUE) ll.X <- list(matWithSharedPeptides = Xshared, matWithUniquePeptides = Xunique) Exp1_R25_pept <- SetMatAdj(Exp1_R25_pept, ll.X) ll1 <- get.pep.prot.cc(GetMatAdj(Exp1_R25_pept)$matWithSharedPeptides) ll2 <- get.pep.prot.cc( GetMatAdj(Exp1_R25_pept)$matWithUniquePeptides) cc <- list(allPep = ll1, onlyUniquePep = ll2) Exp1_R25_pept <- SetCC(Exp1_R25_pept, cc)
MSnSet
Record the adjacency matrices in a slot of the
dataset of class MSnSet
SetMatAdj(obj, X)
SetMatAdj(obj, X)
obj |
An object (peptides) of class |
X |
A list of two adjacency matrices |
NA
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") Xshared <- BuildAdjacencyMatrix(Exp1_R25_pept[seq_len(100)], "Protein_group_IDs", FALSE) Xunique <- BuildAdjacencyMatrix(Exp1_R25_pept[seq_len(100)], "Protein_group_IDs", TRUE) ll.X <- list(matWithSharedPeptides = Xshared, matWithUniquePeptides = Xunique) Exp1_R25_pept <- SetMatAdj(Exp1_R25_pept, ll.X)
data(Exp1_R25_pept, package="DAPARdata") Xshared <- BuildAdjacencyMatrix(Exp1_R25_pept[seq_len(100)], "Protein_group_IDs", FALSE) Xunique <- BuildAdjacencyMatrix(Exp1_R25_pept[seq_len(100)], "Protein_group_IDs", TRUE) ll.X <- list(matWithSharedPeptides = Xshared, matWithUniquePeptides = Xunique) Exp1_R25_pept <- SetMatAdj(Exp1_R25_pept, ll.X)
Method to split an adjacency matrix into specific and shared
splitAdjacencyMat(X)
splitAdjacencyMat(X)
X |
An adjacency matrix |
A list of two adjacency matrices
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj.pep <- Exp1_R25_pept[seq_len(10)] protID <- "Protein_group_IDs" X <- BuildAdjacencyMatrix(obj.pep, protID, FALSE) ll <- splitAdjacencyMat(X)
data(Exp1_R25_pept, package="DAPARdata") obj.pep <- Exp1_R25_pept[seq_len(10)] protID <- "Protein_group_IDs" X <- BuildAdjacencyMatrix(obj.pep, protID, FALSE) ll <- splitAdjacencyMat(X)
Removes lines in the dataset based on a prefix strings (contaminants, reverse or both).
StringBasedFiltering( obj, idCont2Delete = NULL, prefix_Cont = NULL, idRev2Delete = NULL, prefix_Rev = NULL )
StringBasedFiltering( obj, idCont2Delete = NULL, prefix_Cont = NULL, idRev2Delete = NULL, prefix_Rev = NULL )
obj |
An object of class |
idCont2Delete |
The name of the column that correspond to the contaminants to filter |
prefix_Cont |
A character string that is the prefix for the contaminants to find in the data |
idRev2Delete |
The name of the column that correspond to the reverse data to filter |
prefix_Rev |
A character string that is the prefix for the reverse to find in the data |
An list of 4 items :
* obj : an object of class MSnSet
in which the lines have been deleted
* deleted.both : an object of class MSnSet
which contains the deleted
lines corresponding to both contaminants and reverse,
* deleted.contaminants : n object of class MSnSet
which contains the
deleted lines corresponding to contaminants,
* deleted.reverse : an object of class MSnSet
which contains the
deleted lines corresponding to reverse,
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") StringBasedFiltering( Exp1_R25_pept[seq_len(100)], "Potential_contaminant", "+", "Reverse", "+")
data(Exp1_R25_pept, package="DAPARdata") StringBasedFiltering( Exp1_R25_pept[seq_len(100)], "Potential_contaminant", "+", "Reverse", "+")
Removes lines in the dataset based on a prefix strings.
StringBasedFiltering2(obj, cname = NULL, tag = NULL)
StringBasedFiltering2(obj, cname = NULL, tag = NULL)
obj |
An object of class |
cname |
The name of the column that correspond to the line to filter |
tag |
A character string that is the prefix for the contaminants to find in the data |
An list of 4 items :
* obj : an object of class MSnSet
in which the lines have been deleted
* deleted : an object of class MSnSet
which contains the deleted lines
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj.filter <- StringBasedFiltering2(Exp1_R25_pept[seq_len(100)], "Potential_contaminant", "+")
data(Exp1_R25_pept, package="DAPARdata") obj.filter <- StringBasedFiltering2(Exp1_R25_pept[seq_len(100)], "Potential_contaminant", "+")
Normalisation SumByColumns
SumByColumns(qData, conds = NULL, type = NULL, subset.norm = NULL)
SumByColumns(qData, conds = NULL, type = NULL, subset.norm = NULL)
qData |
xxxx |
conds |
xxx |
type |
Available values are "overall" (shift all the sample distributions at once) or "within conditions" (shift the sample distributions within each condition at a time). |
subset.norm |
A vector of index indicating rows to be used for normalization |
A normalized numeric matrix
Samuel Wieczorek, Thomas Burger, Helene Borges, Anais Courtier, Enora Fremy
data(Exp1_R25_pept, package="DAPARdata") qData <- Biobase::exprs(Exp1_R25_pept) conds <- Biobase::pData(Exp1_R25_pept)$Condition normalized <- SumByColumns(qData, conds, type = "within conditions", subset.norm = seq_len(10) )
data(Exp1_R25_pept, package="DAPARdata") qData <- Biobase::exprs(Exp1_R25_pept) conds <- Biobase::pData(Exp1_R25_pept)$Condition normalized <- SumByColumns(qData, conds, type = "within conditions", subset.norm = seq_len(10) )
xxx
SymFilteringOperators()
SymFilteringOperators()
A 'character()'
SymFilteringOperators()
SymFilteringOperators()
Check if xxxxxx
test.design(tab)
test.design(tab)
tab |
A data.frame which correspond to xxxxxx |
A list of two items
Thomas Burger, Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") test.design(Biobase::pData(Exp1_R25_pept)[, seq_len(3)])
data(Exp1_R25_pept, package="DAPARdata") test.design(Biobase::pData(Exp1_R25_pept)[, seq_len(3)])
Applies a statistical test on each element of a list of linear models
testAnovaModels(aov_fits, test = "Omnibus")
testAnovaModels(aov_fits, test = "Omnibus")
aov_fits |
a list of linear models, such as those outputted by applyAnovasOnProteins |
test |
a character string among "Omnibus", "TukeyHSD", "TukeySinglestep", "TukeyStepwise", "TukeyNoMTC", "DunnettSinglestep", "DunnettStepwise" and "DunnettNoMTC". "Omnibus" tests the all-mean equality, the Tukey tests compares all pairs of means and the Dunnet tests compare all the means to the first one. For multiple tests (Dunnet's or Tukey's) it is possible to correct for multiplicity (either with single-step or step-wise FWER) or not. All the Tukey's and Dunnet's tests use the multcomp package expect for "TukeyHSD" which relies on the stats package. "TukeyHSD" and "TukeyStepwise" gives similar results. |
a list of 2 tables (p-values and fold-changes, respecively)
Thomas Burger
data(Exp1_R25_prot, package='DAPARdata') exdata <- Exp1_R25_prot[1:5,] testAnovaModels(applyAnovasOnProteins(exdata))
data(Exp1_R25_prot, package='DAPARdata') exdata <- Exp1_R25_prot[1:5,] testAnovaModels(applyAnovasOnProteins(exdata))
xxx
thresholdpval4fdr(x, pval.T, M)
thresholdpval4fdr(x, pval.T, M)
x |
xxx |
pval.T |
xxx |
M |
xxx |
xxx
Thomas Burger
NULL
NULL
Generator of simulated values
translatedRandomBeta(n, min, max, param1 = 3, param2 = 1)
translatedRandomBeta(n, min, max, param1 = 3, param2 = 1)
n |
An integer which is the number of simulation (same as in rbeta) |
min |
An integer that corresponds to the lower bound of the interval |
max |
An integer that corresponds to the upper bound of the interval |
param1 |
An integer that is the first parameter of rbeta function. |
param2 |
An integer that is second parameter of rbeta function. |
A vector of n simulated values
Thomas Burger
translatedRandomBeta(1000, 5, 10, 1, 1)
translatedRandomBeta(1000, 5, 10, 1, 1)
Function to compute the 'universe' argument for the enrich_GO
function, in case this latter should be the entire organism.
Returns all the ID of the OrgDb annotation package for the corresponding
organism.
univ_AnnotDbPkg(orgdb)
univ_AnnotDbPkg(orgdb)
orgdb |
a Bioconductor OrgDb annotation package |
A vector of ENTREZ ID
Florence Combes
if (!requireNamespace("org.Sc.sgd.db", quietly = TRUE)) { stop("Please install org.Sc.sgd.db: BiocManager::install('org.Sc.sgd.db')") } library(org.Sc.sgd.db) univ_AnnotDbPkg("org.Sc.sgd.db")
if (!requireNamespace("org.Sc.sgd.db", quietly = TRUE)) { stop("Please install org.Sc.sgd.db: BiocManager::install('org.Sc.sgd.db')") } library(org.Sc.sgd.db) univ_AnnotDbPkg("org.Sc.sgd.db")
Update the metacell information of missing values that were imputed
UpdateMetacellAfterImputation(obj)
UpdateMetacellAfterImputation(obj)
obj |
xxx |
xxx
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10)] obj.imp.pov <- wrapper.impute.KNN(obj, K = 3)
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10)] obj.imp.pov <- wrapper.impute.KNN(obj, K = 3)
Builds a violinplot from a dataframe
violinPlotD(obj, conds, keyId, legend = NULL, pal = NULL, subset.view = NULL)
violinPlotD(obj, conds, keyId, legend = NULL, pal = NULL, subset.view = NULL)
obj |
xxx |
conds |
xxx |
keyId |
xxx |
legend |
A vector of the conditions (one condition per sample). |
pal |
xxx |
subset.view |
xxx |
A violinplot
Samuel Wieczorek, Anais Courtier
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot legend <- conds <- Biobase::pData(obj)$Condition key <- "Protein_IDs" violinPlotD(obj, conds, key, legend, subset.view = seq_len(10))
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot legend <- conds <- Biobase::pData(obj)$Condition key <- "Protein_IDs" violinPlotD(obj, conds, key, legend, subset.view = seq_len(10))
Visualize the clusters according to pvalue thresholds
visualizeClusters( dat, clust_model, adjusted_pValues, FDR_th = NULL, ttl = "", subttl = "" )
visualizeClusters( dat, clust_model, adjusted_pValues, FDR_th = NULL, ttl = "", subttl = "" )
dat |
the standardize data returned by the function [checkClusterability()] |
clust_model |
the clustering model obtained with dat. |
adjusted_pValues |
vector of the adjusted pvalues obtained for each protein with a 1-way ANOVA (for example obtained with the function [wrapperClassic1wayAnova()]). |
FDR_th |
the thresholds of FDR pvalues for the coloring of the profiles. The default (NULL) creates 4 thresholds: 0.001, 0.005, 0.01, 0.05 For the sake of readability, a maximum of 4 values can be specified. |
ttl |
title for the plot. |
subttl |
subtitle for the plot. |
a ggplot object
Helene Borges
library(dplyr) data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(1000)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") expR25_ttest <- compute_t_tests(obj$new) averaged_means <- averageIntensities(obj$new) only_means <- dplyr::select_if(averaged_means, is.numeric) only_features <- dplyr::select_if(averaged_means, is.character) means <- purrr::map(purrr::array_branch(as.matrix(only_means), 1), mean) centered <- only_means - unlist(means) centered_means <- dplyr::bind_cols( feature = dplyr::as_tibble(only_features), dplyr::as_tibble(centered)) difference <- only_means[, 1] - only_means[, 2] clusters <- as.data.frame(difference) %>% dplyr::mutate(cluster = dplyr::if_else(difference > 0, 1, 2)) vizu <- visualizeClusters( dat = centered_means, clust_model = as.factor(clusters$cluster), adjusted_pValues = expR25_ttest$P_Value$`25fmol_vs_10fmol_pval`, FDR_th = c(0.001, 0.005, 0.01, 0.05), ttl = "Clustering of protein profiles")
library(dplyr) data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(1000)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") expR25_ttest <- compute_t_tests(obj$new) averaged_means <- averageIntensities(obj$new) only_means <- dplyr::select_if(averaged_means, is.numeric) only_features <- dplyr::select_if(averaged_means, is.character) means <- purrr::map(purrr::array_branch(as.matrix(only_means), 1), mean) centered <- only_means - unlist(means) centered_means <- dplyr::bind_cols( feature = dplyr::as_tibble(only_features), dplyr::as_tibble(centered)) difference <- only_means[, 1] - only_means[, 2] clusters <- as.data.frame(difference) %>% dplyr::mutate(cluster = dplyr::if_else(difference > 0, 1, 2)) vizu <- visualizeClusters( dat = centered_means, clust_model = as.factor(clusters$cluster), adjusted_pValues = expR25_ttest$P_Value$`25fmol_vs_10fmol_pval`, FDR_th = c(0.001, 0.005, 0.01, 0.05), ttl = "Clustering of protein profiles")
Normalisation vsn
vsn(qData, conds, type = NULL)
vsn(qData, conds, type = NULL)
qData |
A numeric matrix. |
conds |
xxx |
type |
"overall" (shift all the sample distributions at once) or "within conditions" (shift the sample distributions within each condition at a time). |
A normalized numeric matrix
Thomas Burger, Helene Borges, Anais Courtier, Enora Fremy
data(Exp1_R25_pept, package="DAPARdata") qData <- Biobase::exprs(Exp1_R25_pept) conds <- Biobase::pData(Exp1_R25_pept)$Condition normalized <- vsn(qData, conds, type = "overall")
data(Exp1_R25_pept, package="DAPARdata") qData <- Biobase::exprs(Exp1_R25_pept) conds <- Biobase::pData(Exp1_R25_pept)$Condition normalized <- vsn(qData, conds, type = "overall")
Wrapper to the function that plot to compare the quantitative proteomics data before and after normalization.
wrapper.compareNormalizationD_HC( objBefore, objAfter, condsForLegend = NULL, ... )
wrapper.compareNormalizationD_HC( objBefore, objAfter, condsForLegend = NULL, ... )
objBefore |
A dataframe that contains quantitative data before normalization. |
objAfter |
A dataframe that contains quantitative data after normalization. |
condsForLegend |
A vector of the conditions (one condition per sample). |
... |
arguments for palette |
A plot
Samuel Wieczorek
data(Exp1_R25_pept, package='DAPARdata') obj <- Exp1_R25_pept conds <- Biobase::pData(obj)[, "Condition"] objAfter <- wrapper.normalizeD( obj = obj, method = "QuantileCentering", conds = conds, type = "within conditions" ) wrapper.compareNormalizationD_HC(obj, objAfter, conds, pal = ExtendPalette(2))
data(Exp1_R25_pept, package='DAPARdata') obj <- Exp1_R25_pept conds <- Biobase::pData(obj)[, "Condition"] objAfter <- wrapper.normalizeD( obj = obj, method = "QuantileCentering", conds = conds, type = "within conditions" ) wrapper.compareNormalizationD_HC(obj, objAfter, conds, pal = ExtendPalette(2))
Biobase::exprs()
tableBuilds a correlation matrix based on a MSnSet
object.
wrapper.corrMatrixD_HC(obj, rate = 0.5, showValues = TRUE)
wrapper.corrMatrixD_HC(obj, rate = 0.5, showValues = TRUE)
obj |
An object of class |
rate |
A float that defines the gradient of colors. |
showValues |
xxx |
A colored correlation matrix
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") wrapper.corrMatrixD_HC(Exp1_R25_pept)
data(Exp1_R25_pept, package="DAPARdata") wrapper.corrMatrixD_HC(Exp1_R25_pept)
Builds a densityplot of the CV of entities in the
Biobase::exprs() table. of an object MSnSet
. The variance is
calculated for each condition present in the dataset (see the slot
'Condition'
in the Biobase::pData()
table).
wrapper.CVDistD_HC(obj, ...)
wrapper.CVDistD_HC(obj, ...)
obj |
An object of class |
... |
arguments for palette. |
A density plot
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") wrapper.CVDistD_HC(Exp1_R25_pept)
data(Exp1_R25_pept, package="DAPARdata") wrapper.CVDistD_HC(Exp1_R25_pept)
This method is a wrapper to the function impute.mi()
of the package
imp4p
adapted to an object of class MSnSet
.
wrapper.dapar.impute.mi( obj, nb.iter = 3, nknn = 15, selec = 600, siz = 500, weight = 1, ind.comp = 1, progress.bar = FALSE, x.step.mod = 300, x.step.pi = 300, nb.rei = 100, method = 4, gridsize = 300, q = 0.95, q.min = 0, q.norm = 3, eps = 0, methodi = "slsa", lapala = TRUE, distribution = "unif" )
wrapper.dapar.impute.mi( obj, nb.iter = 3, nknn = 15, selec = 600, siz = 500, weight = 1, ind.comp = 1, progress.bar = FALSE, x.step.mod = 300, x.step.pi = 300, nb.rei = 100, method = 4, gridsize = 300, q = 0.95, q.min = 0, q.norm = 3, eps = 0, methodi = "slsa", lapala = TRUE, distribution = "unif" )
obj |
An object of class |
nb.iter |
Same as the function |
nknn |
Same as the function |
selec |
Same as the function |
siz |
Same as the function |
weight |
Same as the function |
ind.comp |
Same as the function |
progress.bar |
Same as the function |
x.step.mod |
Same as the function |
x.step.pi |
Same as the function |
nb.rei |
Same as the function |
method |
Same as the function |
gridsize |
Same as the function |
q |
Same as the function |
q.min |
Same as the function |
q.norm |
Same as the function |
eps |
Same as the function |
methodi |
Same as the function |
lapala |
xxxxxxxxxxx |
distribution |
The type of distribution used. Values are |
The Biobase::exprs(obj)
matrix with imputed values
instead of missing values.
Samuel Wieczorek
utils::data(Exp1_R25_pept, package = "DAPARdata") obj <- Exp1_R25_pept[seq_len(100)] level <- 'peptide' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj.imp.na <- wrapper.dapar.impute.mi(obj, nb.iter = 1, lapala = TRUE) obj.imp.pov <- wrapper.dapar.impute.mi(obj, nb.iter = 1, lapala = FALSE)
utils::data(Exp1_R25_pept, package = "DAPARdata") obj <- Exp1_R25_pept[seq_len(100)] level <- 'peptide' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj.imp.na <- wrapper.dapar.impute.mi(obj, nb.iter = 1, lapala = TRUE) obj.imp.pov <- wrapper.dapar.impute.mi(obj, nb.iter = 1, lapala = FALSE)
heatmap.2
that displays
quantitative data in the Biobase::exprs()
table of an object of
class MSnSet
This function is a wrapper to heatmap.2
that displays
quantitative data in the Biobase::exprs()
table of an object of
class MSnSet
wrapper.heatmapD( obj, distance = "euclidean", cluster = "complete", dendro = FALSE )
wrapper.heatmapD( obj, distance = "euclidean", cluster = "complete", dendro = FALSE )
obj |
An object of class |
distance |
The distance used by the clustering algorithm to compute
the dendrogram. See |
cluster |
the clustering algorithm used to build the dendrogram.
See |
dendro |
A boolean to indicate fi the dendrogram has to be displayed |
A heatmap
Alexia Dorffer
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10)] level <- 'peptide' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeLine(metacell.mask) wrapper.heatmapD(obj)
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10)] level <- 'peptide' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeLine(metacell.mask) wrapper.heatmapD(obj)
MSnSet
This method is a wrapper of the function 'impute.detQuant()' for objects
of class MSnSet
wrapper.impute.detQuant(obj, qval = 0.025, factor = 1, na.type)
wrapper.impute.detQuant(obj, qval = 0.025, factor = 1, na.type)
obj |
An instance of class |
qval |
An expression set containing quantitative values of various replicates |
factor |
A scaling factor to multiply the imputation value with |
na.type |
A string which indicates the type of missing values to impute. Available values are: 'NA' (for both POV and MEC), 'POV', 'MEC'. |
An imputed instance of class MSnSet
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10)] obj.imp.pov <- wrapper.impute.detQuant(obj, na.type = "Missing POV") obj.imp.mec <- wrapper.impute.detQuant(obj, na.type = "Missing MEC")
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10)] obj.imp.pov <- wrapper.impute.detQuant(obj, na.type = "Missing POV") obj.imp.mec <- wrapper.impute.detQuant(obj, na.type = "Missing MEC")
MSnSet
objectThis method is a wrapper to objects of class MSnSet
and imputes
missing values with a fixed value.
wrapper.impute.fixedValue(obj, fixVal = 0, na.type)
wrapper.impute.fixedValue(obj, fixVal = 0, na.type)
obj |
An object of class |
fixVal |
A float. |
na.type |
A string which indicates the type of missing values to impute. Available values are: 'NA' (for both POV and MEC), 'POV', 'MEC'. |
The object obj
which has been imputed
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10), ] obj.imp.pov <- wrapper.impute.fixedValue(obj, 0.001, na.type = "Missing POV") obj.imp.mec <- wrapper.impute.fixedValue(obj, 0.001, na.type = "Missing MEC") obj.imp.na <- wrapper.impute.fixedValue(obj, 0.001, na.type = c("Missing MEC", "Missing POV"))
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10), ] obj.imp.pov <- wrapper.impute.fixedValue(obj, 0.001, na.type = "Missing POV") obj.imp.mec <- wrapper.impute.fixedValue(obj, 0.001, na.type = "Missing MEC") obj.imp.na <- wrapper.impute.fixedValue(obj, 0.001, na.type = c("Missing MEC", "Missing POV"))
MSnSet
objectCan impute only POV missing values. This method is a wrapper for
objects of class MSnSet
and imputes missing values with a fixed value.
This function imputes the missing values condition by condition.
wrapper.impute.KNN(obj = NULL, K)
wrapper.impute.KNN(obj = NULL, K)
obj |
An object of class |
K |
the number of neighbors. |
The object obj
which has been imputed
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj.imp.pov <- wrapper.impute.KNN(obj = Exp1_R25_pept[seq_len(10)], K = 3)
data(Exp1_R25_pept, package="DAPARdata") obj.imp.pov <- wrapper.impute.KNN(obj = Exp1_R25_pept[seq_len(10)], K = 3)
This method is a wrapper to the function impute.mle()
of the
package imp4p
adapted to an object of class MSnSet
.
It does not impute MEC missing values.
wrapper.impute.mle(obj)
wrapper.impute.mle(obj)
obj |
An object of class |
The Biobase::exprs(obj)
matrix with imputed values instead
of missing
values.
Samuel Wieczorek
utils::data(Exp1_R25_pept, package = "DAPARdata") obj <- Exp1_R25_pept[seq_len(10), ] level <- 'peptide' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj.imp.na <- wrapper.impute.mle(obj)
utils::data(Exp1_R25_pept, package = "DAPARdata") obj <- Exp1_R25_pept[seq_len(10), ] level <- 'peptide' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj.imp.na <- wrapper.impute.mle(obj)
This method is a wrapper to the function impute.pa
of the package
imp4p
adapted to an object of class MSnSet
.
wrapper.impute.pa(obj = NULL, q.min = 0.025)
wrapper.impute.pa(obj = NULL, q.min = 0.025)
obj |
An object of class |
q.min |
Same as the function |
The Biobase::exprs(obj)
matrix with imputed values instead of
missing values.
Samuel Wieczorek
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(10)] obj.imp.pov <- wrapper.impute.pa(obj)
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(10)] obj.imp.pov <- wrapper.impute.pa(obj)
MSnSet
objectThis method is a wrapper to the function impute.pa2()
adapted to
objects of class MSnSet
.
wrapper.impute.pa2(obj, q.min = 0, q.norm = 3, eps = 0, distribution = "unif")
wrapper.impute.pa2(obj, q.min = 0, q.norm = 3, eps = 0, distribution = "unif")
obj |
An object of class |
q.min |
A quantile value of the observed values allowing defining the maximal value which can be generated. This maximal value is defined by the quantile q.min of the observed values distribution minus eps. Default is 0 (the maximal value is the minimum of observed values minus eps). |
q.norm |
A quantile value of a normal distribution allowing defining the minimal value which can be generated. Default is 3 (the minimal value is the maximal value minus qn*median(sd(observed values)) where sd is the standard deviation of a row in a condition). |
eps |
A value allowing defining the maximal value which can be generated. This maximal value is defined by the quantile q.min of the observed values distribution minus eps. Default is 0. |
distribution |
The type of distribution used. Values are |
The object obj
which has been imputed
Thomas Burger, Samuel Wieczorek
utils::data(Exp1_R25_pept, package = "DAPARdata") obj.imp.pa2 <- wrapper.impute.pa2(Exp1_R25_pept[seq_len(100)], distribution = "beta")
utils::data(Exp1_R25_pept, package = "DAPARdata") obj.imp.pa2 <- wrapper.impute.pa2(Exp1_R25_pept[seq_len(100)], distribution = "beta")
This method is a wrapper to the function impute.slsa()
of the package
imp4p
adapted to an object of class MSnSet
.
wrapper.impute.slsa(obj = NULL)
wrapper.impute.slsa(obj = NULL)
obj |
An object of class |
The Biobase::exprs(obj)
matrix with imputed values
instead of missing values.
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(100)] obj.slsa.pov <- wrapper.impute.slsa(obj)
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(100)] obj.slsa.pov <- wrapper.impute.slsa(obj)
MSnSet
object#' Plots a heatmap of the quantitative data. Each column represent one of
the conditions in the object of class MSnSet
and
the color is proportional to the mean of intensity for each line of
the dataset.
The lines have been sorted in order to vizualize easily the different
number of missing values. A white square is plotted for missing values.
wrapper.mvImage(obj, pattern = "Missing MEC")
wrapper.mvImage(obj, pattern = "Missing MEC")
obj |
An object of class |
pattern |
xxx |
A heatmap
Alexia Dorffer
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(1000)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") wrapper.mvImage(obj$new)
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(1000)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") wrapper.mvImage(obj$new)
Provides several methods to normalize quantitative data from
a MSnSet
object.
They are organized in six main families : GlobalQuantileAlignement,
sumByColumns, QuantileCentering, MeanCentering, LOESS, vsn
For the first family, there is no type.
For the five other families, two type categories are available :
"Overall" which means that the value for each protein
(ie line in the expression data tab) is computed over all the samples ;
"within conditions" which means that the value for each protein
(ie line in the Biobase::exprs()
data tab) is computed condition
by condition.
wrapper.normalizeD(obj, method, withTracking = FALSE, ...)
wrapper.normalizeD(obj, method, withTracking = FALSE, ...)
obj |
An object of class |
method |
One of the following : "GlobalQuantileAlignment" (for normalizations of important magnitude), "SumByColumns", "QuantileCentering", "Mean Centering", "LOESS" and "vsn". |
withTracking |
xxx |
... |
xxx |
xxx
Samuel Wieczorek, Thomas Burger, Helene Borges
data(Exp1_R25_pept, package="DAPARdata") conds <- Biobase::pData(Exp1_R25_pept)$Condition obj <- wrapper.normalizeD( obj = Exp1_R25_pept, method = "QuantileCentering", conds = conds, type = "within conditions" )
data(Exp1_R25_pept, package="DAPARdata") conds <- Biobase::pData(Exp1_R25_pept)$Condition obj <- wrapper.normalizeD( obj = Exp1_R25_pept, method = "QuantileCentering", conds = conds, type = "within conditions" )
Compute the PCA
wrapper.pca(obj, var.scaling = TRUE, ncp = NULL)
wrapper.pca(obj, var.scaling = TRUE, ncp = NULL)
obj |
xxx |
var.scaling |
The dimensions to plot |
ncp |
xxxx |
A xxxxxx
Samuel Wieczorek
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(100)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") res.pca <- wrapper.pca(obj$new)
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(100)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") res.pca <- wrapper.pca(obj$new)
MSnSet
object,
calling the cp4p
package functions.This function is a wrapper to the calibration.plot method of the
cp4p
package for use with MSnSet
objects.
wrapperCalibrationPlot(vPVal, pi0Method = "pounds")
wrapperCalibrationPlot(vPVal, pi0Method = "pounds")
vPVal |
A dataframe that contains quantitative data. |
pi0Method |
A vector of the conditions (one condition per sample). |
A plot
Samuel Wieczorek
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(100)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") qData <- Biobase::exprs(obj$new) sTab <- Biobase::pData(obj$new) limma <- limmaCompleteTest(qData, sTab) wrapperCalibrationPlot(limma$P_Value[, 1])
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(100)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") qData <- Biobase::exprs(obj$new) sTab <- Biobase::pData(obj$new) limma <- limmaCompleteTest(qData, sTab) wrapperCalibrationPlot(limma$P_Value[, 1])
Wrapper for One-way Anova statistical test
wrapperClassic1wayAnova(obj, with_post_hoc = "No", post_hoc_test = "No")
wrapperClassic1wayAnova(obj, with_post_hoc = "No", post_hoc_test = "No")
obj |
An object of class |
with_post_hoc |
a character string with 2 possible values: "Yes" and "No" (default) saying if function must perform a Post-Hoc test or not. |
post_hoc_test |
character string, possible values are "No" (for no
test; default value) or TukeyHSD" or "Dunnett". See details of
|
This function allows to perform a 1-way Analysis of Variance. Also
computes the post-hoc tests if the with_post_hoc
parameter is set to
yes. There are two possible post-hoc tests: the Tukey Honest Significant
Differences (specified as "TukeyHSD") and the Dunnett test
(specified as "Dunnett").
A list of two dataframes. First one called "logFC" contains all pairwise comparisons logFC values (one column for one comparison) for each analysed feature (Except in the case without post-hoc testing, for which NAs are returned.); The second one named "P_Value" contains the corresponding p-values.
Hélène Borges
[postHocTest()]
## Not run: examples/ex_wrapperClassic1wayAnova.R
## Not run: examples/ex_wrapperClassic1wayAnova.R
This function does all of the steps necessary to obtain a clustering model and its graph from average abundances of proteins/peptides. It is possible to carry out either a kmeans model or an affinity propagation model. See details for exact steps.
wrapperRunClustering( obj, clustering_method, conditions_order = NULL, k_clusters = NULL, adjusted_pvals, ttl = "", subttl = "", FDR_thresholds = NULL )
wrapperRunClustering( obj, clustering_method, conditions_order = NULL, k_clusters = NULL, adjusted_pvals, ttl = "", subttl = "", FDR_thresholds = NULL )
obj |
ExpressionSet or MSnSet object. |
clustering_method |
character string. Three possible values are "kmeans", "affinityProp" and "affinityPropReduced. See the details section for more explanation. |
conditions_order |
vector specifying the order of the Condition factor levels in the phenotype data. Default value is NULL, which means that it is the order of the condition present in the phenotype data of "obj" which is taken to create the profiles. |
k_clusters |
integer or NULL. Number of clusters to run the kmeans algorithm. If 'clustering_method' is set to "kmeans" and this parameter is set to NULL, then a kmeans model will be realized with an optimal number of clusters 'k' estimated by the Gap statistic method. Ignored for the Affinity propagation model. |
adjusted_pvals |
vector of adjusted pvalues returned by the [wrapperClassic1wayAnova()] |
ttl |
the title for the final plot |
subttl |
the subtitle for the final plot |
FDR_thresholds |
vector containing the different threshold values to be used to color the profiles according to their adjusted pvalue. The default value (NULL) generates 4 thresholds: [0.001, 0.005, 0.01, 0.05]. Thus, there will be 5 intervals therefore 5 colors: the pvalues <0.001, those between 0.001 and 0.005, those between 0.005 and 0.01, those between 0.01 and 0.05, and those> 0.05. The highest given value will be considered as the threshold of insignificance, the profiles having a pvalue> this threshold value will then be colored in gray. |
The first step consists in averaging the abundances of proteins/peptides according to the different conditions defined in the phenotype data of the expressionSet / MSnSet. Then we standardize the data if there are more than 2 conditions. If the user asks to realize a kmeans model without specifying the desired number of clusters ('clustering_method =" kmeans "' and 'k_clusters = NULL'), the function checks data's clusterability and estimates a number of clusters k using the gap statistic method. It is advise however to specify a k for the kmeans, because the gap stat gives the smallest possible k, whereas in biology a small number of clusters can turn out to be uninformative. If you want to run a kmeans but you don't know what number of clusters to give, you can let the pipeline run the first time without specifying 'k_clusters', in order to view the profiles the first time and choose by the following is a more appropriate value of k. If it is assumed that the data can be structured with a large number of clusters, it is recommended to use the affinity propagation model instead. This method simultaneously considers all the data as exemplary potentials, unlike hard clustering (kmeans) which initializes with a number k of points taken at random. The "affinityProp" model will use a q parameter set to NA, meaning that exemplar preferences are set to the median of non-Inf values in the similarity matrix (set q to 0.5 will be the same). The "affinityPropReduced" model will use a q set to 0, meaning that exemplar preferences are set to the sample quantile with threshold 0 of non-Inf values. This should lead to a smaller number of final clusters.
a list of 2 elements: "model" is the clustering model, "ggplot" is the ggplot of profiles clustering.
Helene Borges
Tibshirani, R., Walther, G. and Hastie, T. (2001). Estimating the number of data clusters via the Gap statistic. *Journal of the Royal Statistical Society* B, 63, 411–423.
Frey, B. J. and Dueck, D. (2007) Clustering by passing messages between data points. *Science* 315, 972-976. DOI: 10.1126/science.1136800
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(1000)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") expR25_ttest <- compute_t_tests(obj$new) wrapperRunClustering( obj = obj$new, adjusted_pvals = expR25_ttest$P_Value$`25fmol_vs_10fmol_pval` )
data(Exp1_R25_prot, package="DAPARdata") obj <- Exp1_R25_prot[seq_len(1000)] level <- 'protein' metacell.mask <- match.metacell(GetMetacell(obj), c("Missing POV", "Missing MEC"), level) indices <- GetIndices_WholeMatrix(metacell.mask, op = ">=", th = 1) obj <- MetaCellFiltering(obj, indices, cmd = "delete") expR25_ttest <- compute_t_tests(obj$new) wrapperRunClustering( obj = obj$new, adjusted_pvals = expR25_ttest$P_Value$`25fmol_vs_10fmol_pval` )
This function exports a data.frame to a Excel file.
write.excel(df, tags = NULL, colors = NULL, tabname = "foo", filename = NULL)
write.excel(df, tags = NULL, colors = NULL, tabname = "foo", filename = NULL)
df |
An data.frame |
tags |
xxx |
colors |
xxx |
tabname |
xxx |
filename |
A character string for the name of the Excel file. |
A Excel file (.xlsx)
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") df <- Biobase::exprs(Exp1_R25_pept[seq_len(100)]) tags <- GetMetacell(Exp1_R25_pept[seq_len(100)]) colors <- list( "Missing POV" = "lightblue", "Missing MEC" = "orange", "Quant. by recovery" = "lightgrey", "Quant. by direct id" = "white", "Combined tags" = "red" ) write.excel(df, tags, colors, filename = "toto")
data(Exp1_R25_pept, package="DAPARdata") df <- Biobase::exprs(Exp1_R25_pept[seq_len(100)]) tags <- GetMetacell(Exp1_R25_pept[seq_len(100)]) colors <- list( "Missing POV" = "lightblue", "Missing MEC" = "orange", "Quant. by recovery" = "lightgrey", "Quant. by direct id" = "white", "Combined tags" = "red" ) write.excel(df, tags, colors, filename = "toto")
Exports a MSnset dataset into a zip archive containing three zipped CSV files.
writeMSnsetToCSV(obj, fname)
writeMSnsetToCSV(obj, fname)
obj |
An object of class |
fname |
The name of the archive file. |
A compressed file
Samuel Wieczorek
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10)] writeMSnsetToCSV(obj, "foo")
data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10)] writeMSnsetToCSV(obj, "foo")
MSnSet
object to a Excel file.This function exports a MSnSet
data object to a Excel file.
Each of the three data.frames in the MSnSet
object (ie experimental
data, phenoData and metaData are respectively integrated into separate sheets
in the Excel file).
The colored cells in the experimental data correspond to the original missing values which have been imputed.
writeMSnsetToExcel(obj, filename)
writeMSnsetToExcel(obj, filename)
obj |
An object of class |
filename |
A character string for the name of the Excel file. |
A Excel file (.xlsx)
Samuel Wieczorek
Sys.setenv("R_ZIPCMD" = Sys.which("zip")) data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10)] writeMSnsetToExcel(obj, "foo")
Sys.setenv("R_ZIPCMD" = Sys.which("zip")) data(Exp1_R25_pept, package="DAPARdata") obj <- Exp1_R25_pept[seq_len(10)] writeMSnsetToExcel(obj, "foo")