if (interactive()) {
x <- get_example_data()
y <- list("GWAS" = GWAS_data(x[["GWAS"]]),
"DE" = DE_data(x[["DE"]]),
"CAN" = CAN_data(x[["CAN"]]))
chrom_length <- combine_chrom_length(y)
z <- list(
apply_threshold(y[["GWAS"]], score_thr = 4),
apply_threshold(y[["DE"]], score_thr = 1.3, log2fc_thr = 0.5),
apply_threshold(y[["CAN"]])
)
create_hidecan_plot(z,
chrom_length,
label_size = 2)
## Colour genes according to their fold-change
create_hidecan_plot(z,
chrom_length,
colour_genes_by_score = FALSE,
label_size = 2)
## Add names to the datasets
create_hidecan_plot(setNames(z, c("Genomics", "RNAseq", "My list")),
chrom_length,
colour_genes_by_score = FALSE,
label_size = 2)
## Add names to some of the datasets only (e.g. not for GWAS results)
create_hidecan_plot(setNames(z, c(" ", "RNAseq", "My list")),
chrom_length,
colour_genes_by_score = FALSE,
label_size = 2)
## Set limits on all chromosomes (to "zoom in" to the 10-20Mb region)
create_hidecan_plot(z,
chrom_length,
label_size = 2,
chrom_limits = c(10e6, 20e6))
## Set limits on some chromosomes only
create_hidecan_plot(z,
chrom_length,
label_size = 2,
chrom_limits = list("ST4.03ch00" = c(10e6, 20e6),
"ST4.03ch02" = c(15e6, 25e6)))
}
Run the code above in your browser using DataLab