Skip to contents

The results of DBAS file scanning (`dbasResult`) are converted to the NTSPortal `featureRecord` format. Compound and sample metadata are collected from the `msrawfileRecords` argument and the spectral library (CSL).

The results of NTS file scanning (`ntsResult`) are converted to the NTSPortal `featureRecord` format. Annotated features (matching a substance in the spectral library) are removed.

Usage

convertToRecord(scanResult, msrawfilesBatch)

# S3 method for class 'dbasResult'
convertToRecord(scanResult, msrawfilesBatch)

# S3 method for class 'ntsResult'
convertToRecord(scanResult, msrawfilesBatch = NA)

Arguments

scanResult

results of a file scanning algorithm (e.g. dbasResult, ntsResult)

msrawfilesBatch

msrawfilesBatch used to create the scanResult

Value

a `list` of `featureRecord`s

Details

This method does not use `msrawfilesBatch` but it needs to be in the method definition for polymorphism, e.g. in `screeningOneBatch()`.

Examples

if (FALSE) { # \dontrun{
dbComm <- getDbComm()
recs <- getTableAsRecords(
  dbComm, 
  "ntsp25.3_msrawfiles", 
  searchBlock = list(query = list(regexp = list(filename = "Des_.._.._pos.mzXML"))), 
  newDbasMsrawfilesRecord
)
recsBlanks <- getTableAsRecords(
  dbComm, 
  "ntsp25.3_msrawfiles", 
  searchBlock = list(query = list(regexp = list(path = ".*mud_pos/BW.*"))), 
  newDbasMsrawfilesRecord
)
dbasBatch <- recordsToOneBatch(c(recs, recsBlanks))
dbasRes <- scanBatch(dbasBatch, "Methyltriphenylphosphonium")
featureRecs <- convertToRecord(dbasRes, dbasBatch)
} # }
if (FALSE) { # \dontrun{
  testMsrawfilesRecords <- getRecordsSampleAndBlank()
  testNtsResults <- scanBatch(testMsrawfilesRecords)
  features <- convertToRecord(testNtsResults)  
} # }