createMSnset2: Creates an object of class 'MSnSet' from text file

View source: R/inOutFiles.R

createMSnset2R Documentation

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

createMSnset2(
  file,
  metadata = NULL,
  qdataNames,
  colnameForID = NULL,
  metacellNames = NULL,
  logData = FALSE,
  replaceZeros = FALSE,
  pep_prot_data = NULL,
  proteinId = NULL,
  software = NULL
)

Arguments

file

The name of a tab-separated file that contains the data.

metadata

A dataframe describing the samples (in lines).

qdataNames

A vector of string where each element is the name of a column in designTable that have to be integrated in the Biobase::fData() table of the MSnSet object.

colnameForID

The name of the column containing the ID of entities (peptides or proteins)

metacellNames

xxxxxxxxxxx

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

proteinId

xxxx

software

xxx

Value

An instance of class MSnSet.

Author(s)

Florence Combes, Samuel Wieczorek

Examples

require(Matrix)
exprsFile <- system.file("extdata", "Exp1_R25_pept.txt", 
package = "DAPARdata")
metadataFile <- system.file("extdata", "samples_Exp1_R25.txt",
    package = "DAPARdata"
)
metadata <- read.table(metadataFile, header = TRUE, sep = "\t", 
as.is = TRUE)
indExpData <- seq.int(from=56, to=61)
colnameForID <- "id"
obj <- createMSnset(exprsFile, metadata, indExpData, colnameForID,
    indexForMetacell = seq.int(from=43, to=48), pep_prot_data = "peptide", 
    software = "maxquant"
)


exprsFile <- system.file("extdata", "Exp1_R25_pept.txt", 
package = "DAPARdata")
metadataFile <- system.file("extdata", "samples_Exp1_R25.txt", 
package = "DAPARdata")
metadata <- read.table(metadataFile, header = TRUE, sep = "\t", 
as.is = TRUE)
indExpData <- seq.int(from = 56, to = 61)
colnameForID <- "AutoID"
obj <- createMSnset(exprsFile, metadata, indExpData, colnameForID,
indexForMetacell = seq.int(from = 43, to = 48), 
pep_prot_data = "peptide", software = "maxquant"
)


prostarproteomics/DAPAR documentation built on Nov. 26, 2024, 6:32 p.m.