@@ -33,7 +33,7 @@ can be downloaded from the _seismic_ [zenodo data repository](https://zenodo.org
3333We will assume that users wanting to follow this tutorial have downloaded and unzipped the ` all_data ` folder
3434in before beginning.
3535
36- ``` {r show-only , eval=FALSE, echo=TRUE}
36+ ``` {r show-imports , eval=FALSE, echo=TRUE}
3737library(SingleCellExperiment)
3838library(dplyr)
3939library(magrittr)
@@ -48,7 +48,7 @@ and the number of genes expressed in each cell.
4848Some widely used metric to evaluate the data quality includes: sequencing depth,
4949number of genes detected, mitochondrial gene percentage, etc.
5050
51- ``` {r show-only, eval=FALSE, echo=TRUE}
51+ ``` {r eval=FALSE, echo=TRUE}
5252# check total counts
5353example_sce$tot_counts <- colSums(assay(example_sce, "counts"))
5454
@@ -64,7 +64,7 @@ In our data these genes are not present. Thus, we only filter cells based on the
6464Additionally, in this dataset we have cell type annotations - since these are an important part of detecting associations
6565we remove cells without such information.
6666
67- ``` {r show-only, eval=FALSE, echo=TRUE}
67+ ``` {r eval=FALSE, echo=TRUE}
6868# filter by total counts and detected genes
6969example_sce <- example_sce[, example_sce$tot_counts > 2000 & example_sce$detected_genes > 2000]
7070
@@ -93,7 +93,7 @@ example_sce
9393
9494We can also remove genes with low expression, since these genes are less likely to be informative for downstream analysis.
9595
96- ``` {r show-only, eval=FALSE, echo=TRUE}
96+ ``` {r eval=FALSE, echo=TRUE}
9797# number of cells expressing each gene
9898rowData(example_sce)$num_cells <- rowSums(assay(example_sce ,"counts") > 0)
9999
@@ -109,7 +109,7 @@ As recommended by [single-cell best practices](https://www.sc-best-practices.org
109109we then use [ scran] ( https://bioconductor.org/packages/release/bioc/html/scran.html ) to estimate the
110110per-cell normalization factor based on cell pooling.
111111
112- ``` {r show-only, eval=FALSE, echo=TRUE}
112+ ``` {r eval=FALSE, echo=TRUE}
113113library(scran)
114114
115115cell_pooling <- quickCluster(example_sce, assay.type = "counts")
@@ -126,7 +126,7 @@ example_sce <- logNormCounts(example_sce, size.factors = size_factor )
126126The _ seismic_ framework requires a column of cell metadata to specify the analysis granularity.
127127In our analysis we care about cell types and tissue-specific effects, so we combine them together.
128128
129- ``` {r show-only, eval=FALSE, echo=TRUE}
129+ ``` {r eval=FALSE, echo=TRUE}
130130example_sce$cell_type <- ifelse(!is.na(example_sce$free_annotation),
131131 paste0(example_sce$tissue,".",example_sce$free_annotation), paste0(example_sce$tissue,".",example_sce$cell_ontology_class))
132132```
@@ -139,7 +139,7 @@ _seismic_ analysis pipeline.
139139As a proof of concept we use the processed gene-level MAGMA z-scores for type 2 diabetes
140140included in the _ seismic_ package.
141141
142- ``` {r show-only, eval=FALSE, echo=TRUE}
142+ ``` {r eval=FALSE, echo=TRUE}
143143library(seismicGWAS)
144144
145145# calculate specificity score
0 commit comments