createSpecDF.Rd
Creates an empty data frame to be used for mapping spectral data to a
vector of m/z values. The vector of m/z values is stored in
the first column and can be called by "full_mz
".
createSpecDF(min_mz = 53.76, max_mz = 1100, res = 1e-04, dig = 4)
min_mz | Single numeric value; minimum m/z value of the observed range. Default = 53.76. |
---|---|
max_mz | Single numeric value; upper end of m/z range observed in spectra. Default = 1100. |
res | The resolution of peaks; a single numeric value indicating the step size from the minimum to maximum m/z bin. Also known as bin width. Default = 0.0001. |
dig | Number of decimal places to round the m/z vector to; required for m/z values to match full m/z vector. Default = 4. |
Returns a data frame which can be used to map irregularly spaced spectral data to a set range of m/z values, contained in the first column of the frame.
https://github.com/wesleyburr/subMaldi
Kristen Yeh <kristenyeh@trentu.ca>
## Creating an empty spectrum with an m/z range of 500 to 2000 m/z, with a step size of 0.001 spec_df <- createSpecDF(min_mz = 500, max_mz = 2000, res = 0.001, dig = 3) ## Creating an empty spectrum with an m/z range of 100 to 1000, # with a step size of 0.0001 and sample names spec_df <- createSpecDF(min_mz = 100, max_mz = 1000, res = 0.0001, dig = 4)