makeMaster.Rd
This function combines a list of peptide final peptide files into
one single master file that is obtained by merging
the unique peptides from the filtered original peptide files.
Additionally it can combine multiple final fragment files into a fragment
library.
makeMaster(pepfiles, fragmentfiles, fdr = 0.01, method = c("BH", "Bonferroni", "qval"), span.rt = 0.05, span.int = 0.05, maxDeltaRt = Inf, removeNeutralLoss = TRUE, removePrecursor = TRUE, tolerance = 2.5e-05, verbose = interactive())
pepfiles | A |
---|---|
fragmentfiles | A |
fdr | A |
method | A |
span.rt | A |
span.int | A |
maxDeltaRt | A |
removeNeutralLoss | A |
removePrecursor | A |
tolerance | A |
verbose | A |
An instance of class "MasterPeptides"
.
The merging process is as follows:
Each individual peptide final peptide file is filtered to retain
(i) non-duplicated unique tryptic peptides, (ii) peptides with a
false discovery rate <= fdr
and (iii) proteins with a false
positive rate <= fpr
.
The filtered peptide files are ordered (1) according to their total number of peptides (for example [P1, P2, P3]) and (2) as before with the first item is positioned last ([P2, P3, P1] in the previous example). The peptide data are then combined in pairs in these respective orders. The first one is called the master file.
For each (master, slave) pair, the slave peptide file retention times are modelled according to the (original) master's retention times and slave peptides, not yet present in the master file are added to the master file.
The final master datasets, containing their own peptides and
the respective slave specific retention time adjusted peptides are returned
as a MasterPeptides
instance.
The resulting MasterPeptides
instance can be further used
for a complete master vs. peptides/Pep3D analysis, as described in
Synapter
, synergise
or using the GUI
(synapterGUI
). To do so, it must be serialised (using the
saveRDS
function) with a .rds
file
extension, to be recognised (and loaded) as a R
object.
When several quantitation (or identification) files are combined as a master set to be mapped back against the inidividual final peptide files, the second master [P2, P3, P1] is used when analysing the peptide data that was first selected in the master generation (P1 above). This is to avoid aligning two identical sets of peptides (those of P1) and thus not being able to generate a valid retention time model. This is detected automatically for the user.
The two master peptides dataframes can be exported to disk as
two csv
files with writeMasterPeptides
. The
MasterPeptides
object returned by makeMaster
can be
saved to disk (with save
or saveRDS
) and later reloaded
(with load
or readRDS
) for further analysis.
The fragment library generation works as follows:
Each individual final fragment file is imported and only peptides present in the master dataset are used.
The fragments are combined based on their precursor ions.
The intensities of identical fragments (seen in different runs) is summed and divided by the summed precursor intensity (of the same peptide in different runs).
Afterwards the intensities are normalized to the average precursor intensity of the different runs.
Finally a MSnExp
object is created.
The fragment library dataframe can be exported to disk as
csv
file with writeFragmentLibrary
.
Shliaha P.V., Bond N. J., Lilley K.S. and Gatto L., in prep.
See the Synapter
class manual page for
detailed information on filtering and modelling and the general
algorithm implemented in the synapter
package.
The estimateMasterFdr
function allows to control
false dicovery rate when combining several peptide files while
maximising the number of identifications and suggest which
combination of peptide files to use.
The vignette, accessible with synapterGuide()
illustrates a complete pipeline using estimateMasterFdr
and
makeMaster
.