---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# smokingMouse
[](https://github.com/LieberInstitute/smokingMouse/issues)
[](https://github.com/LieberInstitute/smokingMouse/pulls)
[](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[](https://bioconductor.org/checkResults/release/data-experiment-LATEST/smokingMouse)
[](https://bioconductor.org/checkResults/devel/data-experiment-LATEST/smokingMouse)
[](http://bioconductor.org/packages/stats/bioc/smokingMouse/)
[](https://support.bioconductor.org/tag/smokingMouse)
[](http://bioconductor.org/checkResults/devel/data-experiment-LATEST/smokingMouse/)
[](https://bioconductor.org/packages/release/bioc/html/smokingMouse.html#since)
[](https://github.com/LieberInstitute/smokingMouse/actions/workflows/R-CMD-check-bioc.yaml)
Welcome to the `smokingMouse` project! Here you are able to access the mouse and human datasets used for the analysis of the smoking mouse LIBD project.
## Overview
This bulk RNA-sequencing project consisted of a differential expression analysis (DEA) involving 4 data types: genes, exons, transcripts and junctions. The main goal of this study was to explore the effects of prenatal exposure to maternal smoking and nicotine exposures on the developing mouse brain. As secondary objectives, this work evaluated: 1) the affected genes by each exposure on the adult female brain in order to compare offspring and adult results and 2) the effects of smoking on adult blood and brain to search for overlapping biomarkers in both tissues. Finally, DEGs identified in mice were compared against previously published results from a human study (Semick, S.A. et al. (2018)).
The next table summarizes the analyses done at each level.
Table 1: 1. Data preparation: in this first step, counts of genes, exons and junctions were normalized to CPM and scaled; transcript expression values were only scaled since they were already in TMP. Then, low-expression features were removed using the indicated methods and samples were separated by tissue and age in order to create subsets of the data for downstream analyses. 2. Exploratory Data Analysis: QC metrics of the samples were examined and used to filter them; sample level effects were explored through dimensionality reduction methods and rare samples in PCA plots were manually removed from the datasets; gene level effects were evaluated with analyses of explanatory variables and variance partition. 3. Differential Expression Analysis: with the relevant variables identified in the previous steps, the DEA was performed at the gene level for nicotine and smoking, adult and pup, and blood and brain samples, and for 3 models: the naive one modeled ~Group + batch effects, the adjusted model modeled ~Group + Pregnancy + batch effects for adults and ~Group + Sex + batch effects for pups, and the interaction model ~Group\*Pregnancy + batch effects for adults and ~Group*Sex + batch effects for pups; DEA on the rest of the levels was performed for pups only and using the adjusted model. After that, signals of the features in nicotine and smoking were compared, as well as the signals of exons and txs vs the effects of their genes, and genes’ signals were additionally compared in the different tissues, ages, models and species (vs human data of a previous study). All resultant DEG and DE features (and their genes) were quantified and compared based on their experiment (nic/smo) and direction of regulation (up/down); DEG were further compared against genes of DE exons and txs; mouse genes were also compared with human genes affected by cigarette smoke or associated with TUD. 4. Gene Ontology and KEGG: taking the DEG and the genes of DE txs and exons, GO & KEGG analyses were done and the expression levels of genes that participate in brain development related processes were explored. 5. DE feature visualization: DEG counts were represented in heatmaps in order to distinguish the groups of up and down-regulated genes. 6. Junction annotation: for novel DE jxns of unknown gene, their nearest, preceding and following genes were determined.
Abbreviations: Jxn: junction; Tx: transcript; CPM: counts per million; TPM: transcripts per million; TMM: Trimmed Mean of M-Values; TMMwsp: TMM with singleton pairing; EDA: exploratory data analysis; QC: quality control; ribo: ribosomal; mt: mitochondrial; PCA: Principal Component Analysis; PC: principal component; MDS: Multidimensional Scaling; DEA: differential expression analysis; DE: differential expression/differentially expressed; DEG: differentially expressed genes; GO: Gene Ontology; KEGG: Kyoto Encyclopedia of Genes and Genomes; TUD: tobacco use disorder.
## Study design
Figure 1: Experimental design of the study. A) 36 pregnant dams and 35 non-pregnant female adult mice were either administered nicotine by intraperitoneal injection (IP; n=12), exposed to cigarette smoke in smoking chambers (n=24), or controls (n=35; 11 nicotine controls and 24 smoking controls). A total of 137 pups were born to pregnant dams: 19 were born to mice that were administered nicotine, 46 to mice exposed to cigarette smoke and the remaining 72 to control mice (23 to nicotine controls and 49 to smoking controls). Samples from frontal cortices of P0 pups and adults were obtained, as well as blood samples from smoking-exposed and smoking control adults. B) RNA was extracted, RNA-seq libraries were prepared and sequenced to obtain expression counts for genes, exons, transcripts and exon-exon junctions.
## smoking Mouse datasets
The mouse datasets contain the following data in a single object for each feature (genes, exons, transcripts and exon-exon junctions):
* **Raw data**: original read counts of the features, also including the original information of features and samples.
* **Processed data**: normalized and scaled counts of the same features. In addition to the feature and sample information, the datasets contain information of which ones were used in downstream analyses (the ones that passed filtering steps) and which features were DE in the different experiments.
Moreover, you can find human data generated by Semick, S.A. et al. (2018) in Mol Psychiatry, DOI: https://doi.org/10.1038/s41380-018-0223-1, that contain the results of a DEA in adult and prenatal human brain samples exposed to cigarette smoke.
## Data specifics
* *'rse_gene_mouse_RNAseq_nic-smo.Rdata'*: (rse_gene object) the gene RSE object contains raw and normalized expression data of 55401 mouse genes across 208 samples from brains and blood of healthy and nicotine/smoking-exposed pup and adult mice.
* *'rse_tx_mouse_RNAseq_nic-smo.Rdata'*: (rse_tx object) the tx RSE object contains raw and normalized expression data of 142604 mouse transcripts across 208 samples from brains and blood of healthy and nicotine/smoking-exposed pup and adult mice.
* *'rse_exon_mouse_RNAseq_nic-smo.Rdata'*: (rse_exon object) the exon RSE object contains raw and normalized expression data of 447670 mouse exons across 208 samples from brains and blood of healthy and nicotine/smoking-exposed pup and adult mice.
* *'rse_jx_mouse_RNAseq_nic-smo.Rdata'*: (rse_jx object) the jx RSE object contains raw and normalized expression data of 1436068 mouse exon-exon junctions across 208 samples from brains and blood of healthy and nicotine/smoking-exposed pup and adult mice.
All the above datasets contain sample and feature information and additional data of the results obtained in the filtering steps and the DEA.
* *'de_genes_prenatal_human_brain_smoking.Rdata'*: (object with the same name) data frame with DE (ctrls vs smoking-exposed samples) data of 18067 genes in human prenatal brain samples exposed to cigarette smoke.
* *'de_genes_adult_human_brain_smoking.Rdata'*: (object with the same name) data frame with DE (ctrls vs smoking-exposed samples) data of 18067 genes in human adult brain samples exposed to cigarette smoke.
## R/Bioconductor package
The `smokingMouse` package contains functions for:
* Accessing the expression data from the LIBD smoking Mouse project ([code on GitHub](https://github.com/LieberInstitute/smokingMouse_Indirects)). The datasets are retrieved from [Bioconductor](http://bioconductor.org/)'s `ExperimentHub`.
## Installation instructions
Get the latest stable `R` release from [CRAN](http://cran.r-project.org/). Then install `smokingMouse` from [Bioconductor](http://bioconductor.org/) using the following code:
```{r 'install', eval = FALSE}
if (!requireNamespace("BiocManager", quietly = TRUE)) {
install.packages("BiocManager")
}
BiocManager::install("smokingMouse")
```
And the development version from [GitHub](https://github.com/LieberInstitute/smokingMouse) with:
```{r 'install_dev', eval = FALSE}
BiocManager::install("LieberInstitute/smokingMouse")
```
## Example of how to access the data
Through the `smokingMouse` package you can access the mouse datasets of the project that include the raw and processed data.
Below there's code you can use to access the gene data but can do the same for any of the datasets. For more details, check the documentation for `RangedSummarizedExperiment` objects.
You can also find code to access human data.
```{r 'experiment_hub'}
## Connect to ExperimentHub
library(ExperimentHub)
eh <- ExperimentHub::ExperimentHub()
```
```{r 'access_data', message=FALSE, fig.height = 8, fig.width = 9}
## Load the datasets of the package
myfiles <- query(eh, "smokingMouse")
########################
# Mouse data
########################
## Download the mouse gene data
rse_gene <- myfiles[['EH8313']]
## This is a RangedSummarizedExperiment object
rse_gene
## Check sample info
colData(rse_gene)[1:5, 1:5]
## Check gene info
rowData(rse_gene)[1:5, 1:5]
## Access the original counts
original_counts <- assays(rse_gene)$counts
## Access the log normalized counts
logcounts <- assays(rse_gene)$logcounts
########################
# Human data
########################
## Download the human gene data
de_genes_prenatal_human_brain_smoking <- myfiles[['EH8317']]
## This is a data frame
de_genes_prenatal_human_brain_smoking[1:5, ]
## Access data of human genes as normally do with data frames
```
## Citation
Below is the citation output from using `citation('smokingMouse')` in R. Please run this yourself to check for any updates on how to cite __smokingMouse__.
```{r 'citation', eval = requireNamespace('smokingMouse')}
print(citation('smokingMouse'), bibtex = TRUE)
#>
#> To cite the original work from which human data come please use the following citation:
#>
#> Semick, S. A., Collado-Torres, L., Markunas, C. A., Shin, J. H., Deep-Soboslay, A., Tao, R., ...
#> & Jaffe, A. E. (2020). Developmental effects of maternal smoking during pregnancy on the human
#> frontal cortex transcriptome. Molecular psychiatry, 25(12), 3267-3277.
#>
```
Please note that the `smokingMouse` and the [smoking mouse](https://github.com/LieberInstitute/smokingMouse_Indirects) project were only made possible thanks to many other R and bioinformatics software authors, which are cited either in the vignettes and/or the paper(s) describing this package.
## Code of Conduct
Please note that the `smokingMouse` project is released with a [Contributor Code of Conduct](http://bioconductor.org/about/code-of-conduct/). By contributing to this project, you agree to abide by its terms.
## Development tools
* Continuous code testing is possible thanks to [GitHub actions](https://www.tidyverse.org/blog/2020/04/usethis-1-6-0/) through `r BiocStyle::CRANpkg('usethis')`, `r BiocStyle::CRANpkg('remotes')`, and `r BiocStyle::CRANpkg('rcmdcheck')` customized to use [Bioconductor's docker containers](https://www.bioconductor.org/help/docker/) and `r BiocStyle::Biocpkg('BiocCheck')`.
* Code coverage assessment is possible thanks to [codecov](https://codecov.io/gh) and `r BiocStyle::CRANpkg('covr')`.
* The [documentation website](http://LieberInstitute.github.io/smokingMouse) is automatically updated thanks to `r BiocStyle::CRANpkg('pkgdown')`.
* The code is styled automatically thanks to `r BiocStyle::CRANpkg('styler')`.
* The documentation is formatted thanks to `r BiocStyle::CRANpkg('devtools')` and `r BiocStyle::CRANpkg('roxygen2')`.
For more details, check the `dev` directory.
This package was developed using `r BiocStyle::Biocpkg('biocthis')`.