Description Usage Arguments Value Warning Author(s) References See Also Examples
Fills in the columns of the empty data frame created using
createSpecDF
. Mass to charge values from pairwise spectral data are
compared to the full_mz
vector. All peaks within the thresh
of one another are binned, and only the maximum intensity of that bin is
filled into the mapped spectrum.
1 2 3 4 5 6 7 8 9 | mapSpectrum(
dat,
massCol,
intenseCol,
dig = 4,
thresh = 1e-04,
spec_df,
colName
)
|
dat |
A pairwise data frame containing your spectral data. Should contain two columns: one for m/z and one for intensity. |
massCol |
A character string; the name of the m/z column in
|
intenseCol |
A character string; the name of the intensity column in
|
dig |
Number of decimal places to round the m/z data to; must
match the same value used in |
thresh |
Single numeric value; all m/z values within
|
spec_df |
An empty data frame created using |
colName |
A character string; the name of the column that should be filled with the spectral data. |
Returns a vector that is used to fill in the colName
column
of the mapped spectral data frame.
It is important that the values for thresh
and
dig
are equal to that of res
and dig
used in
createSpecDF()
. Otherwise the data will fail to map.
Kristen Yeh <kristenyeh@trentu.ca> Wesley Burr <wesleyburr@trentu.ca>
https://github.com/wesleyburr/subMaldi
1 2 3 4 5 6 7 8 9 | ## Load sample dataset "Blank1.rda"
data("lank1")
## Create empty spectral data frame to map to
spec_df <- createSpecDF(min_mz = 53.76, max_mz = 1100, res = 0.0001, dig = 4)
## Map binary spectral data to empty spectral data frame
spec_df <- mapSpectrum(dat = Blank1, massCol = "mass", intenseCol = "Intensity",
spec_df = spec_df, colName = "Sample", thresh = 1e-04, dig = 4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.