Learn R Programming

MSGFplus (version 1.6.2)

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

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

running(object)
finished(object)
import(object)
"running"(object)
"finished"(object)
"import"(object)

Arguments

object
An msgfAsync object

Value

running(object) Returns a logical indicating if the process is runningfinished(object) Returns a logical indicating if the process is finishedimport(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)

  • running: Check whether the MS-GF+ process is still running
  • finished: Check whether the MS-GF+ process is finished
  • import: Import the result of the asynchronous MS-GF+ process

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

Run this code
## 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)

Run the code above in your browser using DataLab