msgfAsync-class: A class referencing an asynchronous execution of MS-GF+

Description Usage Arguments Value Methods (by generic) Slots Examples

Description

Objects of this class contains a reference to an asynchronous running MS-GF+ process and can be used to query the state of the process, and import the results if the process has finished. Instances of this class are created when the runMSGF() method is called with async=TRUE on an msgfPar object.

Unlike regular runMSGF() calls, this does not support batch mode, meaning that if a more than one raw file is supplied, all but the first are ignored with a warning.

In order to insulate instances of this class from being corrupted (thus loosing the reference to the process), all slots are functions and should be queried as such if needed.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
running(object)

finished(object)

import(object)

## S4 method for signature 'msgfAsync'
running(object)

## S4 method for signature 'msgfAsync'
finished(object)

## S4 method for signature 'msgfAsync'
import(object)

Arguments

object

An msgfAsync object

Value

running(object) Returns a logical indicating if the process is running

finished(object) Returns a logical indicating if the process is finished

import(object) Returns an mzID object or NULL if the process is still running. Throws an error if the process is finished but the result file doesn't exist.

Methods (by generic)

Slots

status

Returns the status of the MS-GF+ process; either 'Running' or 'Done'.

resultFile

Returns the location of the result file from the MS-GF+ analysis. WARNING: Checking for the existence of this file is not a safe way to determine the status of the process, as the file gets written to continuously.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
parameters <- msgfPar(
                      database=system.file(package='MSGFplus', 'extdata', 'milk-proteins.fasta'),
                      tolerance='20 ppm',
                      instrument='TOF',
                      enzyme='Lys-C'
                     )
asyncMSGF <- runMSGF(parameters, 'file1.mzML', async=TRUE)
while(!running(asyncMSGF)){
    Sys.sleep(1)
}
results <- import(asyncMSGF)

## End(Not run)

thomasp85/MSGFplus-release documentation built on May 31, 2019, 11:09 a.m.