Skip to content

Instantly share code, notes, and snippets.

@mlist
Created April 2, 2023 10:31
Show Gist options
  • Save mlist/99ed7fef687e75b1b28fee7b52ceb87e to your computer and use it in GitHub Desktop.
Save mlist/99ed7fef687e75b1b28fee7b52ceb87e to your computer and use it in GitHub Desktop.
Plot the amount of sequencing data from SRA
library(ggplot2)
library(tidyverse)
library(readr)
sra_stat <- read_csv("https://www.ncbi.nlm.nih.gov/Traces/sra/sra_stat.cgi")
sra_stat$date <- as.Date(sra_stat$date, format = "%m/%d/%Y")
ggplot(sra_stat, aes(x = date, group = 1)) +
geom_area(aes(y = bases / 10^15), fill = "orange", alpha = 0.8) +
geom_area(aes(y = bytes / 10^15), fill = "blue", alpha = 0.8) +
labs(title = "Amount of Sequencing Data in SRA",
x = "Year", y = "Petabases (orange) or petabytes (blue)") +
scale_x_date(limits = as.Date(c("2013-01-01", Sys.Date()))) +
theme_bw(base_size = 12)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment