require(SOD)
## Not run:
# ## read in the f186 data set
# data("f186", package="SOD")
#
# ## f186 contains information about a set of cells. We
# ## want to use columns 7:12, which contain transcript
# ## densities to visualise the relationships between the
# ## cells.
# m <- as.matrix( f186[,7:12] )
#
# ## Make a normal (openMP) accelarated squeezer object
#
# ## use a subset of the rows to reduce the computation time
# ## for automated checks
# r <- 1:200
# ds1 <- DimSqueezer$new(m[r,])
#
# ## you can also use:
# ## ds1 <- new("DimSqueezer", m[r,])
#
# ## squeeze 200 iterations resulting in a
# ## 2 dimensional representation.
# sq1 <- ds1$squeeze(2, 200)
#
# ## Make an openCL accelerated squeezer object
# ## note this is only available where both the physical
# ## hardware and the appropriate development environment
# ## is available.
# ds2 <- DimSqueezer_CL$new(m)
#
# ## squeeze, 200 iterations using a work group size of 64
# ## giving a 2 dimensional representation.
# sq2 <- ds2$squeeze(2, 200, 64)
#
# ## functions to plot the relationships
# plotPoints(sq1)
#
# ## use columns of f186 to make a more interesting
# ## plot
# plotPoints(sq1, col=hsvScale(f186[r,"Etv2"]), pch=19)
# plotPoints(sq1, col=hsvScale(f186[r,"p_Etv2"]), pch=19)
#
# ## and a funky plot
# plotConcentric(sq1, f186[r,7:12], cex.max=5, pch=19, leg.pos="topleft")
#
# ## and to plot the stress mapping.
# plotStress(sq1)
# ## End(Not run)
Run the code above in your browser using DataLab