getAnalyticalInfo: Compose data block of MassBank record

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/buildRecord.R

Description

gatherCompound composes the data blocks (the "lower half") of all MassBank records for a compound, using the annotation data in the RMassBank options, spectrum info data from the analyzedSpec-type record and the peaks from the reanalyzed, multiplicity-filtered peak table. It calls gatherSpectrum for each child spectrum.

Usage

1
2
3
4
gatherCompound(spec, aggregated, additionalPeaks = NULL, retrieval="standard")

		gatherSpectrum(spec, msmsdata, ac_ms, ac_lc, aggregated, 
 		additionalPeaks = NULL, retrieval="standard")

Arguments

spec

A RmbSpectraSet object, representing a compound with multiple spectra.

aggregated

An aggregate peak table where the peaks are extracted from.

msmsdata

A RmbSpectrum2 object from the spec spectra set, representing a single spectrum to give a record.

ac_ms, ac_lc

Information for the AC\$MASS_SPECTROMETRY and AC\$CHROMATOGRAPHY fields in the MassBank record, created by gatherCompound and then fed into gatherSpectrum.

additionalPeaks

If present, a table with additional peaks to add into the spectra. As loaded with addPeaks.

retrieval

A value that determines whether the files should be handled either as "standard", if the compoundlist is complete, "tentative", if at least a formula is present or "unknown" if the only know thing is the m/z

Details

The returned data blocks are in format list( "AC\$MASS_SPECTROMETRY" = list('FRAGMENTATION_MODE' = 'CID', ...), ...) etc.

Value

gatherCompound returns a list of tree-like MassBank data blocks. gatherSpectrum returns one single MassBank data block or NA if no useful peak is in the spectrum.

Note

Note that the global table additionalPeaks is also used as an additional source of peaks.

Author(s)

Michael Stravs

References

MassBank record format: http://www.massbank.jp/manuals/MassBankRecord_en.pdf

See Also

mbWorkflow, compileRecord

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
     myspectrum <- w@spectra[[1]]
		massbankdata <- gatherCompound(myspectrum, w@aggregated)
		# Note: ac_lc and ac_ms are data blocks usually generated in gatherCompound and
		# passed on from there. The call below gives a relatively useless result :)
		ac_lc_dummy <- list()
		ac_ms_dummy <- list() 
		justOneSpectrum <- gatherSpectrum(myspectrum, myspectrum@child[[2]],
			ac_ms_dummy, ac_lc_dummy, w@aggregated)

## End(Not run)

sneumann/RMassBank documentation built on Oct. 20, 2020, 3:19 p.m.