q_metadata: Quantitative metadata vocabulary for entities

q_metadataR Documentation

Quantitative metadata vocabulary for entities

Description

This function gives the vocabulary used for the quantitative metadata of each entity in each condition.

This function is based on the qMetadata dataframe to look for either missing values (used to update an initial dataset) or imputed values (used when post processing protein qMetadata after aggregation)

In the quantitative columns, a missing value is identified by no value rather than a value equal to 0. Conversion rules Quanti Tag NA or 0 NA

In the quantitative columns, a missing value is identified by no value rather than a value equal to 0. Conversion rules Initial conversion rules for maxquant

|————–|—————–|—–|

Quanti PSM count Tag
== 0 N.A. whatever
> 0 > 0 1.1
> 0 == 0 1.2
> 0 unknown col 1.0
-------------- ----------------- -----

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

Similar to the function is.na but focused on the equality with the paramter 'type'.

Update the quantitative metadata information of missing values that were imputed

Gives all the tags of the metadata vocabulary containing the pattern (parent and all its children).

Agregation rules for the cells quantitative metadata of peptides. Please refer to the qMetadata.def vocabulary in qMetadata.def()

Usage

qMetadata.def(level = "all")

custom_qMetadata_colors()

Set_POV_MEC_tags(conds, df, level)

BuildqMetadata(from = NULL, level, qdata = NULL, conds = NULL, df = NULL)

qMetadata_generic(qdata, conds, level)

qMetadata_proline(qdata, conds, df, level = NULL)

qMetadata_maxquant(qdata, conds, df, level = NULL)

match.qMetadata(df, pattern, level)

## S4 method for signature 'SummarizedExperiment'
UpdateqMetadata(object, from, to, ...)

search.qMetadata.tags(pattern, level, depth = "1")

qMetadata_combine(met, level)

Arguments

level

xxx

conds

xxx

df

A data.frame

from

xxx

qdata

A matrix of quantitative data

pattern

The string to search.

object

xxx

to

xxx

...

xxx

depth

xxx

met

xxx

Value

A data.frame containing the different tags and corresponding colors for the level given in parameter

An instance of class MSnSet.

xxxxx

xxxxx

xxxxx

xxxxx

A boolean dataframe

NA

NA

Glossary

Peptide-level vocabulary

|– 1.0 Quantitative Value | | | |– 1.1 Identified (color 4, white) | | | |– 1.2 Recovered (color 3, lightgrey) | |– 2.0 Missing value (no color) | | | |– 2.1 Missing POV (color 1) | | | |– 2.2 Missing MEC (color 2) | |– 3.0 Imputed value | | | |– 3.1 Imputed POV (color 1) | | | |– 3.2 Imputed MEC (color 2)

Protein-level vocabulary:

|– 1.0 Quantitative Value | | | |– 1.1 Identified (color 4, white) | | | |– 1.2 Recovered (color 3, lightgrey) | |– 2.0 Missing value | | | |– 2.1 Missing POV (color 1) | | | |– 2.2 Missing MEC (color 2) | |– 3.0 Imputed value | | | |– 3.1 Imputed POV (color 1) | | | |– 3.2 Imputed MEC (color 2) | |– 4.0 Combined value (color 3bis, light-lightgrey)

Conversion to the glossary

A generic conversion

Conversion for Proline datasets

Conversion from Maxquant datasets

Basic agreagtion

Agregation of non imputed values (2.X) with quantitative values

(1.0, 1.X, 3.0, 3.X)
Not possible
----------------------------
Agregation of different types of missing values (among 2.1, 2.2)
  • Agregation of 2.1 peptides between each other gives a missing value non imputed (2.0)

  • Agreagtion of 2.2 peptides between each other givesa missing value non imputed (2.0)

  • Agregation of a mix of 2.1 and 2.2 gives a missing value non imputed (2.0) |—————————-

