knitr::opts_chunk$set(echo = TRUE) library(plotly) library(magrittr)
Started on r format(Sys.time(), "%Y-%m-%d %H:%M:%S")
data <- read.table(snp_counts, sep="\t", skip=2) names(data) <- c("Counts", "Sample") samples <- gsub("samples/", "", data$Sample) plot_ly(data, x = samples, y = data$Counts)
data <- read.table(private_snp_counts, sep="\t", skip=1) names(data) <- c("Private_SNPs", "Sample") fig <- plot_ly(data, x = ~Sample, y = ~Private_SNPs, type = 'bar', name = 'Private SNPs') fig <- fig %>% layout(title = 'Private SNPs', yaxis = list(title = 'Count'), xaxis=list(title='')) fig
data <- read.table(shared_snp_counts, sep="\t", skip=1) names(data) <- c("Shared_SNPs", "Count") fig <- plot_ly(data, x = ~Shared_SNPs, y = ~Count, type = 'bar', name = 'Shared SNPs') fig <- fig %>% layout(title = 'Shared SNPs', yaxis = list(title = 'Count'), xaxis=list(title='Number of shared SNPs')) fig
data <- read.table(tstv, sep="\t", skip=1) names(data) <- c("Transisions", "Transversions", "tstv", "Sample") fig <- plot_ly(data, x = ~Sample, y = ~tstv, type = 'bar', name = 'Transisions/Transversions') fig <- fig %>% layout(yaxis = list(title = 'ts/tv'), xaxis=list(title='')) fig
ezInteractiveTableRmd(values=ans4Report[["dataset"]])
ezSessionInfo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.