exportMassbank: Export internally stored MassBank data to files

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

View source: R/createMassBank.R

Description

Exports MassBank recfile data arrays and corresponding molfiles to physical files on hard disk, for one compound.

Usage

1
exportMassbank(compiled, files, molfile)

Arguments

compiled

Is ONE "compiled" entry, i.e. ONE compound with e.g. 14 spectra, as returned from compileRecord.

molfile

A molfile from createMolfile

files

A n-membered array (usually a return value from lapply(toMassbank)), i.e. contains n plain-text arrays with MassBank records.

Details

The data from compiled is still used here, because it contains the "visible" accession number. In the plain-text format contained in files, the accession number is not "accessible" anymore since it's in the file.

Value

No return value.

Note

An improvement would be to write the accession numbers into names(compiled) and later into names(files) so compiled wouldn't be needed here anymore. (The compound ID would have to go into names(molfile), since it is also retrieved from compiled.)

Author(s)

Michael Stravs

References

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

See Also

createMolfile, compileRecord, toMassbank, mbWorkflow

Examples

1
2
3
4
5
6
7
## Not run: 
		compiled <- compileRecord(record, mbdata, refilteredRcSpecs)
		mbfiles <- toMassbank(compiled)
		molfile <- createMolfile(compiled[[1]][["CH$SMILES"]])
		exportMassbank(compiled, mbfiles, molfile)

## End(Not run)

RMassBank documentation built on Nov. 8, 2020, 6:06 p.m.