diff --git a/intermediate-r-data-visualization/1. iris.R b/intermediate-r-data-visualization/1. iris.R new file mode 100644 index 0000000..22b02cc --- /dev/null +++ b/intermediate-r-data-visualization/1. iris.R @@ -0,0 +1,198 @@ +#Read data in. +dat <- read.table("iris.csv", header= TRUE, sep = ",") + +#Plot using 'base' graphics. +plot(x = dat$Sepal.Length, y = dat$Petal.Length, + xlab = "Sepal Length", ylab = "Petal Length") + +#Install ggplot2. +library(ggplot2) + +#Get details of ggplot2 package. +library(help = "ggplot2") + +#Plot using qplot. +qplot(x = Sepal.Length, y = Petal.Length, data = dat, + xlab = "Sepal Length", ylab = "Petal Length") + +qplot(x = Sepal.Length, y = Petal.Length, data = dat, + xlab = "Sepal Length", ylab = "Petal Length", + color = Species) + +#But the journals charge extra for color figures. +#Can we use shapes to distinguish species? +qplot(x = Sepal.Length, y = Petal.Length, data = dat, + xlab = "Sepal Length", ylab = "Petal Length", + shape = Species) + +#Check the boxplots for all species simultaneously. +qplot(x = Species, y = Sepal.Length, data = dat, geom = "boxplot", + ylab = "Sepal Length") + + +#---------------------------------------- +#---------------------------------------- +#Underlying grammar is not clear. We'll use ggplot2. +#Specify what goes on which axis. Specify the data. +ggplot(data = dat, aes(x = Sepal.Length, y = Petal.Length)) + +#Add geometrical representation of data. +ggplot(data = dat, aes(x = Sepal.Length, y = Petal.Length)) + + geom_point() + +ggplot(data = dat, aes(x = log10(Sepal.Length), y = Petal.Length)) + + geom_point() + +#Add axis labels. +ggplot(data = dat, aes(x = log10(Sepal.Length), y = Petal.Length)) + + geom_point() + + xlab("Sepal Length (log10)") + + ylab("Petal Length") + +#Explore options with geom_point. +ggplot(data = dat, aes(x = Sepal.Length, y = Petal.Length)) + + geom_point(shape =1) + +#Explore options with geom_point. +ggplot(data = dat, aes(x = Sepal.Length, y = Petal.Length)) + + geom_point(aes(shape = Species)) + +ggplot(data = dat, aes(x = Sepal.Length, y = Petal.Length, shape = Species)) + + geom_point() + +#Explore other geometrical mapping options. +ggplot(data = dat, aes(x = Sepal.Length, y = Petal.Length)) + + geom_line() + +#Explore other geometrical mapping options. +ggplot(data = dat, aes(x = Sepal.Length, y = Petal.Length, color = Species)) + + geom_line() + +#Add a trendline to data. +ggplot(data = dat, aes(x = Sepal.Length, y = Petal.Length, color = Species)) + + geom_point() + geom_smooth(method = lm) + +#Limit the axis. + +ggplot(data = dat, aes(x = Sepal.Length, y = Petal.Length, color = Species)) + + geom_point() + geom_smooth(method = lm) + + coord_cartesian(xlim = c(0, 10), ylim = c(0, 10)) + +#Sepcify where the breaks should be. +ggplot(data = dat, aes(x = Sepal.Length, y = Petal.Length, color = Species)) + + geom_point() + geom_smooth(method = lm) + + coord_cartesian(xlim = c(0, 10), ylim = c(0, 10))+ + scale_x_continuous(breaks = c(0, 2, 4, 6, 8, 10)) + +ggplot(data = dat, aes(x = Sepal.Length, y = Petal.Length, color = Species)) + + geom_point() + geom_smooth(method = lm) + + coord_cartesian(xlim = c(0, 10), ylim = c(0, 10))+ + scale_x_continuous(breaks = 0:5*2) + + +#Move legend to top. +ggplot(data = dat, aes(x = Sepal.Length, y = Petal.Length, color = Species)) + + geom_point() + geom_smooth(method = lm) + + coord_cartesian(xlim = c(0, 10), ylim = c(0, 10))+ + scale_x_continuous(breaks = 0:5*2)+ + theme(legend.direction = "horizontal", legend.position = "top", + legend.title = element_blank())+ + xlab("Sepal Length") + + ylab("Petal Length") + + +#Add border to plot. +ggplot(data = dat, aes(x = Sepal.Length, y = Petal.Length, color = Species)) + + geom_point() + geom_smooth(method = lm) + + coord_cartesian(xlim = c(0, 10), ylim = c(0, 10))+ + scale_x_continuous(breaks = 0:5*2)+ + theme(legend.direction = "horizontal", legend.position = "top", + legend.title = element_blank(), + panel.border = element_rect(size = c(1,1,1,1), color = "black", + fill = NA))+ + xlab("Sepal Length") + + ylab("Petal Length") + + +#Specifying limits with xlim instead of coord_cartesian. +#Note the different behavior. +ggplot(data = dat, aes(x = Sepal.Length, y = Petal.Length, color = Species)) + + geom_point() + geom_smooth(method = lm) + + xlim(5, 10) + ylim(0, 10)+ + theme(legend.direction = "horizontal", legend.position = "top", + legend.title = element_blank(), + panel.border = element_rect(size = c(1,1,1,1), color = "black", + fill = NA))+ + xlab("Sepal Length") + + ylab("Petal Length") + +ggplot(data = dat, aes(x = Sepal.Length, y = Petal.Length, color = Species)) + + geom_point() + geom_smooth(method = lm) + + coord_cartesian(xlim = c(5, 10), ylim = c(0, 10)) + + theme(legend.direction = "horizontal", legend.position = "top", + legend.title = element_blank(), + panel.border = element_rect(size = c(1,1,1,1), color = "black", + fill = NA))+ + xlab("Sepal Length") + + ylab("Petal Length") + +#---------------------------------------- +#---------------------------------------- +#Adjust more theme elements. +#Change axis text, axis label, label direction. + +#Make figures for publication. +p1 <- ggplot(data = dat, aes(x = Sepal.Length, y = Petal.Length, color = Species)) + + geom_point(size = 0.5) + geom_smooth(method = lm) + + coord_cartesian(xlim = c(4, 8.5), ylim = c(0, 8))+ + scale_x_continuous(breaks = 0:5*2)+ + theme(legend.direction = "horizontal", legend.position = "top", + legend.title = element_blank(), + panel.border = element_rect(size = c(1,1,1,1), color = "black", + fill = NA))+ + xlab("Sepal Length") + + ylab("Petal Length") + +p2 <- ggplot(data= dat, aes(x = Species, y = Sepal.Length)) + + geom_boxplot() + ylab("Sepal Length") + + theme(panel.border = element_rect(size = c(1,1,1,1), color = "black", + fill = NA)) + +#Package to arrange figures. +library(cowplot) +theme_set(theme_grey()) + +#Arrange plots. +p <- plot_grid(p1, p2, labels = c("a", "b")) + +#Save plot to file. +ggsave("Iris.pdf", + plot = p, + width = 17, height = 8, units = "cm") + +#---------------------- +#Plots with multiple facet panels. +#Facets row wise. +ggplot(data = dat, aes(x = Sepal.Length, y = Petal.Length)) + + geom_point() + geom_smooth(method = lm) + + facet_grid(Species~.)+ + coord_cartesian(xlim = c(1, 8), ylim = c(1, 8)) + + theme(legend.direction = "horizontal", legend.position = "top", + legend.title = element_blank(), + panel.border = element_rect(size = c(1,1,1,1), color = "black", + fill = NA))+ + xlab("Sepal Length") + + ylab("Petal Length") + + +#Facets column wise. +ggplot(data = dat, aes(x = Sepal.Length, y = Petal.Length)) + + geom_point() + geom_smooth(method = lm) + + facet_grid(.~Species)+ + coord_cartesian(xlim = c(1, 8), ylim = c(1, 8)) + + theme(legend.direction = "horizontal", legend.position = "top", + legend.title = element_blank(), + panel.border = element_rect(size = c(1,1,1,1), color = "black", + fill = NA))+ + xlab("Sepal Length") + + ylab("Petal Length") \ No newline at end of file diff --git a/intermediate-r-data-visualization/2. nucleotide_resolution.R b/intermediate-r-data-visualization/2. nucleotide_resolution.R new file mode 100644 index 0000000..2254a66 --- /dev/null +++ b/intermediate-r-data-visualization/2. nucleotide_resolution.R @@ -0,0 +1,41 @@ +library(ggplot2) + +#Following library will be used to reformat data for plotting. +library(reshape2) + +#Load the data for plotting. +load("nucleotide_resolution.RData") + +#Open a pdf file for plotting. +pdf("Nucleotide_resolution.pdf") + +#Loop through all genes. +for (i in 1:length(dat)) { + + #Get data for this gene. + this_dat <- dat[[i]] + + #Reformat data for plotting. + this_dat <- melt(this_dat, id.vars = "Position") + + #Store the plot in a variable. + p <- ggplot(this_dat, aes(x = Position, y = value)) + + geom_bar(stat = "identity") + + facet_grid(variable ~ .)+ + scale_y_continuous(breaks = c(0, 0.5, 1))+ + ylab("Signal")+ + annotate(geom = "rect", + xmin = to_annotate$Start[i], + xmax = to_annotate$End[i], + ymin = -Inf, + ymax = Inf, fill = "red", + color = NA, + alpha = 0.3) + + ggtitle(names(dat)[i]) + + #Print plot to file. + print(p) +} + +#Close file. +dev.off() \ No newline at end of file diff --git a/intermediate-r-data-visualization/3. Hill_equation_static.R b/intermediate-r-data-visualization/3. Hill_equation_static.R new file mode 100644 index 0000000..b6318e5 --- /dev/null +++ b/intermediate-r-data-visualization/3. Hill_equation_static.R @@ -0,0 +1,56 @@ +#making animations. + +#Get a range of substrate concentration values. +S <- 0:10000*0.01 + +#Half-maximal concentration constant. +K <- 50 + +#Define a container object for data. +#One column for substrate concentration and other 50 for Hill coefficients. +dat <- matrix(, 10001, 51) + +#Assign substrate concentration values to first column. +dat[, 1] <- S + +#Loop through all Hill coefficients of interest. +for (i in 1:50) { + + #Get reaction velocity in terms of fraction of max. velocity. + this_y <- (S^i)/((S^i)+(K^i)) #For formula refer Wikipedia page for Hill coefficient. + + #Assign values for this iteration to the appropriate column. + dat[, i+1] <- this_y +} + +#Give names to columns. +colnames(dat) <- c("S", 1:50) + +#ggplot2 only accepts data frames. Convert matrix object to data.frame. +dat <- as.data.frame(dat) + +#Open a pdf file for plotting. +pdf("Hill_equation.pdf") +#Loop through all Hill coefficients. +for (i in 1:50) { + + #Get the substrate and corresponding reaction velocity values for plotting. + this_dat <- dat[, c("S", as.character(i))] + + #Rename columns. + colnames(this_dat) <- c("Substrate", "Rate") + + #Generate figure. + p <- ggplot(this_dat, aes(x = Substrate, y = Rate)) + + geom_line() + + coord_cartesian(xlim = c(0, 100), ylim = c(0, 1))+ + theme(panel.border = element_rect(size = c(1,1,1,1), color = "black", + fill = NA))+ + ggtitle(paste("Hill coefficient =", i)) + + #Display figure in pdf file. + print(p) +} + +#Close pdf file. +dev.off() diff --git a/intermediate-r-data-visualization/4. Hill_equation_interactive.R b/intermediate-r-data-visualization/4. Hill_equation_interactive.R new file mode 100644 index 0000000..b8e19f2 --- /dev/null +++ b/intermediate-r-data-visualization/4. Hill_equation_interactive.R @@ -0,0 +1,53 @@ +library(shiny) +library(ggplot2) + +#Get a range of substrate concentration values. +S <- 0:10000*0.01 + +#Half-maximal concentration constant. +K <- 50 + +# Define User Interface for app ---- +ui <- pageWithSidebar( + + # App title ---- + headerPanel("Hill equation"), + + # Sidebar panel for inputs ---- + sidebarPanel( + + sliderInput(inputId = "Hill_coef", + label = "Hill coefficient:", + min = 1, max = 50, + value = 1) + + ), + + # Main panel for displaying outputs ---- + mainPanel( + + plotOutput(outputId = "Hill_figure") + + ) +) + +# Define server logic to plot various variables against mpg ---- +server <- function(input, output) { + + + output$Hill_figure <- renderPlot({ + i <- input$Hill_coef + y_vals <- (S^i)/((S^i)+(K^i)) #For formula refer Wikipedia page for Hill coefficient. + this_dat <- data.frame(Substrate = S, Rate = y_vals) + + ggplot(this_dat, aes(x = Substrate, y = Rate)) + + geom_line() + + coord_cartesian(xlim = c(0, 100), ylim = c(0, 1))+ + theme(panel.border = element_rect(size = c(1,1,1,1), color = "black", + fill = NA))+ + ggtitle(paste("Hill coefficient =", i)) + }) + +} + +shinyApp(ui, server) \ No newline at end of file diff --git a/intermediate-r-data-visualization/5. Heatmap.R b/intermediate-r-data-visualization/5. Heatmap.R new file mode 100644 index 0000000..249e485 --- /dev/null +++ b/intermediate-r-data-visualization/5. Heatmap.R @@ -0,0 +1,17 @@ +#Read table. +library(gplots) + +dat <- read.table("norm_counts.txt", sep = "\t", header = T) +dat <- as.matrix(dat) + +#Save in pdf format. +pdf("Heatmap.pdf", width = 10, height = 10) +heatmap.2(dat, + dendrogram = "column") #Use labRow = "" to turn off row labels. +dev.off() + +#Save in TIFF format. +tiff("Heatmap.tiff", width = 10, height = 10, units = 'in', res = 300) +heatmap.2(dat, + dendrogram = "column") #Use labRow = "" to turn off row labels. +dev.off() diff --git a/intermediate-r-data-visualization/Additional_generate_random_data.R b/intermediate-r-data-visualization/Additional_generate_random_data.R new file mode 100644 index 0000000..98d2cd9 --- /dev/null +++ b/intermediate-r-data-visualization/Additional_generate_random_data.R @@ -0,0 +1,27 @@ +dat <- list() + + +genes <- c("YPL1", "BRCA", "DBP2", "1p22", "RLF", "DCLRE1B", + "ZNF268", "RNF220", "EPHA2", "SDC3") +to_annotate <- data.frame(Gene = genes, Start = NA, End = NA) + +for (i in genes) { + rows <- sample(50:100, 1) + dat[[i]] <- matrix(, rows, 6) + dat[[i]][, 1] <- runif(rows, 0, 1) + dat[[i]][, 4] <- runif(rows, 0, 1) + dat[[i]][, 2] <- dat[[i]][, 1] + runif(rows, 0, 0.1) + dat[[i]][, 3] <- dat[[i]][, 1] + runif(rows, 0, 0.1) + dat[[i]][, 5] <- dat[[i]][, 2] + runif(rows, 0, 0.1) + dat[[i]][, 6] <- dat[[i]][, 2] + runif(rows, 0, 0.1) + dat[[i]][dat[[i]] < 0 ] <- 0 + dat[[i]][dat[[i]] > 1 ] <- 1 + dat[[i]] <- cbind(sample(100:1000, 1) + 1:rows, dat[[i]]) + colnames(dat[[i]]) <- c("Position", "A1", "A2", "A3", "B1", "B2", "B3") + dat[[i]] <- as.data.frame(dat[[i]]) + + to_annotate[which(genes == i), "Start"] <- dat[[i]]$Position[1] + sample(1:20, 1) + to_annotate[which(genes == i), "End"] <- to_annotate[which(genes == i), "Start"] + sample(1:20, 1) +} + +save(list = c("dat", "to_annotate"), file = "Detailed_plotting_data.RData") diff --git a/intermediate-r-data-visualization/Heatmap.pdf b/intermediate-r-data-visualization/Heatmap.pdf new file mode 100644 index 0000000..6ba1e20 Binary files /dev/null and b/intermediate-r-data-visualization/Heatmap.pdf differ diff --git a/intermediate-r-data-visualization/Hill_equation.pdf b/intermediate-r-data-visualization/Hill_equation.pdf new file mode 100644 index 0000000..e71e161 Binary files /dev/null and b/intermediate-r-data-visualization/Hill_equation.pdf differ diff --git a/intermediate-r-data-visualization/Iris.pdf b/intermediate-r-data-visualization/Iris.pdf new file mode 100644 index 0000000..3cfd497 Binary files /dev/null and b/intermediate-r-data-visualization/Iris.pdf differ diff --git a/intermediate-r-data-visualization/Nucleotide_resolution.pdf b/intermediate-r-data-visualization/Nucleotide_resolution.pdf new file mode 100644 index 0000000..7b6d933 Binary files /dev/null and b/intermediate-r-data-visualization/Nucleotide_resolution.pdf differ diff --git a/intermediate-r-data-visualization/Visualization_with_ggplot2.pdf b/intermediate-r-data-visualization/Visualization_with_ggplot2.pdf new file mode 100644 index 0000000..12e42b6 Binary files /dev/null and b/intermediate-r-data-visualization/Visualization_with_ggplot2.pdf differ diff --git a/intermediate-r-data-visualization/Visualization_with_ggplot2.pptx b/intermediate-r-data-visualization/Visualization_with_ggplot2.pptx new file mode 100644 index 0000000..f999c1a Binary files /dev/null and b/intermediate-r-data-visualization/Visualization_with_ggplot2.pptx differ diff --git a/intermediate-r-data-visualization/Visualization_with_ggplot2.zip b/intermediate-r-data-visualization/Visualization_with_ggplot2.zip new file mode 100644 index 0000000..43acda2 Binary files /dev/null and b/intermediate-r-data-visualization/Visualization_with_ggplot2.zip differ diff --git a/intermediate-r-data-visualization/iris.csv b/intermediate-r-data-visualization/iris.csv new file mode 100644 index 0000000..8b63930 --- /dev/null +++ b/intermediate-r-data-visualization/iris.csv @@ -0,0 +1,151 @@ +Sepal.Length,Sepal.Width,Petal.Length,Petal.Width,Species +5.1,3.5,1.4,0.2,setosa +4.9,3,1.4,0.2,setosa +4.7,3.2,1.3,0.2,setosa +4.6,3.1,1.5,0.2,setosa +5,3.6,1.4,0.2,setosa +5.4,3.9,1.7,0.4,setosa +4.6,3.4,1.4,0.3,setosa +5,3.4,1.5,0.2,setosa +4.4,2.9,1.4,0.2,setosa +4.9,3.1,1.5,0.1,setosa +5.4,3.7,1.5,0.2,setosa +4.8,3.4,1.6,0.2,setosa +4.8,3,1.4,0.1,setosa +4.3,3,1.1,0.1,setosa +5.8,4,1.2,0.2,setosa +5.7,4.4,1.5,0.4,setosa +5.4,3.9,1.3,0.4,setosa +5.1,3.5,1.4,0.3,setosa +5.7,3.8,1.7,0.3,setosa +5.1,3.8,1.5,0.3,setosa +5.4,3.4,1.7,0.2,setosa +5.1,3.7,1.5,0.4,setosa +4.6,3.6,1,0.2,setosa +5.1,3.3,1.7,0.5,setosa +4.8,3.4,1.9,0.2,setosa +5,3,1.6,0.2,setosa +5,3.4,1.6,0.4,setosa +5.2,3.5,1.5,0.2,setosa +5.2,3.4,1.4,0.2,setosa +4.7,3.2,1.6,0.2,setosa +4.8,3.1,1.6,0.2,setosa +5.4,3.4,1.5,0.4,setosa +5.2,4.1,1.5,0.1,setosa +5.5,4.2,1.4,0.2,setosa +4.9,3.1,1.5,0.2,setosa +5,3.2,1.2,0.2,setosa +5.5,3.5,1.3,0.2,setosa +4.9,3.6,1.4,0.1,setosa +4.4,3,1.3,0.2,setosa +5.1,3.4,1.5,0.2,setosa +5,3.5,1.3,0.3,setosa +4.5,2.3,1.3,0.3,setosa +4.4,3.2,1.3,0.2,setosa +5,3.5,1.6,0.6,setosa +5.1,3.8,1.9,0.4,setosa +4.8,3,1.4,0.3,setosa +5.1,3.8,1.6,0.2,setosa +4.6,3.2,1.4,0.2,setosa +5.3,3.7,1.5,0.2,setosa +5,3.3,1.4,0.2,setosa +7,3.2,4.7,1.4,versicolor +6.4,3.2,4.5,1.5,versicolor +6.9,3.1,4.9,1.5,versicolor +5.5,2.3,4,1.3,versicolor +6.5,2.8,4.6,1.5,versicolor +5.7,2.8,4.5,1.3,versicolor +6.3,3.3,4.7,1.6,versicolor +4.9,2.4,3.3,1,versicolor +6.6,2.9,4.6,1.3,versicolor +5.2,2.7,3.9,1.4,versicolor +5,2,3.5,1,versicolor +5.9,3,4.2,1.5,versicolor +6,2.2,4,1,versicolor +6.1,2.9,4.7,1.4,versicolor +5.6,2.9,3.6,1.3,versicolor +6.7,3.1,4.4,1.4,versicolor +5.6,3,4.5,1.5,versicolor +5.8,2.7,4.1,1,versicolor +6.2,2.2,4.5,1.5,versicolor +5.6,2.5,3.9,1.1,versicolor +5.9,3.2,4.8,1.8,versicolor +6.1,2.8,4,1.3,versicolor +6.3,2.5,4.9,1.5,versicolor +6.1,2.8,4.7,1.2,versicolor +6.4,2.9,4.3,1.3,versicolor +6.6,3,4.4,1.4,versicolor +6.8,2.8,4.8,1.4,versicolor +6.7,3,5,1.7,versicolor +6,2.9,4.5,1.5,versicolor +5.7,2.6,3.5,1,versicolor +5.5,2.4,3.8,1.1,versicolor +5.5,2.4,3.7,1,versicolor +5.8,2.7,3.9,1.2,versicolor +6,2.7,5.1,1.6,versicolor +5.4,3,4.5,1.5,versicolor +6,3.4,4.5,1.6,versicolor +6.7,3.1,4.7,1.5,versicolor +6.3,2.3,4.4,1.3,versicolor +5.6,3,4.1,1.3,versicolor +5.5,2.5,4,1.3,versicolor +5.5,2.6,4.4,1.2,versicolor +6.1,3,4.6,1.4,versicolor +5.8,2.6,4,1.2,versicolor +5,2.3,3.3,1,versicolor +5.6,2.7,4.2,1.3,versicolor +5.7,3,4.2,1.2,versicolor +5.7,2.9,4.2,1.3,versicolor +6.2,2.9,4.3,1.3,versicolor +5.1,2.5,3,1.1,versicolor +5.7,2.8,4.1,1.3,versicolor +6.3,3.3,6,2.5,virginica +5.8,2.7,5.1,1.9,virginica +7.1,3,5.9,2.1,virginica +6.3,2.9,5.6,1.8,virginica +6.5,3,5.8,2.2,virginica +7.6,3,6.6,2.1,virginica +4.9,2.5,4.5,1.7,virginica +7.3,2.9,6.3,1.8,virginica +6.7,2.5,5.8,1.8,virginica +7.2,3.6,6.1,2.5,virginica +6.5,3.2,5.1,2,virginica +6.4,2.7,5.3,1.9,virginica +6.8,3,5.5,2.1,virginica +5.7,2.5,5,2,virginica +5.8,2.8,5.1,2.4,virginica +6.4,3.2,5.3,2.3,virginica +6.5,3,5.5,1.8,virginica +7.7,3.8,6.7,2.2,virginica +7.7,2.6,6.9,2.3,virginica +6,2.2,5,1.5,virginica +6.9,3.2,5.7,2.3,virginica +5.6,2.8,4.9,2,virginica +7.7,2.8,6.7,2,virginica +6.3,2.7,4.9,1.8,virginica +6.7,3.3,5.7,2.1,virginica +7.2,3.2,6,1.8,virginica +6.2,2.8,4.8,1.8,virginica +6.1,3,4.9,1.8,virginica +6.4,2.8,5.6,2.1,virginica +7.2,3,5.8,1.6,virginica +7.4,2.8,6.1,1.9,virginica +7.9,3.8,6.4,2,virginica +6.4,2.8,5.6,2.2,virginica +6.3,2.8,5.1,1.5,virginica +6.1,2.6,5.6,1.4,virginica +7.7,3,6.1,2.3,virginica +6.3,3.4,5.6,2.4,virginica +6.4,3.1,5.5,1.8,virginica +6,3,4.8,1.8,virginica +6.9,3.1,5.4,2.1,virginica +6.7,3.1,5.6,2.4,virginica +6.9,3.1,5.1,2.3,virginica +5.8,2.7,5.1,1.9,virginica +6.8,3.2,5.9,2.3,virginica +6.7,3.3,5.7,2.5,virginica +6.7,3,5.2,2.3,virginica +6.3,2.5,5,1.9,virginica +6.5,3,5.2,2,virginica +6.2,3.4,5.4,2.3,virginica +5.9,3,5.1,1.8,virginica diff --git a/intermediate-r-data-visualization/norm_counts.txt b/intermediate-r-data-visualization/norm_counts.txt new file mode 100644 index 0000000..efe98e5 --- /dev/null +++ b/intermediate-r-data-visualization/norm_counts.txt @@ -0,0 +1,41 @@ +A_1 A_2 A_3 A_4 A_5 B_1 B_2 B_3 B_4 B_5 +ARPC3 7.59558146609294 7.49846976129062 7.59529998367982 7.6203365075194 7.31904103706532 6.55663357594353 6.54556043103162 6.63574912322353 6.58767572932965 6.39330806264629 +FGFR1OP 4.64644461589454 4.6693924157643 4.62474944679443 4.68877626938961 4.58423018796967 3.44577752132689 3.35901816080107 3.40677914346611 3.33862196045563 3.35593817284073 +SIRT2 4.92445739092013 5.316799741365 5.13341223530175 4.99602516571753 5.05048760284383 7.94008090075049 7.99061118709423 7.90211693152644 7.90883695321455 7.62559594097964 +LANCL1 6.60606487428115 6.42747738755195 6.51692073944586 6.51923992674692 6.57160703705662 8.70120916242003 8.65143163994986 8.72876791107601 8.6189779405646 8.66937924997385 +FLRT3 2.64719435360698 2.39510220092522 2.38719717311496 2.51831448353084 2.40674950782727 4.8577295844844 4.78004032240787 4.90989538594111 4.85876857110446 4.88965113548575 +C7orf40 4.93733046411367 4.95591801232018 4.98256523179993 4.96029411789811 4.61999492730462 3.57488679784269 3.77943953805702 3.73197865280821 3.64006047513306 3.45718005182581 +CRTC2 5.67862216778546 5.86219564772601 5.80565075538176 5.64859063307111 5.54804137497598 5.60943289089162 5.70204527905956 5.55869587681012 5.67277418412169 5.2262108091942 +ZNF302 4.472625924353 4.2820069589637 4.45011798874336 4.42814513225236 4.46605632130077 5.87633037800356 5.91734421961601 5.98664579154646 5.96633003028719 6.11432366946889 +SERPINB2 5.82587758242433 5.60968864431261 5.70667325800289 5.78128004316828 5.63217979977056 -2.71388807840066 -1.87527187837664 -2.38515755047136 -2.25452633952334 -2.86510870067796 +PTPRH 4.75948843773156 4.92286439926791 4.81024937651803 4.73582817355347 4.43024296706069 3.07807200138873 3.02889968443497 3.09292875267614 3.05426933696421 2.60053455282269 +FRMD6 6.2060490448853 6.06984939692537 6.03707860533071 6.07044086928831 6.21534770908549 4.76212185531076 4.74141557681403 4.77674554308884 4.70317750727097 4.62484669326774 +TAF6L 3.52689809679401 3.83443931370619 3.8496082983369 3.60703374868802 4.34732380891458 3.18372906303334 3.2978370498802 3.14471077229976 3.23665783849564 3.80597860345633 +DCHS1 4.45184297041952 4.9927889239236 4.75147164074289 4.47552182543901 5.04698849647257 5.31844137266938 5.36077804725462 5.32843042313478 5.30313641229261 5.14616710056106 +TTC7B 4.52946312298117 4.60535952923518 4.47939002730984 4.54761868376918 4.67543599718012 7.16417508225587 7.16928989954445 7.10438731027331 7.14635240945745 7.14549286110273 +BEGAIN 1.86132236800167 2.2755100899557 2.22768054514439 1.95710439952454 3.64938567090939 4.60615397747792 4.5747075279291 4.55930577032555 4.58029619924187 5.70337002488191 +POLD2 7.37572991551105 7.69411210371016 7.61026339197932 7.48518734989382 7.58912350645237 5.72568544177573 5.78777662397257 5.65602591043618 5.72764729019362 5.55138028171099 +LOC147804 3.55501121219123 3.53862145894013 3.44381933999874 3.36651910738549 3.15953662026241 2.85345907690799 2.88224007805016 2.84629154802925 2.99135104628193 2.60684381914372 +EFTUD2 7.74267801877932 7.77549680421624 7.7197600256209 7.75428948556685 7.55411679996904 6.21030927885862 6.29785869260566 6.24362100442901 6.19036769629052 5.99131502623479 +CSRP2BP 4.58596355982548 4.52162811334147 4.62765759602832 4.58682988505756 4.29370827186177 5.235813472945 5.24249477565793 5.23297845196279 5.27838305765992 5.01947039619139 +LARP1 8.42357538530304 8.46001847186296 8.37880874537485 8.35734388607509 8.33462197703499 8.33037489253383 8.37353723807741 8.28640449769492 8.31572498269565 8.12253603067032 +GTF3C3 6.11581857824737 5.93820284704422 6.0189186210156 6.06457662670065 6.00872993059013 4.91707301619402 4.88776754937941 4.93364058863644 4.80778573012425 4.84230933658555 +MICAL1 5.41331047299631 5.75761796000296 5.636942989099 5.52008752010806 5.78702808078927 5.44043525313505 5.44731920770732 5.34401958367816 5.45628213389766 5.40338448022129 +C17orf56 3.57711381238703 4.01107109382443 3.89617663619818 3.77576006817934 4.36990571617302 3.45878924623769 3.54797704938263 3.44445621065822 3.47558536695775 3.74149467139438 +NAT14 4.08878492906411 4.42937768703192 4.40506526817572 4.29514780335851 4.67316799381362 4.98535582261247 5.11692426314216 5.04274738773491 5.07142342642747 5.1993242375251 +MTHFR 5.22667046784888 5.47718410314378 5.42344436034696 5.30089573029036 5.32060844216208 5.52483167209336 5.65312474705526 5.54815919051956 5.5711351777225 5.37131641396058 +ZNF766 4.48241831777422 4.40336738417417 4.4583088650064 4.48513261873127 4.30253917781118 3.29915327911502 3.22909889752444 3.41101440524791 3.2733098797113 2.96217237938358 +ST8SIA1 2.42148232448128 2.35318200492278 2.42111667345361 2.61777730337309 2.58621885440015 5.97736675478943 5.94050988736741 6.00427305032184 5.93938923948951 5.85749396540309 +USP22 8.04143685973466 8.23822320523447 8.14560908351191 8.04764706717702 8.23560011575156 9.00202785680828 9.04819192094229 8.98979267399618 9.01106661044758 8.92578659645911 +NDUFA10 6.73310121965991 6.7193408326248 6.65409718187521 6.75464962772014 6.57008415167885 7.22810922751325 7.19173003426591 7.19942339044689 7.19565947678399 7.10121016002089 +PWWP2A 4.92158104166755 4.7224948594453 4.83184559712663 4.94296319989611 5.00251818326635 5.20654195635831 5.12803315628618 5.18926219668643 5.08338129773381 5.30980159439218 +MYH7B -0.906228001821028 -0.760778940722528 -0.461617269235912 -1.11148330258797 0.224523597989998 4.34278109526268 4.47177500584342 4.29632447180887 4.4235638374348 4.76824987911062 +TMEM138 4.96343644649727 4.97600664056867 4.96082153186695 4.94238190169584 4.62352311679102 3.20961866655317 3.06742704092422 3.01716204414322 3.19611641311196 2.90699821427789 +PHF1 5.93187808700031 6.13624021083259 6.09075300520298 5.99564692656564 5.99970802811721 6.66750118275575 6.64512412787375 6.62849286436461 6.66716167945513 6.52615197925309 +KIF1B 6.5145414019521 6.42972009668638 6.47756854115383 6.42958710006266 6.48730316857347 9.68430778312752 9.68695920306761 9.66164163883209 9.65604067658075 9.55905468361742 +GRIPAP1 5.95034125887873 6.10535704667109 6.10386528960634 5.94750372844159 5.98240940772457 7.29750103926716 7.37266357270565 7.32326636069117 7.35079469016805 7.13079125582983 +GGH 6.04324587144319 5.8324159517873 5.94390264164318 5.99928455076032 5.92065471598996 4.37402541764065 4.3124896378878 4.40754415855853 4.42105312653506 4.56291643872769 +DDX26B 3.9823910370648 3.84119462907143 3.92719458522729 3.95704612215791 3.98545106960047 4.45309614907899 4.35426807746667 4.52552374930751 4.33030663958645 4.34245981734535 +POLD1 5.28937431629658 5.95231145274591 5.88557211187604 5.46974455234214 6.89868783342821 2.76543445167668 2.71896672357285 2.67020703319323 2.75263820147957 3.23488263401234 +DDX20 4.95220529611355 4.81118074733333 4.8947597812606 4.93246382732568 4.83509937063156 3.66184995454936 3.72539179102255 3.75714906395707 3.70341782536984 3.58091640091416 +FAM200A 3.4904831991513 3.22149562934724 3.41380895519386 3.41425247553315 3.52913482235465 3.45662875862778 3.21935544756984 3.50514392570513 3.32256903711831 3.34465716748347 diff --git a/intermediate-r-data-visualization/nucleotide_resolution.RData b/intermediate-r-data-visualization/nucleotide_resolution.RData new file mode 100644 index 0000000..ebc55b3 Binary files /dev/null and b/intermediate-r-data-visualization/nucleotide_resolution.RData differ