Description Usage Arguments Details Value References Examples
scdb() tidies up the database a bit, with Date, URL, Cells, and Velocity
1 |
URL |
the URL if it changes |
... |
anything else to tell utils::read.delim |
The database itself lives at http://www.nxn.se/single-cell-studies/data.tsv
1 | a data.frame, with the Date column as an actual Date
|
Svensson V, Beltrame EdV, Pachter L (2020), A curated database reveals trends in single-cell transcriptomics, Database, 28 November 2020 https://doi.org/10.1093/database/baaa073
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | db <- scdb()
library(useful)
library(tidyverse)
subset(db, Velocity == TRUE) %>% corner
columns <- c("Title", "Data.location", "URL")
subset(db, Tissue == "Blood" & Cells > 50000)[, columns]
subset(db, grepl("CITE", Technique))[, columns]
subset(db, grepl("Amit", Authors))[, columns]
a_year_ago <- (Sys.Date() - 365)
subset(db, Date > a_year_ago) %>% corner
five_years_ago <- (Sys.Date() - (5*365.25))
p1 <- ggplot(subset(db, Date > five_years_ago),
aes(x = Date, fill = Velocity)) +
geom_histogram() +
scale_x_date() +
xlab("year") +
scale_y_log10() +
ylab("papers") +
NULL
suppressWarnings(p1 + theme_minimal() + ggtitle("Velocity in papers"))
p2 <- ggplot(subset(db,
Organism %in% c("Human", "Mouse", "Zebrafish") &
Date > five_years_ago),
aes(x=Date, y=Cells, color=Organism, fill=Organism)) +
geom_point() +
geom_smooth() +
scale_y_log10() +
NULL
suppressWarnings(p2 + facet_grid(vars(Organism)) + theme_minimal())
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.