knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
If you haven't installed CimpleG, you can find the instructions to do so here. However it should be as simple as:
if (!require("CimpleG")) devtools::install_github("costalab/CimpleG")
We load the CimpleG package.
library("CimpleG")
In this tutorial, we will use a small dataset with just 409 samples and 1000 CpGs.
We will also use a table with metadata regarding these samples.
This dataset comes included with CimpleG. You can read more about it here: .
# load data data(train_data) data(train_targets)
Running CimpleG can be quite simple. You just need to run the CimpleG function with a few parameters.
# run CimpleG cimpleg_result <- CimpleG( train_data, train_targets, target_columns = c("blood_cells", "hepatocytes"), train_only = TRUE )
Here we are generating signatures to find leukocytes and hepatocytes.
We can quickly visualize how our signature is able to separate the data.
sig_plt <- signature_plot( cimpleg_result, train_data, train_targets, sample_id_column = "gsm", true_label_column = "cell_type" ) sig_plt$plot
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.