getMBPeaksAnnos: Retrieve a Merged Peak List with Annotations from a MassBank...

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

View source: R/MassBankRecordeR.R

Description

This function extracts the PK$PEAK and PK$ANNOTATION entries from a MassBank record, returning a merged data frame containing the corresponding entries. This uses the getMBRecordPeakAnnotations and getMBRecordPeaks functions.

Usage

1
getMBPeaksAnnos(MBrecord, fixColNames=FALSE)

Arguments

MBrecord

File name (and path) to a valid MassBank record file.

fixColNames

Default FALSE uses the column names in the MassBank record, i.e. m/z, int. and rel.int.. Use TRUE to make this more R-friendly. The function fixMzIntColNames is used to do this. NOTE: if TRUE, this is only performed after merging to ensure the merge works.

Details

NOTE: for this to work properly, the m/z column names must match exactly. This has only been verified so far on records generated with RMassBank.

Value

Returns a data frame containing annotated peaks, or NULL if the retrieval failed.

Author(s)

Emma Schymanski <emma.schymanski@uni.lu>

See Also

getMBRecordPeakAnnotations, getMBRecordPeaks, fixMzIntColNames.

Examples

1
2
3
MBrecord <- system.file("extdata","EA020161_Diclofenac.txt",package="ReSOLUTION")
getMBPeaksAnnos(MBrecord)
getMBPeaksAnnos(MBrecord, fixColNames=TRUE)

schymane/ReSOLUTION documentation built on May 22, 2021, 3:41 a.m.