Agregation of a mix of quantitative values (among 1.0, 1.1, 1.2, 3.0, 3.X)
  • if the type of all the peptides to agregate is 1.0, 1.1 or 1.2, then the final metadata is set the this tag

  • if the set of metacell to agregate is a mix of 1.0, 1.1 or 1.2, then the final metadata is set to 1.0

  • if the set of metacell to agregate is a mix of 3.X and 3.0, then the final metadata is set to 3.0

  • if the set of metacell to agregate is a mix of 3.X and 3.0 and other (X.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

Author(s)

Thomas Burger, Samuel Wieczorek

Samuel Wieczorek

Samuel Wieczorek

Samuel Wieczorek

Samuel Wieczorek

Samuel Wieczorek

Samuel Wieczorek

Samuel Wieczorek

Samuel Wieczorek

Examples




#-----------------------------------------------
# A shiny app to view color legends 
#-----------------------------------------------
if(interactive()){
data(ft)
ui <- mod_qMetadataLegend_ui("legend")

server <- function(input, output, session) {
  mod_qMetadataLegend_server('legend',
                                object = reactive({ft[[1]]}))
  }
  
 shinyApp(ui = ui, server = server)
  
  
}
data(ft_na)
df <- assay(ft_na, 2)
level <- typeDataset(ft_na, 1)
df <- Set_POV_MEC_tags(ft_na, 1, level)

file <- system.file("extdata", "Exp1_R25_pept.txt", package="DaparToolshedData")
data <- read.table(file, header=TRUE, sep="\t",stringsAsFactors = FALSE)
metadataFile <- system.file("extdata", "samples_Exp1_R25.txt", 
package="DaparToolshedData")
metadata <- read.table(metadataFile, header=TRUE, sep="\t", as.is=TRUE, 
stringsAsFactors = FALSE)
conds <- metadata$Condition
qdata <- data[,56:61]
df <- data[ , 43:48]
df <- BuildqMetadata('maxquant', 'peptide', qdata, conds, df)
df <- BuildqMetadata('proline', 'peptide', qdata, conds, df)

file <- system.file("extdata", "Exp1_R25_pept.txt", package="DaparToolshedData")
data <- read.table(file, header=TRUE, sep="\t",stringsAsFactors = FALSE)
metadataFile <- system.file("extdata", "samples_Exp1_R25.txt", 
package="DaparToolshedData")
metadata <- read.table(metadataFile, header=TRUE, sep="\t", as.is=TRUE, 
stringsAsFactors = FALSE)
conds <- metadata$Condition
qdata <- data[seq_len(100), seq(56, 61)]
df <- data[seq_len(100) , seq(43,48)]
df <- qMetadata_generic(qdata, conds, 'peptide')

 
file <- system.file("extdata", "Exp1_R25_pept.txt", package="DaparToolshedData")
data <- read.table(file, header=TRUE, sep="\t",stringsAsFactors = FALSE)
metadataFile <- system.file("extdata", "samples_Exp1_R25.txt", 
package="DaparToolshedData")
metadata <- read.table(metadataFile, header=TRUE, sep="\t", as.is=TRUE, 
stringsAsFactors = FALSE)
conds <- metadata$Condition
qdata <- data[seq_len(100), seq(56, 61)]
df <- data[seq_len(100) , seq(43, 48)]
df <- qMetadata_proline(qdata, conds, df, 'peptide')


file <- system.file("extdata", "Exp1_R25_pept.txt", package="DaparToolshedData")
data <- read.table(file, header=TRUE, sep="\t",stringsAsFactors = FALSE)
metadataFile <- system.file("extdata", "samples_Exp1_R25.txt", 
package="DaparToolshedData")
metadata <- read.table(metadataFile, header=TRUE, sep="\t", as.is=TRUE, 
stringsAsFactors = FALSE)
conds <- metadata$Condition
qdata <- data[seq_len(10),seq(56, 61)]
df <- data[seq_len(10) , seq(43, 48)]
df2 <- qMetadata_maxquant(qdata, conds, df, 'peptide')

data(ft)
obj <- ft[[1]]
metadata <- qMetadata(obj)
m <- match.qMetadata(metadata, "missing", 'peptide')


obj <- Exp1_R25_pept[seq_len(10),]
obj[[2]] <- UpdateqMetadata(obj[[2]], 'missing', 'imputed')

search.qMetadata.tags('missing POV', 'peptide')
search.qMetadata.tags('quanti', 'peptide')

## Not run: 
ll <- qMetadata.def('peptide')$node
for (i in 1:length(ll))
test <- lapply(combn(ll, i, simplify = FALSE), 
function(x) tag <- qMetadata_combine(x, 'peptide'))

## End(Not run)


samWieczorek/Dapar2 documentation built on May 13, 2022, 9:23 a.m.