Description Usage Arguments Details Value Author(s) Examples
Functions to construct, read, write and filter so-called msp objects, collections of spectra with additional information. This other information is of free format, but typically contains fields like “Name”, “CAS”, “ChemspiderID”, and “rt”.
1 2 3 4 5 6 7 8 9 10 | construct.msp(spectra, extra.info)
read.msp(file, only.org = FALSE,
org.set = c("C", "H", "D", "N", "O", "P", "S"), noNumbers = NULL)
filter.msp(msp, rtrange = NULL, mzrange = NULL, minintens = 0, minPeaks = 0)
write.msp(msp, file, newFile = TRUE)
xset2msp(xsetList, settings)
to.msp(object, file = NULL, settings = NULL, ndigit = 0,
minfeat, minintens, intensity = c("maxo", "into"),
secs2mins = TRUE)
SearchNIST(mspfile=NULL, savepath=NULL)
|
spectra |
a list of two-column or three-column numerical matrices. Two-column matrices only contain mz and intensity information, three-column matrices have a third column that gives retention times for the individual peaks. |
extra.info |
a nested list containing all other slots that should be included in the msp object. The length of this list should be equal to the number of spectra in the first argument. |
file |
name of input or output file containing data in msp
format. If NULL in function |
only.org |
logical: if TRUE this will skip all entries that have non-organical elements in the “Formula” field. |
org.set |
List of elements to be considered as organic. |
noNumbers |
Optional argument, indicating which fields are not to
be converted into numeric entries. If not given, this currently
defaults to the following fields: |
msp |
msp object. |
rtrange, mzrange, minfeat, minintens, minPeaks |
restrictions to what constitutes genuine pseudospectra in terms of minimal numbers of features, minimum feature intensity, and the intensity measure used (peak area or peak height). |
intensity |
the measure to use for the intensity of a peak: either the peak height ("maxo") or area ("into"). |
ndigit |
number of digits for the mz values - use 0 for nominal mass data. |
newFile |
logical: if TRUE starts a new file, otherwise appends. |
xsetList |
a list of xcmsSet objects. |
settings |
list containing settings. |
object |
either an object of class "xsAnnotate" or a peaktable
containing mz, rt and I information. Function |
secs2mins |
logical: if TRUE converts retention times to minutes (otherwise seconds). |
mspfile |
a msp file generated by |
savepath |
Path to the directory were NIST MSsearch program results will be saved |
Even though the msp format handled by these functions is quite flexible, there are a couple of requirements that are not always satisfied by msp files generated by other software, the most important one being that one line may only contain one keyword. If more than one keyword is present, the second will likely not be read. Furthermore, the current implementation assumes that peaks in pseudospectra are represented in the form mz1, I1; mz2, I2;, etcetera - in other cases these are in brackets. To solve such issues, the most easy fix for the moment is to edit the msp file and change things globally.
Other issues may arise with the keywords. While read.msp will be able to read msp files with non-standard keywords, the metaMS package expects at least the following list to be present (case-sensitive): “Name”, “validated”, “CAS”, “rt”, “monoMW”, and “Class”. The final keyword is always “Num Peaks”, and should be followed by the list of mz-I combinations.
Most of the functions here create msp files.
Ron Wehrens
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.