Learn R Programming

DAPAR (version 1.4.7)

createMSnset: Creates an object of class MSnSet from text file

Description

Builds an object of class MSnSet from a single tabulated-like file for quantitative and meta-data and a dataframe for the samples description. It differs from the original MSnSet builder which requires three separated files tabulated-like quantitative proteomic data into a MSnSet object, including metadata.

Usage

createMSnset(file, metadata = NULL, indExpData, indFData, indiceID = NULL, logData = FALSE, replaceZeros = FALSE, pep_prot_data = NULL)

Arguments

file
The name of a tab-separated file that contains the data.
metadata
A dataframe describing the samples (in lines).
indExpData
A vector of string where each element is the name of a column in designTable that have to be integrated in the fData() table of the MSnSet object.
indFData
The name of column in file that will be the name of rows for the exprs() and fData() tables
indiceID
The indice of the column containing the ID of entities (peptides or proteins)
logData
A boolean value to indicate if the data have to be log-transformed (Default is FALSE)
replaceZeros
A boolean value to indicate if the 0 and NaN values of intensity have to be replaced by NA (Default is FALSE)
pep_prot_data
A string that indicates whether the dataset is about peptides or proteins.

Value

An instance of class MSnSet.

Examples

Run this code
exprsFile <- system.file("extdata", "UPSpep25.txt", package="DAPAR")
metadataFile <- system.file("extdata", "samples.txt", package="DAPAR")
metadata = read.table(metadataFile, header=TRUE, sep="\t", as.is=TRUE)
indExpData <- c(56:61)
indFData <- c(1:55,62:71)
indiceID <- 64
createMSnset(exprsFile, metadata,indExpData,  indFData, indiceID,
pep_prot_data = "peptide")

Run the code above in your browser using DataLab