Peptide level identification and quantification data produced by MaxQuant can be read using this function and relevant information extracted. Input files compressed as .gz can be read as well. The peptide abundance values (XIC), peptide counting information and sample-annotation (if available) can be extracted, too.
readMaxQuantPeptides(
path,
fileName = "peptides.txt",
normalizeMeth = "median",
quantCol = "Intensity",
contamCol = "Potential.contaminant",
pepCountCol = "Experiment",
refLi = NULL,
sampleNames = NULL,
extrColNames = c("Sequence", "Proteins", "Leading.razor.protein", "Start.position",
"End.position", "Mass", "Missed.cleavages", "Unique..Groups.", "Unique..Proteins.",
"Charges"),
specPref = c(conta = "conta|CON_|LYSC_CHICK", mainSpecies = "HUMAN"),
remRev = TRUE,
remConta = FALSE,
separateAnnot = TRUE,
gr = NULL,
sdrf = NULL,
suplAnnotFile = NULL,
groupPref = list(lowNumberOfGroups = TRUE, chUnit = TRUE),
titGraph = NULL,
wex = 1.6,
plotGraph = TRUE,
silent = FALSE,
debug = FALSE,
callFrom = NULL
)
This function returns a list with $raw
(initial/raw abundance values), $quant
with final normalized quantitations, $annot
(columns ), $counts
an array with 'PSM' and 'NoOfRazorPeptides',
$quantNotes
, $notes
and optional setup
for meta-data from sdrf
; or a data.frame with quantitation and annotation if separateAnnot=FALSE
(character) path of file to be read
(character) name of file to be read (default 'peptides.txt' as typically generated by MaxQuant in txt folder). Gz-compressed files can be read, too.
(character) normalization method (for details see normalizeThis
)
(character or integer) exact col-names, or if length=1 content of quantCol
will be used as pattern to search among column-names for $quant using grep
(character or integer, length=1) which columns should be used for contaminants
(character) pattern to search among column-names for count data (defaults to 'Experiment')
(character or integer) custom specify which line of data should be used for normalization, ie which line is main species; if character (eg 'mainSpe'), the column 'SpecType' in $annot will be searched for exact match of the (single) term given
(character) custom column-names for quantification data; this argument has priority over suplAnnotFile
(character) column names to be read (1st position: prefix for quantitation, default 'intensity'; 2nd: column name for peptide-IDs, default )
(character) prefix to identifiers allowing to separate i) recognize contamination database, ii) species of main identifications and iii) spike-in species
(logical) option to remove all peptide-identifications based on reverse-peptides
(logical) option to remove all peptides identified as contaminants
(logical) if TRUE
output will be organized as list with $annot
, $abund
for initial/raw abundance values and $quant
with final normalized quantitations
(character or factor) custom defined pattern of replicate association, will override final grouping of
replicates from sdrf
and/or suplAnnotFile
(if provided)
(character, list or data.frame) optional extraction and adding of experimenal meta-data: if character, this may be the ID at ProteomeExchange,
the second & third elements may give futher indicatations for automatic organization of groups of replicates.
Besides, the output from readSdrf
or a list from defineSamples
may be provided;
if gr
is provided, gr
gets priority for grouping of replicates;
if sdrfOrder=TRUE
the output will be put in order of sdrf
(logical or character) optional reading of supplemental files produced by MaxQuant; if gr
is provided, it gets priority for grouping of replicates
if TRUE
default to files 'summary.txt' (needed to match information of sdrf
) and 'parameters.txt' which can be found in the same folder as the main quantitation results;
if character
the respective file-names (relative ro absolute path), 1st is expected to correspond to 'summary.txt' (tabulated text, the samples as given to MaxQuant) and 2nd to 'parameters.txt' (tabulated text, all parameters given to MaxQuant)
(list) additional parameters for interpreting meta-data to identify structure of groups (replicates), will be passed to readSampleMetaData
.
May contain lowNumberOfGroups=FALSE
for automatically choosing a rather elevated number of groups if possible (defaults to low number of groups, ie higher number of samples per group)
May contain chUnit
(logical or character) to be passed to readSampleMetaData()
for (optional) adjustig of unit-prefixes in meta-data group labels, in case multiple different unit-prefixes
are used (eg '100pMol' and '1nMol').
(character) custom title to plot
(numeric) relative expansion factor of the violin in plot
(logical) optional plot vioplot of initial and normalized data (using normalizeMeth
); alternatively the argument may contain numeric details that will be passed to layout
when plotting
(logical) suppress messages
(logical) additional messages for debugging
(character) allows easier tracking of messages produced
The peptide annotation data gets parsed to extract specific fields (ID, name, description, species ...). Besides, a graphical display of the distribution of peptide abundance values may be generated before and after normalization.
MaxQuant is proteomics quantification software provided by the MaxPlanck institute.
By default MaxQuant write the results of each run to the path combined/txt
, from there (only) the files
'peptides.txt' (main quantitation at peptide level), 'summary.txt' and 'parameters.txt' will be used for this function.
Meta-data describing the samples and experimental setup may be available from two sources :
a) The file summary.txt
which gets produced by MaxQuant in the same folder as the main quantification data.
b) Furthermore, meta-data deposited as sdrf
at Pride can be retreived (via the respective github page) when giving
the accession number in argument sdrf
.
Then, the meta-data will be examined for determining groups of replicates and
the results thereof can be found in $sampleSetup$levels.
Alternatively, a dataframe formatted like sdrf-files (ie for each sample a separate line, see also function readSdrf
) may be given.
In tricky cases it is also possible to precise the column-name to use for defining the groups of replicates or the method for automatically choosing
the most suited column via the 2nd value of the argument sdrf
, see also the function defineSamples
(which gets used internally).
Please note, that sdrf is still experimental and only a small fraction of proteomics-data on Pride have been annotated accordingly.
If a valid sdrf is furnished, it's information has priority over the information extracted from the MaxQuant produced file summary.txt.
This function has been developed using MaxQuant versions 1.6.10.x to 2.0.x, the format of the resulting file 'peptides.txt'
is typically well conserved between versions.
The final output is a list containing these elements: $raw
, $quant
, $annot
, $counts
, $sampleSetup
,
$quantNotes
, $notes
, or (if separateAnnot=FALSE
) data.frame
with annotation- and main quantification-content. If sdrf
information has been found, an add-tional list-element setup
will be added containg the entire meta-data as setup$meta
and the suggested organization as setup$lev
.
read.table
, normalizeThis
), for reading protein level readMaxQuantFile
, readProlineFile
# Here we'll load a short/trimmed example file (thus not the MaxQuant default name)
MQpepFi1 <- "peptides_tinyMQ.txt.gz"
path1 <- system.file("extdata", package="wrProteo")
specPref1 <- c(conta="conta|CON_|LYSC_CHICK", mainSpecies="YEAST", spec2="HUMAN")
dataMQpep <- readMaxQuantPeptides(path1, file=MQpepFi1, specPref=specPref1,
tit="Tiny MaxQuant Peptides")
summary(dataMQpep$quant)
Run the code above in your browser using DataLab