msarc.loadMS: Create msarc Object From Mass Spec Data

Description Usage Arguments Details Value Author(s) Examples

View source: R/loader.R

Description

Create an msarc object from a mass spectrometry experiment spreadsheet. The spreadsheet must be saved in tab-separated text format.

Usage

1
msarc.loadMS(file, onlyDiff = T, config=list())

Arguments

file

the name of the file to load.

onlyDiff

If the experiment is a SILAC experiment, and onlyDiff is true, only proteins for which both a heavy and a light version was seen will be loaded. If false, all proteins will be included. It is usually best to leave this parameter TRUE.

config

If the user needs to override column headings in the input file, a named list may be used to specify the column headings. See below for details.

Details

The input file will be parsed according to the following rules:

  1. The first line is taken to be column headers.

  2. Lines beginning with white space are skipped. (In the output of the mass spec software this is based on, these lines are the descriptions of the individual peptides identified; we only keep the lines describing the whole proteins.)

  3. Based on the column headers, three columns are retained: the UniProt ID, the gene symbol and the score. The default column heads are "Accession", "Description" and "Score". The "Description" column is scanned for a pattern like "- [XXX_YYYY]"; the "XXX" is interpreted as the gene symbol.

In addition, if the file has a column named "Heavy/Light", it is taken to be a SILAC experiment; rows without a value in this column are discarded unless onlyDiff is FALSE.

Column names may be overridden via the configuration list. The defaults are as above; they may be overridden by setting these names in the config list: "accessionCol", "descriptionCol", "scoreCol", and "heavyCol".

Value

an msarc object corresponding to the file.

Author(s)

Gord Brown

Examples

1
2
3
4
5
6
7
8
# Load a data set from a mass spec experiment
p <- system.file("extdata",package="msarc")
samp_fn <- file.path(p,"sample_msdata.txt.gz")
sample <- msarc.loadMS(samp_fn)

# Load a data set, with a configuration list
samp_fn <- file.path(p,"sample_colnames.txt.gz")
sample <- msarc.loadMS(samp_fn,config=list("accessionCol"="Uniprot_ID"))

msarc documentation built on May 30, 2017, 12:53 a.m.