# \donttest{
library(WallomicsData)
library(kpcaIG)
Transcriptomics_Stems_s <- scale(Transcriptomics_Stems)
kpca_tan <- kernelpca(as.matrix(Transcriptomics_Stems_s),
kernel = "tanhdot",
kpar = list(scale = 0.0001, offset = 0.01))
# Compute the most relevant genes based on the first two components of kpca_tan
kpca_ig_tan <- kpca_igrad(kpca_tan, dim = c(1,2))
head(kpca_ig_tan)
# Visualize the kpca plot.
plot_kpca2D(kpca_tan, groups = Ecotype)
# Visualize the most relevant variable (gene) according to kpca_igrad, "AT4G12060".
plot_kpca2D(kpca_tan, "AT4G12060", groups = Ecotype, scale = 1000, components = c(1, 2))
# Visualize using the second and third component
plot_kpca2D(kpca_tan, "AT4G12060", groups = Ecotype, scale = 1000, components = c(2, 3))
#The selected gene shows upper expression in the samples with genotype type Col.
# }
Run the code above in your browser using DataLab