Last updated: 2022-10-26
Checks: 7 0
Knit directory: Williams_Retina_scRNA_IMPG2_workflowr/
This reproducible R Markdown analysis was created with workflowr (version 1.7.0). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.
Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.
Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.
The command set.seed(20221026)
was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.
Great job! Recording the operating system, R version, and package versions is critical for reproducibility.
Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.
Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.
Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.
The results in this page were generated with repository version 9ed74d3. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.
Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish
or wflow_git_commit
). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:
Unstaged changes:
Modified: README.md
Deleted: code/README.md
Deleted: data/README.md
Deleted: output/README.md
Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.
These are the previous versions of the repository in which changes were made to the R Markdown (analysis/Macosko_mouse_retina_summarized_IMPG1-2_expression_boxplots.Rmd
) and HTML (docs/Macosko_mouse_retina_summarized_IMPG1-2_expression_boxplots.html
) files. If you’ve configured a remote Git repository (see ?wflow_git_remote
), click on the hyperlinks in the table below to view the files as they were in that past version.
File | Version | Author | Date | Message |
---|---|---|---|---|
html | 146a845 | jeremymsimon | 2022-10-26 | Build site. |
Rmd | 69977d1 | jeremymsimon | 2022-10-26 | Initial commit |
Single-cell RNA-seq data from the P14 mouse retina corresponding to Macosko et al 2015 were retrieved from GEO accession GSE63472. A csv file mapping cell barcodes to clusters was additionally downloaded from the McCarroll lab website. Below we additionally annotate the cluster numbers into named cell types based on the information in Fig. 5D
suppressPackageStartupMessages(library(tidyverse))
suppressPackageStartupMessages(library(cowplot))
meta <- read_tsv("GSE63472_retina_clusteridentities.txt", col_names = c("CellID", "Cluster")) %>%
mutate(Category = case_when(
Cluster == 1 ~ "Horizontal cells",
Cluster == 2 ~ "Retinal ganglion cells",
Cluster %in% 3:23 ~ "Amacrine cells",
Cluster == 24 ~ "Rods",
Cluster == 25 ~ "Cones",
Cluster %in% 26:33 ~ "Bipolar cells",
Cluster == 34 ~ "Muller glia",
Cluster == 35 ~ "Astrocytes",
Cluster == 36 ~ "Fibroblasts",
Cluster == 37 ~ "Vascular endothelium",
Cluster == 38 ~ "Pericytes",
Cluster == 39 ~ "Microglia"
)
)
grep -E 'gene|IMPG1|IMPG2' GSE63472_P14Retina_merged_digital_expression.txt > GSE63472_P14Retina_merged_digital_expression_IMPG1-IMPG2.tsv
Only retain cells in named clusters
mouse.tbl <- read_tsv("GSE63472_P14Retina_merged_digital_expression_IMPG1-IMPG2.tsv", name_repair = "minimal") %>%
pivot_longer(cols=!gene,names_to="CellID",values_to="Expression") %>%
inner_join(meta,by="CellID") %>%
pivot_wider(names_from=gene,values_from=Expression)
p1 <- mouse.tbl %>%
group_by(Category) %>%
ggplot(aes(x=reorder(Category,-IMPG2),y=log10(IMPG1+0.1))) +
geom_boxplot(outlier.shape = NA) +
theme(axis.text.x = element_text(angle = 90, hjust = 1, vjust = 0.5),legend.position = c(0.7, 0.8)) +
xlab("Mouse retina cell types") +
ylab("log10 IMPG1 expression")
p2 <- mouse.tbl %>%
group_by(Category) %>%
ggplot(aes(x=reorder(Category,-IMPG2),y=log10(IMPG2+0.1))) +
geom_boxplot(outlier.shape = NA) +
theme(axis.text.x = element_text(angle = 90, hjust = 1, vjust = 0.5),legend.position = c(0.7, 0.8)) +
xlab("Mouse retina cell types") +
ylab("log10 IMPG2 expression")
plot_grid(p1,p2)
Version | Author | Date |
---|---|---|
146a845 | jeremymsimon | 2022-10-26 |
sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux 8.5 (Ootpa)
Matrix products: default
BLAS/LAPACK: /nas/longleaf/rhel8/apps/r/4.1.0/lib/libopenblas_haswellp-r0.3.5.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] cowplot_1.1.1 forcats_0.5.1 stringr_1.4.0 dplyr_1.0.9
[5] purrr_0.3.4 readr_2.1.2 tidyr_1.2.0 tibble_3.1.8
[9] ggplot2_3.3.6 tidyverse_1.3.1 workflowr_1.7.0
loaded via a namespace (and not attached):
[1] Rcpp_1.0.8.3 lubridate_1.8.0 getPass_0.2-2 ps_1.6.0
[5] assertthat_0.2.1 rprojroot_2.0.2 digest_0.6.29 utf8_1.2.2
[9] R6_2.5.1 cellranger_1.1.0 backports_1.4.1 reprex_2.0.1
[13] evaluate_0.15 highr_0.9 httr_1.4.2 pillar_1.7.0
[17] rlang_1.0.4 readxl_1.3.1 rstudioapi_0.13 whisker_0.4
[21] callr_3.7.0 jquerylib_0.1.4 rmarkdown_2.12 labeling_0.4.2
[25] bit_4.0.4 munsell_0.5.0 broom_1.0.0 compiler_4.1.0
[29] httpuv_1.6.5 modelr_0.1.8 xfun_0.30 pkgconfig_2.0.3
[33] htmltools_0.5.2 tidyselect_1.1.2 fansi_1.0.3 withr_2.5.0
[37] crayon_1.5.1 tzdb_0.2.0 dbplyr_2.1.1 later_1.3.0
[41] grid_4.1.0 jsonlite_1.8.0 gtable_0.3.0 lifecycle_1.0.1
[45] DBI_1.1.2 git2r_0.30.1 magrittr_2.0.2 scales_1.2.0
[49] vroom_1.5.7 cli_3.3.0 stringi_1.7.6 farver_2.1.0
[53] fs_1.5.2 promises_1.2.0.1 xml2_1.3.3 bslib_0.3.1
[57] ellipsis_0.3.2 generics_0.1.2 vctrs_0.4.1 tools_4.1.0
[61] bit64_4.0.5 glue_1.6.2 hms_1.1.1 parallel_4.1.0
[65] processx_3.5.2 fastmap_1.1.0 yaml_2.3.5 colorspace_2.0-3
[69] rvest_1.0.2 knitr_1.37 haven_2.4.3 sass_0.4.0