Skip to content

Commit

Permalink
Merge branch 'develop' into seurat5
Browse files Browse the repository at this point in the history
  • Loading branch information
timoast committed Oct 17, 2023
2 parents 1b68a5c + eecc56f commit 847e4dc
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 4 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: Signac
Title: Analysis of Single-Cell Chromatin Data
Version: 1.11.9000
Date: 2023-09-20
Version: 1.12.9000
Date: 2023-10-13
Authors@R: c(
person(given = 'Tim', family = 'Stuart', email = '[email protected]', role = c('aut', 'cre'), comment = c(ORCID = '0000-0002-3044-0897')),
person(given = 'Avi', family = 'Srivastava', email = '[email protected]', role = 'aut', comment = c(ORCID = '0000-0001-9798-2079')),
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Unreleased
# Signac 1.11.0

Bug fixes:

Expand Down
11 changes: 11 additions & 0 deletions vignettes/data_structures.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,17 @@ packages. Position frequency matrices for motifs can be loaded using the
or the [chromVARmotifs](https://github.com/GreenleafLab/chromVARmotifs) package.
For example:

```{r include=FALSE}
if (!requireNamespace("JASPAR2020", quietly = TRUE))
BiocManager::install("JASPAR2020")
if (!requireNamespace("TFBSTools", quietly = TRUE))
BiocManager::install("TFBSTools")
if (!requireNamespace("motifmatchr", quietly = TRUE))
BiocManager::install("motifmatchr")
if (!requireNamespace("BSgenome.Hsapiens.UCSC.hg19", quietly = TRUE))
BiocManager::install("BSgenome.Hsapiens.UCSC.hg19")
```

```{r message=FALSE, warning=FALSE}
library(JASPAR2020)
library(TFBSTools)
Expand Down
14 changes: 13 additions & 1 deletion vignettes/pbmc_multiomic.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,26 @@ peaks <- CallPeaks(pbmc)
# remove peaks on nonstandard chromosomes and in genomic blacklist regions
peaks <- keepStandardChromosomes(peaks, pruning.mode = "coarse")
peaks <- subsetByOverlaps(x = peaks, ranges = blacklist_hg38_unified, invert = TRUE)
```

```{r include=FALSE}
gc()
```

```{r message=FALSE, warning=FALSE}
# quantify counts in each peak
macs2_counts <- FeatureMatrix(
fragments = Fragments(pbmc),
features = peaks,
cells = colnames(pbmc)
)
```

```{r include=FALSE}
gc()
```

```{r}
# create a new assay using the MACS2 peak set and add it to the Seurat object
pbmc[["peaks"]] <- CreateChromatinAssay(
counts = macs2_counts,
Expand Down Expand Up @@ -189,7 +201,7 @@ Installation instructions for SeuratDisk can be found [here](https://github.com/
library(SeuratDisk)
# load PBMC reference
reference <- LoadH5Seurat("../vignette_data/multiomic/pbmc_multimodal.h5seurat")
reference <- LoadH5Seurat("../vignette_data/multiomic/pbmc_multimodal.h5seurat", assays = list("SCT" = "counts"), reductions = 'spca')
reference <- UpdateSeuratObject(reference)
DefaultAssay(pbmc) <- "SCT"
Expand Down

0 comments on commit 847e4dc

Please sign in to comment.