Question: Using massifquant for peak detection of generic matrix data?
0
gravatar for james.dalgleish
12 months ago by
james.dalgleish30 wrote:

Is it possible to use massifquant for peak detection of non-MS data, but rather just finding traces that might look like MS peaks in a large matrix (150000x150000), for instance?

xcms kalman centwave yamss • 261 views
ADD COMMENTlink modified 12 months ago • written 12 months ago by james.dalgleish30
Answer: Using massifquant for peak detection of generic matrix data?
1
gravatar for Johannes Rainer
12 months ago by
Johannes Rainer1.4k
Italy
Johannes Rainer1.4k wrote:

The peak detection algorithms in xcms perform peak detection in retention time domain, i.e. in one dimension of the 2D matrix - with a lot of assumptions on peak shape, scattering of values in one dimension etc.

I would have a look at the yamss package instead. AFAIK, yamss uses a two-dimensional kernel to find peaks in 2D space.

cheers, jo

ADD COMMENTlink written 12 months ago by Johannes Rainer1.4k

Can you provide an example of how that would work? creating a new CMSraw object from a datatable is not straightforward.

ADD REPLYlink written 12 months ago by james.dalgleish30

I haven't tried that yet, sorry.

ADD REPLYlink written 12 months ago by Johannes Rainer1.4k
Answer: Using massifquant for peak detection of generic matrix data?
1
gravatar for james.dalgleish
12 months ago by
james.dalgleish30 wrote:

So, the author provided an answer when I posed the question on the github site. I think this may be useful to many, so I'll post it here:

"

It is possible to phrase your question in terms of density estimation though. I've tried to illustrate with the following toy example:

library(yamss)
library(data.table)

set.seed(4)
num_rows <- 1000 # "m/z"
num_cols <- 2000 # "scan"
mat <- matrix(runif(num_rows*num_cols, 3, 5), nrow = num_rows, ncol = num_cols) # "intensities"

dt <- data.table(
	mz = rep(seq_len(num_rows), num_cols),
	scan = rep(seq_len(num_cols), each = num_rows),
	intensity = as.numeric(mat),
	sample = 1
)
cms_raw <- new("CMSraw")
yamss:::.mzParams(cms_raw) <- yamss:::.setMZParams(dt)
yamss:::.rawDT(cms_raw) <- dt
colData(cms_raw) <- DataFrame(sample = 1)
cms_proc <- bakedpi(cms_raw, dbandwidth = c(1e-5, 1), dgridstep = c(1e-5, 1))
cms_slice <- slicepi(cms_proc, cutoff = NULL, verbose = TRUE)"
ADD COMMENTlink written 12 months ago by james.dalgleish30
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 157 users visited in the last hour