#' @export
setGeneric('cgRawPlot', function(object){
message('No plot method defined!')
object})
setMethod('cgRawPlot', 'xcmsRaw', function(object){
print('xcms')
cgraw <- getcgraw(object)
qrawplot(cgraw, object@filepath)
})
getcgraw <- function(object){
cgraw <- data.frame(rawMat(object))
## add this to match chromatoplots filtering
# cgraw <- cgraw[cgraw$intensity > quantile(cgraw$intensity, 0.95),]
##
col <- log(cgraw[,'intensity'])
col <- col/max(col)
cgraw <- qdata(cgraw, size = .1,
color = rgb(1 - col, 1 - col, 0))
return(cgraw)
}
qrawplot <- function(qd, filepath){
qscatter( x = time,
y = mz,
data = qd,
main = paste('loadSample: ', filepath),
xlab="Seconds",
ylab="m/z",
xlim=range(qd$time),
ylim=range(qd$mz))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.