Description Usage Arguments Value Examples
View source: R/purityX-constructor.R
Constructor for the purityX class.
Given an XCMS object get the anticipated precursor purity of the grouped peaks
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
xset |
object; xcms object |
purityType |
character; Area and average used for the purity predictions. Options are "purityFWHMmedian", "purityFWmedian", "purityFWHMmean", "purityFWmean" |
offsets |
vector; vector of the isolation window upper and lower offsets |
fileignore |
vector; vector of files to ignore for the prediction calculation |
cores |
numeric; number of cores to use |
xgroups |
vector; vector of xcms groups to perform prediction on |
iwNorm |
boolean; if TRUE then the intensity of the isolation window will be normalised based on the iwNormFun function |
iwNormFun |
function; A function to normalise the isolation window intensity. The default function is very generalised and just accounts for edge effects |
ilim |
numeric; All peaks less than this percentage of the target peak will be removed from the purity calculation, default is 5% (0.05) |
plotP |
boolean; TRUE if plot of the EIC of feature and associated contamination is the be save to the working directory |
mzRback |
character; backend to use for mzR parsing |
isotopes |
boolean; TRUE if isotopes are to be removed |
im |
matrix; Isotope matrix, default removes C13 isotopes (single, double and triple bonds) |
singleFile |
numeric; If just a single file for purity is to be calculated (rather than the grouped XCMS peaks). Uses the index of the files in xcmsSet object. If zero this is ignored. |
rtrawColumns |
boolean; TRUE if the rt_raw values are included as additional columns in the @peaks slot (only required if using the obiwarp) |
saveEIC |
boolean; If True extracted ion chromatograms will be saved to SQLite database |
sqlitePth |
character; If saveEIC True, then a path to sqlite database can be used. If NULL then a database will be created in the working directory called eics |
a purityX object containing a dataframe of predicted purity scores
1 2 3 4 5 6 7 8 | msPths <- list.files(system.file("extdata", "lcms", "mzML",
package="msPurityData"), full.names = TRUE,
pattern = "LCMS_")
xset <- xcms::xcmsSet(msPths)
xset <- xcms::group(xset)
xset <- xcms::retcor(xset)
xset <- xcms::group(xset)
ppLCMS <- purityX(xset, cores = 1, xgroups = c(1, 2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.