MsConnections-class: A class to handle MS I/O

Description Details Fields Methods See Also

Description

This class takes care of the communication with the sary database and the raw datafile. Its main responsibility is to ensure a stable connection across sessions without causing the session to crash (This would normally happen if an mzRramp object was accessed in a different session than the one it is created in). It relies on knowledge of the location of the raw and database files and will throw an error if these files are moved.

Details

TODO: Schema for updating file location vs. creating a new object (which is cheap). Decide whether this class also should handle writing to the sary db.

Fields

rawFile

The path to the location of the MS raw data file

ramp

Object of class mzRramp. A connection to the MS raw data file

saryFile

The path to the location of the sary database file

saryDB

An SQLiteConnection object. A connection to the sary database

Methods

addData(name, data)

Adds data to an already created table. 'name' specifies the name of the table, 'data' is a data.frame containing the data to be added.

addTable(name, definition, rtree = FALSE)

Creates the table 'name' with the columns defined in 'definition'. The definition can be a character vector that will be concatenated with ', '.

getPeaks(ids)

Extract peaks from database

getScans(ids, raw = FALSE)

Transparently extract scans, getting modified scans if they exists or read from the raw file if they don't

mzR()

Get the mzRramp connection in a safe manner

removeScans(ids, value = TRUE)

Remove scans from the set

resetScans(ids)

Reset the state of scans back to its original value

sary()

Get the sary database connection in a safe manner

setData(name, data, key)

Insert or update data depending on the existence of key

setScans(ids, scans)

Set scans to new values

updateData(name, data, key)

Updates column in already existing data

validate(subset = 10)

Checks that the header data matches between raw and sary

verify()

Verify that the default tables are present and their structure conforms

See Also

MsData


thomasp85/MSsary documentation built on May 31, 2019, 11:11 a.m.