I'm using MS/MS for label-free quantification in metaproteomics. I've run the database searching (MSGF+) with mzML files, and the output is .mzid files. Then, I've used the MSnID and mzid R packages to calculate/optimize False Discovery Rate cutoffs, and applied these cutoffs. I'm confused about where MSnbase (Gatto and Lilley, 2012; Bioinformatics) comes into play here. I know that there are a large amount of tools available for analyzing and processing MS data in MSnbase.

So, what is the recommended workflow for quantification and applying an optimized FDR? In the MSnbase documentation (which is great!), it uses an mzML input file for the 'quantify()' function (under 'Label Free MS2 Quantitation/Peptide Counting'). So does this mzML not have an optimized FDR applied to it? Any advice for the next steps of quantification is greatly appreciated! Thanks!

If you want to do spectral counting, you can proceed from an MSnID workflow to MSnbase by converting your MSnID objects to MSnSet data using the as method, as documented at the end of the MSnID vignette. You could then combine multiple MSnSet data object (for different samples) using the combine method (as documented in the main MSnbase vignette) and then do a test using these count data using the function from the msmsTests package. This will control your FDR for identification (via MSnID) and at the differential expression level (via msmsTests).

Alternatively, you can read your raw data in using MSnbase::readMSData and MSnbase::addIdentificationData and apply filtering using the information from MSnID, and then quantify your data as documented in Label Free MS2 Quantitation/Peptide Counting as you point out. Depending on the MS quantitation method you use, you can either use msmsTests (if you have count data) or another method for continuous data - limma is probably a good route.