I would like to use the msmsTests package for differential expression analysis of proteins (spectral counts); however, the vignette only covers working with a MSnSet class and not how to get your data into that class.
While the pRoloc vignette does mention how to convert csv files to the R data class MSnSet using the readMSnSet constructor function (section 2.2.2) the problem is when trying to follow either the msmsTests or RforProteomics vignettes they use a different type of MSnSet object which produces different results, for example:
pRoloc creation of MSnSet:
f1 <- dir(system.file("extdata", package = "pRolocdata"),
full.names = TRUE, pattern = "exprsFile.csv")
f2 <- dir(system.file("extdata", package = "pRolocdata"),
full.names = TRUE, pattern = "fdataFile.csv")
f3 <- dir(system.file("extdata", package = "pRolocdata"),
full.names = TRUE, pattern = "pdataFile.csv")
tan2009r1 <- readMSnSet(exprsFile = f1,
featureDataFile = f2,
phenoDataFile = f3,
sep = ",")
pData(tan2009r1)
RforProteomics creation of MSnSet:
library("msmsEDA")
library("msmsTests")
data(msms.dataset)
## Pre-process expression matrix
e <- pp.msms.data(msms.dataset)
pData(e)
As you can tell the pData() result is different for both of these. It would be nice if I could figure out how to convert the msms.dataset (MSnSet class) to something I can investigate to see how these objects differ - they won't let you investigate using head() or tail(). If I could see what it looks like I could figure out how to convert my data into this class for use in differential analysis and visualization.

Hello and thank you for trying to help me Laurent.
I'll put this into two comments for clarity.
One thing I wanted to know was how to actually inspect the sample data provided in the pRoloc data set. I'll use hyperLOPIT-SIData-ms3-rep12-intersect.csv since this is what you showed above.
I figured out how to inspect it by doing the following:
Then you can simply read that location in via
read.csv()as a data.frame and inspect what it looks like withhead(),tail(),str() etc.>csv <- read.csv("C:/Users/moldach/Documents/R/win-library/3.4/pRolocdata/extdata/hyperLOPIT-SIData-ms3-rep12-intersect.csv.gz") >head(csv,n=2) UniProt.Accession.for.Protein.Group UniProt.ID.for.Protein.Group 1 2 Q9JHU4 DYHC1_MOUSE UniProt.Protein.Description Quantified.Peptides X 1 Experiment 1 Experiment 2 2 Cytoplasmic dynein 1 heavy chain 1 OS=Mus musculus GN=Dync1h1 PE=1 SV=2 - [DYHC1_MOUSE] 175 166 Quantified.PSMs..Rep.1. X.1 Normalized.TMT.10.plex.reporter.ion.distribution..Replicate.1. X.2 X.3 X.4 X.5 X.6 1 Experiment 1 Experiment 2 126.000 127N 127C 128N 128C 129N 2 322 273 0.028 0.034 0.024 0.014 0.026 0.045 X.7 X.8 X.9 X.10 Normalized.TMT.10.plex.reporter.ion.distribution..Replicate.2. X.11 X.12 X.13 X.14 X.15 X.16 X.17 1 129C 130N 130C 131.000 126.000 127N 127C 128N 128C 129N 129C 130N 2 0.107 0.341 0.059 0.321 0.037 0.064 0.058 0.059 0.067 0.078 0.140 0.208 X.18 X.19 Phenotype.discovery.and.SVM.classification.of.protein.localization X.20 X.21 1 130C 131.000 phenoDisco Input phenoDisco Output Curated phenoDisco Output 2 0.141 0.147 unknown unknown unknown X.22 X.23 X.24 X.25 X.26 1 SVM marker set SVM classification SVM score SVM classification (top quartile) Final Localization Assignment 2 unknown Peroxisome 0.303 unclassified unclassified X.27 Subcellular.Curation X.28 X.29 X.30 1 First localization evidence? Curated Organelles Cytoskeletal Components Trafficking Proteins Protein Complexes 2 N Dynein Dynein X.31 X.32 X.33 X.34 X.35 1 Signaling Cascades Oct4 Interactome Nanog Interactome Sox2 Interactome Cell Surface Proteins 2What may not be clear to future people visiting this page is that when you did
8:27 are referring to the columns of NSAF (normalized) spectral counts.
Okay now that's clear to me let's move to the second part of the issue as this example you provided does not work with the msmsTests package (see comment below).
Just one clarification to avoid confusion to other readers - the protein expression data (in columns 8 to 27) aren't NSAF but TMT 10-plex data.