knownTutorials <- c("cDNADiffExpr", "SeqStatsQC")
#' Prepare a volcanoPlot of gene expression data using ggplot2
#'
#' Volcano plot presents a scatter plot of the -log10(p-value) / log2 gene
#' expression from a differential gene expression study
#'
#' @param tutorialId name describing tutorial to initialise
#'
#' @return None
#'
#' @author Oxford Nanopore Bioinformatics, \email{support@@nanoporetech.com}
#' @references \url{https://en.wikipedia.org/wiki/Volcano_plot_(statistics)}
#' @keywords volcano
#'
#' @export
InitTutorial <- function(tutorialId) {
if (tutorialId %in% knownTutorials) {
if (tutorialId == "cDNADiffExpr") initcDNA()
if (tutorialId == "SeqStatsQC") initSeqStats()
} else {
stop(paste("[",tutorialId,"] is not a known tutorial"))
}
}
initcDNA <- function() {
# RawSequences
cdna_seq_files <- c("condition1_rep1.fastq.gz", "condition1_rep2.fastq.gz", "condition1_rep3.fastq.gz",
"condition2_rep1.fastq.gz", "condition2_rep2.fastq.gz", "condition2_rep3.fastq.gz")
migrate(file.path("extdata", "cdna_differential_expression", cdna_seq_files), "RawData")
# RMD template, config file and Snakefile
cdna_workflow_files <- c("Nanopore_cDNA_Tutorial.Rmd", "config.yaml", "Snakefile")
migrate(file.path("extdata", "cdna_differential_expression", cdna_workflow_files), ".")
# graphics and accompanying images
image_files <- c("dag1.png", "ExperimentalDesign.png", "FolderLayout.png", "KnitIt.png")
migrate(file.path("extdata", "cdna_differential_expression", image_files), file.path("Analysis", "StaticImages"))
}
initSeqStats <- function() {
# Raw sequence summary file
migrate(file.path("extdata", "sequencing_statistics_qc", "merged_seq_summary.txt.bz2"), "RawData")
# RMD template, config file and Snakefile
seqstat_workflow_files <- c("Nanopore_SumStatQC_Tutorial.Rmd", "config.yaml")
migrate(file.path("extdata", "sequencing_statistics_qc", seqstat_workflow_files), ".")
# graphics and accompanying images
image_files <- c("sumstatEditParams.png", "KnitIt.png")
migrate(file.path("extdata", "sequencing_statistics_qc", image_files), file.path("Analysis", "StaticImages"))
}
migrate <- function(source, destination) {
dir.create(destination, showWarnings=FALSE, recursive = TRUE)
file.copy(system.file(source, package="TuPoreIal"), destination)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.