Skip to content

Commit fa23843

Browse files
committed
Merge branch 'develop'
2 parents 458e647 + 8c377b3 commit fa23843

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+680
-369
lines changed

.Rbuildignore

+1
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ index.*
1717
Dockerfile
1818
^CRAN-RELEASE$
1919
benchmark/
20+
.dockerignore

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
name: "\U0001F4DADocumentation"
3-
about: An issue related to https://satijalab.org/signac/
3+
about: An issue related to Signac documentation
44
title: ''
55
labels: documentation
66
assignees: ''
77

88
---
99

10-
<!-- A clear description of what content at https://satijalab.org/signac or in the Signac function man pages is an issue. -->
10+
<!-- A clear description of what content at the Signac website or in the Signac function man pages is an issue. -->

.github/ISSUE_TEMPLATE/bug_report.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ assignees: ''
77

88
---
99

10-
<!-- Briefly describe your problem and what output you expect. If you have a question, please use the analysis question template instead. -->
10+
<!-- Briefly describe your problem and what output you expect. If you have a question, please open a discussion topic instead. -->
1111

1212
<!-- Before posting an issue, ensure that the bug is reproducible by re-running the code that produced the issue in a new R session.-->
1313

DESCRIPTION

+12-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: Signac
22
Title: Analysis of Single-Cell Chromatin Data
3-
Version: 1.6.0
4-
Date: 2022-03-04
3+
Version: 1.7.0
4+
Date: 2022-05-31
55
Authors@R: c(
66
person(given = 'Tim', family = 'Stuart', email = '[email protected]', role = c('aut', 'cre'), comment = c(ORCID = '0000-0002-3044-0897')),
77
person(given = 'Avi', family = 'Srivastava', email = '[email protected]', role = 'aut', comment = c(ORCID = '0000-0001-9798-2079')),
@@ -24,38 +24,33 @@ URL: https://github.com/timoast/signac, https://satijalab.org/signac
2424
BugReports: https://github.com/timoast/signac/issues
2525
LinkingTo: Rcpp
2626
Imports:
27-
GenomeInfoDb,
27+
GenomeInfoDb (>= 1.29.3),
2828
GenomicRanges,
2929
IRanges,
3030
Matrix,
3131
Rsamtools,
3232
S4Vectors,
33-
Seurat (>= 4.0.6),
3433
SeuratObject (>= 4.0.0),
3534
data.table,
3635
dplyr (>= 1.0.0),
3736
future,
3837
future.apply,
3938
ggplot2,
40-
ggseqlogo,
4139
irlba,
4240
pbapply,
4341
tidyr,
4442
patchwork,
4543
stats,
4644
utils,
4745
BiocGenerics,
48-
ggrepel,
4946
stringi,
5047
fastmatch,
51-
lsa,
5248
RcppRoll,
5349
scales,
5450
Rcpp,
55-
ggforce,
56-
qlcMatrix,
5751
grid,
58-
tidyselect
52+
tidyselect,
53+
vctrs
5954
Collate:
6055
'RcppExports.R'
6156
'data.R'
@@ -80,6 +75,10 @@ Collate:
8075
'visualization.R'
8176
'zzz.R'
8277
Suggests:
78+
Seurat (>= 4.0.6),
79+
ggforce,
80+
ggrepel,
81+
ggseqlogo,
8382
testthat (>= 2.1.0),
8483
chromVAR,
8584
SummarizedExperiment,
@@ -90,4 +89,6 @@ Suggests:
9089
miniUI,
9190
rtracklayer,
9291
biovizBase,
93-
Biostrings
92+
Biostrings,
93+
lsa,
94+
qlcMatrix

Dockerfile

+2-13
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
11
FROM satijalab/seurat:latest
22

3-
# Install system dependencies
43
RUN apt-get update --fix-missing \
5-
&& apt-get install -y software-properties-common \
6-
&& add-apt-repository -y ppa:git-core/ppa \
7-
&& apt-get update \
8-
&& apt-get install -y git libbz2-dev liblzma-dev
9-
10-
# Install Bioconductor dependencies
11-
12-
RUN R --slave --no-restore --no-save -e "install.packages('BiocManager'); BiocManager::install(c('GenomeInfoDbData', 'GO.db'))"
13-
14-
# Install Signac
15-
16-
RUN R --slave --no-restore --no-save -e "setRepositories(ind=1:2); install.packages('Signac', repos = c('https://cloud.r-project.org', 'https://bioconductor.org/packages/3.13/bioc'),dependencies = TRUE)"
4+
&& apt-get install -y libbz2-dev liblzma-dev \
5+
&& R --slave --no-restore --no-save -e "options(repos=c(CRAN='https://cloud.r-project.org')); setRepositories(ind=1:3); install.packages('Signac', dependencies = TRUE)"
176

187
CMD [ "R" ]

NAMESPACE

+19-29
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ S3method("Links<-",Seurat)
1010
S3method("Motifs<-",ChromatinAssay)
1111
S3method("Motifs<-",Seurat)
1212
S3method("[",Motif)
13+
S3method(AddMotifs,Assay)
1314
S3method(AddMotifs,ChromatinAssay)
1415
S3method(AddMotifs,Seurat)
1516
S3method(AddMotifs,default)
@@ -29,14 +30,14 @@ S3method(CallPeaks,Fragment)
2930
S3method(CallPeaks,Seurat)
3031
S3method(CallPeaks,default)
3132
S3method(Cells,Fragment)
33+
S3method(ConvertMotifID,Assay)
3234
S3method(ConvertMotifID,ChromatinAssay)
3335
S3method(ConvertMotifID,Motif)
3436
S3method(ConvertMotifID,Seurat)
3537
S3method(ConvertMotifID,default)
3638
S3method(FindTopFeatures,Assay)
3739
S3method(FindTopFeatures,Seurat)
3840
S3method(FindTopFeatures,default)
39-
S3method(FoldChange,ChromatinAssay)
4041
S3method(Footprint,ChromatinAssay)
4142
S3method(Footprint,Seurat)
4243
S3method(Fragments,ChromatinAssay)
@@ -122,7 +123,6 @@ export(FilterCells)
122123
export(FindClonotypes)
123124
export(FindMotifs)
124125
export(FindTopFeatures)
125-
export(FoldChange)
126126
export(Footprint)
127127
export(FractionCountsInRegion)
128128
export(FragmentHistogram)
@@ -209,7 +209,7 @@ exportMethods(seqnames)
209209
import(data.table)
210210
import(patchwork)
211211
importClassesFrom(Matrix,dgCMatrix)
212-
importClassesFrom(Seurat,Assay)
212+
importClassesFrom(SeuratObject,Assay)
213213
importFrom(BiocGenerics,end)
214214
importFrom(BiocGenerics,sort)
215215
importFrom(BiocGenerics,start)
@@ -292,28 +292,22 @@ importFrom(S4Vectors,mcols)
292292
importFrom(S4Vectors,queryHits)
293293
importFrom(S4Vectors,split)
294294
importFrom(S4Vectors,subjectHits)
295-
importFrom(Seurat,"Idents<-")
296-
importFrom(Seurat,"VariableFeatures<-")
297-
importFrom(Seurat,AddMetaData)
298-
importFrom(Seurat,Cells)
299-
importFrom(Seurat,CreateAssayObject)
300-
importFrom(Seurat,CreateDimReducObject)
301-
importFrom(Seurat,DefaultAssay)
302-
importFrom(Seurat,Embeddings)
303-
importFrom(Seurat,FindClusters)
304-
importFrom(Seurat,FindNeighbors)
305-
importFrom(Seurat,FoldChange)
306-
importFrom(Seurat,GetAssay)
307-
importFrom(Seurat,GetAssayData)
308-
importFrom(Seurat,Idents)
309-
importFrom(Seurat,Project)
310-
importFrom(Seurat,RenameCells)
311-
importFrom(Seurat,RowMergeSparseMatrices)
312-
importFrom(Seurat,SetAssayData)
313-
importFrom(Seurat,SetQuantile)
314-
importFrom(Seurat,VariableFeatures)
315-
importFrom(Seurat,WhichCells)
295+
importFrom(SeuratObject,"Idents<-")
296+
importFrom(SeuratObject,"VariableFeatures<-")
297+
importFrom(SeuratObject,AddMetaData)
316298
importFrom(SeuratObject,Cells)
299+
importFrom(SeuratObject,CreateAssayObject)
300+
importFrom(SeuratObject,CreateDimReducObject)
301+
importFrom(SeuratObject,DefaultAssay)
302+
importFrom(SeuratObject,Embeddings)
303+
importFrom(SeuratObject,GetAssayData)
304+
importFrom(SeuratObject,Idents)
305+
importFrom(SeuratObject,Project)
306+
importFrom(SeuratObject,RenameCells)
307+
importFrom(SeuratObject,RowMergeSparseMatrices)
308+
importFrom(SeuratObject,SetAssayData)
309+
importFrom(SeuratObject,VariableFeatures)
310+
importFrom(SeuratObject,WhichCells)
317311
importFrom(dplyr,group_by)
318312
importFrom(dplyr,mutate)
319313
importFrom(dplyr,slice_sample)
@@ -323,7 +317,6 @@ importFrom(dplyr,ungroup)
323317
importFrom(fastmatch,fmatch)
324318
importFrom(future,nbrOfWorkers)
325319
importFrom(future.apply,future_lapply)
326-
importFrom(ggforce,geom_bezier)
327320
importFrom(ggplot2,aes)
328321
importFrom(ggplot2,aes_string)
329322
importFrom(ggplot2,element_blank)
@@ -367,11 +360,8 @@ importFrom(ggplot2,xlab)
367360
importFrom(ggplot2,xlim)
368361
importFrom(ggplot2,ylab)
369362
importFrom(ggplot2,ylim)
370-
importFrom(ggrepel,geom_label_repel)
371-
importFrom(ggseqlogo,ggseqlogo)
372363
importFrom(grid,arrow)
373364
importFrom(irlba,irlba)
374-
importFrom(lsa,cosine)
375365
importFrom(methods,"slot<-")
376366
importFrom(methods,as)
377367
importFrom(methods,callGeneric)
@@ -387,7 +377,6 @@ importFrom(patchwork,guide_area)
387377
importFrom(patchwork,plot_layout)
388378
importFrom(patchwork,wrap_plots)
389379
importFrom(pbapply,pblapply)
390-
importFrom(qlcMatrix,corSparse)
391380
importFrom(scales,comma)
392381
importFrom(scales,hue_pal)
393382
importFrom(stats,approx)
@@ -397,6 +386,7 @@ importFrom(stats,dist)
397386
importFrom(stats,ecdf)
398387
importFrom(stats,hclust)
399388
importFrom(stats,median)
389+
importFrom(stats,p.adjust)
400390
importFrom(stats,phyper)
401391
importFrom(stats,pnorm)
402392
importFrom(stats,sd)

NEWS.md

+29
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
# Signac 1.7.0
2+
3+
New functionality:
4+
5+
* Added `method` parameter to `LinkPeaks()` ([@saketkc](https://github.com/saketkc); [#1030](https://github.com/timoast/signac/pull/1030))
6+
* Added ability to plot transcript isoforms (set `annotation="transcript"` in `CoveragePlot()`)
7+
* Added multiple testing correction to `FindMotifs()`, and new `p.adjust` column in output dataframe
8+
* Added `p.adjust.method` parameter to `FindMotifs()` to control multiple testing correction method used
9+
10+
Bug fixes:
11+
12+
* Fixed bug in `CallPeaks()` when project name contained whitespace ([#981](https://github.com/timoast/signac/issues/981))
13+
* Fixed bug in `CoveragePlot()` when `tile=TRUE`
14+
* Fixed bug in `InsertionBias()` that set the coordinates beyond the end of some chromosomes ([#986](https://github.com/timoast/signac/issues/986))
15+
* Fixed bug in `BigwigTrack()` when supplying a single bigwig file ([#1053](https://github.com/timoast/signac/issues/1053))
16+
* Fixed bug in `GeneActivity()` when specifying biotypes ([#1058](https://github.com/timoast/signac/issues/1058))
17+
* Fixed bug in `GeneActivity()` when gene name is an empty string ([#1055](https://github.com/timoast/signac/issues/1055))
18+
* Fixed bug in `FeatureMatrix()` when using list of Fragment objects ([#1056](https://github.com/timoast/signac/issues/1056))
19+
* Fixed bug in `RegionMatrix()` when running on objects containing renamed cells ([#1076](https://github.com/timoast/signac/issues/1076))
20+
* Fixed bug in `Footprint()` when using a FASTA file ([#1092](https://github.com/timoast/signac/issues/1092))
21+
* Fixed bug in `Footprint()` when using list of genomic regions ([#1098](https://github.com/timoast/signac/issues/1098))
22+
* Add check for invalid features in `FindMotifs()` ([#1109](https://github.com/timoast/signac/issues/1109))
23+
24+
Other changes:
25+
26+
* Improved error message when no fragment file is supplied in `CallPeaks()` ([#1062](https://github.com/timoast/signac/issues/1062))
27+
* Moved `Seurat`, `ggforce`, `ggrepel`, `ggseqlogo`, `lsa`, `qlcMatrix` to suggested packages
28+
* Added progress bar to `GetGRangesFromEnsDb()`
29+
130
# Signac 1.6.0
231

332
New functionality:

R/differential_accessibility.R

+6-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
# Re-export Seurat generic
2-
#' @importFrom Seurat FoldChange
3-
#' @export
4-
Seurat::FoldChange
5-
6-
#' @rdname FoldChange
7-
#' @export
1+
# dynamically exported, see zzz.R
82
#' @method FoldChange ChromatinAssay
9-
#' @importFrom Seurat FoldChange GetAssayData
3+
#' @importFrom SeuratObject GetAssayData
104
#' @importFrom Matrix rowMeans
115
FoldChange.ChromatinAssay <- function(
126
object,
@@ -20,6 +14,9 @@ FoldChange.ChromatinAssay <- function(
2014
base = 2,
2115
...
2216
) {
17+
if (!requireNamespace(package = "Seurat", quietly = TRUE)) {
18+
stop("Please install Seurat: install.packages('Seurat')")
19+
}
2320
mean.fxn <- function(x) {
2421
return(log(x = rowMeans(x = x) + pseudocount.use, base = base))
2522
}
@@ -31,7 +28,7 @@ FoldChange.ChromatinAssay <- function(
3128
)
3229
fc.name <- SetIfNull(x = fc.name, y = paste0("avg_log", base.text, "FC"))
3330
data <- GetAssayData(object = object, slot = slot)
34-
FoldChange(
31+
Seurat::FoldChange(
3532
object = data,
3633
cells.1 = cells.1,
3734
cells.2 = cells.2,

R/dimension_reduction.R

+3-3
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Jaccard <- function(x, y) {
5656
#'
5757
#' @importFrom irlba irlba
5858
#' @importFrom stats sd
59-
#' @importFrom Seurat CreateDimReducObject
59+
#' @importFrom SeuratObject CreateDimReducObject
6060
#' @importMethodsFrom Matrix t
6161
#'
6262
#' @rdname RunSVD
@@ -120,7 +120,7 @@ RunSVD.default <- function(
120120
#' @param features Which features to use. If NULL, use variable features
121121
#'
122122
#' @rdname RunSVD
123-
#' @importFrom Seurat VariableFeatures GetAssayData
123+
#' @importFrom SeuratObject VariableFeatures GetAssayData
124124
#' @export
125125
#' @concept dimension_reduction
126126
#' @method RunSVD Assay
@@ -174,7 +174,7 @@ RunSVD.Seurat <- function(
174174
...
175175
) {
176176
assay <- SetIfNull(x = assay, y = DefaultAssay(object = object))
177-
assay.data <- GetAssay(object = object, assay = assay)
177+
assay.data <- object[[assay]]
178178
reduction.data <- RunSVD(
179179
object = assay.data,
180180
assay = assay,

0 commit comments

Comments
 (0)