Convert the result of file scanning to a list of feature records Compound and sample metadata, including spectra are collected from the `scanResult`, from the linked raw measurement files, or from `msrawfileRecords`
convertToRecord.RdThe 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)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)
} # }