View source: R/MSnSet2protdata.R
MSnSet2protdata | R Documentation |
Converts an MSnSet
object to a a protdata
object, which can be used for further analysis.
MSnSet2protdata(MSnSet, accession = NULL, annotations = NULL, quant_name = "quant_value", printProgress = FALSE, shiny = FALSE, message = NULL)
MSnSet |
An |
accession |
A character string or numeric index indicating the column in the fData slot of object |
annotations |
A vector of character strings or numeric indices indicating the columns in the fData slot of object |
quant_name |
A character string indicating the name to be given to the column that will contain the quantitative values of interest (mostly peptide intensities or peptide areas under the curve). Defaults to |
printProgress |
A logical indicating whether the R should print a message before converting each accession. Defaults to |
shiny |
A logical indicating whether this function is being used by a Shiny app. Setting this to |
message |
Only used when |
A protdata
object.
#This example will convert MSnSet object peptides into a protdata object proteins. library(MSnbase) colInt <- grepEcols(system.file("extdata/CPTAC", "peptides.txt", package = "MSqRob"), pattern="Intensity.", split = "\t") #Import the data as an MSnSet object peptides <- readMSnSet2(system.file("extdata/CPTAC", "peptides.txt", package = "MSqRob"), ecol = colInt, sep = "\t") fData(peptides) <- fData(peptides)[,c("Proteins","Sequence","PEP")] #Do this only for the first 50 peptide to save execution time proteins <- MSnSet2protdata(peptides[1:50], "Proteins")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.