Closed kbarylyuk closed 6 years ago
Thank you for your feature request. This is actually currently possible, using the little hack described below, using the dunkley2006
dataset as example:
> library("pRolocdata")
> data(dunkley2006)
I also assume that the variable x
contains your pre-calculated coordinates; here, I'll generate random data:
> set.seed(123)
> x <- matrix(rnorm(2 * nrow(dunkley2006)), ncol = 2)
> rownames(x) <- featureNames(dunkley2006)
> colnames(x) <- c("X1", "X2")
> head(x)
X1 X2
AT1G09210 -0.56047565 -2.07848927
AT1G21750 -0.23017749 -0.09143428
AT1G51760 1.55870831 1.18718681
AT1G56340 0.07050839 1.19160127
AT2G32920 0.12928774 -0.78896322
AT2G47470 1.71506499 -1.54777654
I now create a new MSnSet
based on dunkley2006
that I populate with my pre-computed coordinates:
> dunk2 <- dunkley2006[, 1:2]
> sampleNames(dunk2) <- colnames(x)
> exprs(dunk2) <- x
Finally, I call pRolocVis
to visualise that new data without any dimensionality reduction:
> library("pRolocGUI")
> pRolocVis(dunk2, method = "none")
Listening on http://127.0.0.1:6015
Let me know how this works.
Hi @lgatto ,
thank you very much for this useful suggestion. I have tried it - works as described.
I would like to have an option to provide a matrix of coordinates computed externally as an input object to the
pRolocVis
function, similar to how it is done with theplot2D
function:Currently, if I do this the following errors are returned:
Here is my session info:
Thank you.