Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
timoast committed Jun 1, 2022
2 parents 458e647 + 8c377b3 commit fa23843
Show file tree
Hide file tree
Showing 58 changed files with 680 additions and 369 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ index.*
Dockerfile
^CRAN-RELEASE$
benchmark/
.dockerignore
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/--documentation.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
name: "\U0001F4DADocumentation"
about: An issue related to https://satijalab.org/signac/
about: An issue related to Signac documentation
title: ''
labels: documentation
assignees: ''

---

<!-- A clear description of what content at https://satijalab.org/signac or in the Signac function man pages is an issue. -->
<!-- A clear description of what content at the Signac website or in the Signac function man pages is an issue. -->
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ assignees: ''

---

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

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

Expand Down
23 changes: 12 additions & 11 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.6.0
Date: 2022-03-04
Version: 1.7.0
Date: 2022-05-31
Authors@R: c(
person(given = 'Tim', family = 'Stuart', email = 'tstuart@nygenome.org', role = c('aut', 'cre'), comment = c(ORCID = '0000-0002-3044-0897')),
person(given = 'Avi', family = 'Srivastava', email = 'asrivastava@nygenome.org', role = 'aut', comment = c(ORCID = '0000-0001-9798-2079')),
Expand All @@ -24,38 +24,33 @@ URL: https://github.com/timoast/signac, https://satijalab.org/signac
BugReports: https://github.com/timoast/signac/issues
LinkingTo: Rcpp
Imports:
GenomeInfoDb,
GenomeInfoDb (>= 1.29.3),
GenomicRanges,
IRanges,
Matrix,
Rsamtools,
S4Vectors,
Seurat (>= 4.0.6),
SeuratObject (>= 4.0.0),
data.table,
dplyr (>= 1.0.0),
future,
future.apply,
ggplot2,
ggseqlogo,
irlba,
pbapply,
tidyr,
patchwork,
stats,
utils,
BiocGenerics,
ggrepel,
stringi,
fastmatch,
lsa,
RcppRoll,
scales,
Rcpp,
ggforce,
qlcMatrix,
grid,
tidyselect
tidyselect,
vctrs
Collate:
'RcppExports.R'
'data.R'
Expand All @@ -80,6 +75,10 @@ Collate:
'visualization.R'
'zzz.R'
Suggests:
Seurat (>= 4.0.6),
ggforce,
ggrepel,
ggseqlogo,
testthat (>= 2.1.0),
chromVAR,
SummarizedExperiment,
Expand All @@ -90,4 +89,6 @@ Suggests:
miniUI,
rtracklayer,
biovizBase,
Biostrings
Biostrings,
lsa,
qlcMatrix
15 changes: 2 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
FROM satijalab/seurat:latest

# Install system dependencies
RUN apt-get update --fix-missing \
&& apt-get install -y software-properties-common \
&& add-apt-repository -y ppa:git-core/ppa \
&& apt-get update \
&& apt-get install -y git libbz2-dev liblzma-dev

# Install Bioconductor dependencies

RUN R --slave --no-restore --no-save -e "install.packages('BiocManager'); BiocManager::install(c('GenomeInfoDbData', 'GO.db'))"

# Install Signac

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)"
&& apt-get install -y libbz2-dev liblzma-dev \
&& 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)"

CMD [ "R" ]
48 changes: 19 additions & 29 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ S3method("Links<-",Seurat)
S3method("Motifs<-",ChromatinAssay)
S3method("Motifs<-",Seurat)
S3method("[",Motif)
S3method(AddMotifs,Assay)
S3method(AddMotifs,ChromatinAssay)
S3method(AddMotifs,Seurat)
S3method(AddMotifs,default)
Expand All @@ -29,14 +30,14 @@ S3method(CallPeaks,Fragment)
S3method(CallPeaks,Seurat)
S3method(CallPeaks,default)
S3method(Cells,Fragment)
S3method(ConvertMotifID,Assay)
S3method(ConvertMotifID,ChromatinAssay)
S3method(ConvertMotifID,Motif)
S3method(ConvertMotifID,Seurat)
S3method(ConvertMotifID,default)
S3method(FindTopFeatures,Assay)
S3method(FindTopFeatures,Seurat)
S3method(FindTopFeatures,default)
S3method(FoldChange,ChromatinAssay)
S3method(Footprint,ChromatinAssay)
S3method(Footprint,Seurat)
S3method(Fragments,ChromatinAssay)
Expand Down Expand Up @@ -122,7 +123,6 @@ export(FilterCells)
export(FindClonotypes)
export(FindMotifs)
export(FindTopFeatures)
export(FoldChange)
export(Footprint)
export(FractionCountsInRegion)
export(FragmentHistogram)
Expand Down Expand Up @@ -209,7 +209,7 @@ exportMethods(seqnames)
import(data.table)
import(patchwork)
importClassesFrom(Matrix,dgCMatrix)
importClassesFrom(Seurat,Assay)
importClassesFrom(SeuratObject,Assay)
importFrom(BiocGenerics,end)
importFrom(BiocGenerics,sort)
importFrom(BiocGenerics,start)
Expand Down Expand Up @@ -292,28 +292,22 @@ importFrom(S4Vectors,mcols)
importFrom(S4Vectors,queryHits)
importFrom(S4Vectors,split)
importFrom(S4Vectors,subjectHits)
importFrom(Seurat,"Idents<-")
importFrom(Seurat,"VariableFeatures<-")
importFrom(Seurat,AddMetaData)
importFrom(Seurat,Cells)
importFrom(Seurat,CreateAssayObject)
importFrom(Seurat,CreateDimReducObject)
importFrom(Seurat,DefaultAssay)
importFrom(Seurat,Embeddings)
importFrom(Seurat,FindClusters)
importFrom(Seurat,FindNeighbors)
importFrom(Seurat,FoldChange)
importFrom(Seurat,GetAssay)
importFrom(Seurat,GetAssayData)
importFrom(Seurat,Idents)
importFrom(Seurat,Project)
importFrom(Seurat,RenameCells)
importFrom(Seurat,RowMergeSparseMatrices)
importFrom(Seurat,SetAssayData)
importFrom(Seurat,SetQuantile)
importFrom(Seurat,VariableFeatures)
importFrom(Seurat,WhichCells)
importFrom(SeuratObject,"Idents<-")
importFrom(SeuratObject,"VariableFeatures<-")
importFrom(SeuratObject,AddMetaData)
importFrom(SeuratObject,Cells)
importFrom(SeuratObject,CreateAssayObject)
importFrom(SeuratObject,CreateDimReducObject)
importFrom(SeuratObject,DefaultAssay)
importFrom(SeuratObject,Embeddings)
importFrom(SeuratObject,GetAssayData)
importFrom(SeuratObject,Idents)
importFrom(SeuratObject,Project)
importFrom(SeuratObject,RenameCells)
importFrom(SeuratObject,RowMergeSparseMatrices)
importFrom(SeuratObject,SetAssayData)
importFrom(SeuratObject,VariableFeatures)
importFrom(SeuratObject,WhichCells)
importFrom(dplyr,group_by)
importFrom(dplyr,mutate)
importFrom(dplyr,slice_sample)
Expand All @@ -323,7 +317,6 @@ importFrom(dplyr,ungroup)
importFrom(fastmatch,fmatch)
importFrom(future,nbrOfWorkers)
importFrom(future.apply,future_lapply)
importFrom(ggforce,geom_bezier)
importFrom(ggplot2,aes)
importFrom(ggplot2,aes_string)
importFrom(ggplot2,element_blank)
Expand Down Expand Up @@ -367,11 +360,8 @@ importFrom(ggplot2,xlab)
importFrom(ggplot2,xlim)
importFrom(ggplot2,ylab)
importFrom(ggplot2,ylim)
importFrom(ggrepel,geom_label_repel)
importFrom(ggseqlogo,ggseqlogo)
importFrom(grid,arrow)
importFrom(irlba,irlba)
importFrom(lsa,cosine)
importFrom(methods,"slot<-")
importFrom(methods,as)
importFrom(methods,callGeneric)
Expand All @@ -387,7 +377,6 @@ importFrom(patchwork,guide_area)
importFrom(patchwork,plot_layout)
importFrom(patchwork,wrap_plots)
importFrom(pbapply,pblapply)
importFrom(qlcMatrix,corSparse)
importFrom(scales,comma)
importFrom(scales,hue_pal)
importFrom(stats,approx)
Expand All @@ -397,6 +386,7 @@ importFrom(stats,dist)
importFrom(stats,ecdf)
importFrom(stats,hclust)
importFrom(stats,median)
importFrom(stats,p.adjust)
importFrom(stats,phyper)
importFrom(stats,pnorm)
importFrom(stats,sd)
Expand Down
29 changes: 29 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
# Signac 1.7.0

New functionality:

* Added `method` parameter to `LinkPeaks()` ([@saketkc](https://github.com/saketkc); [#1030](https://github.com/timoast/signac/pull/1030))
* Added ability to plot transcript isoforms (set `annotation="transcript"` in `CoveragePlot()`)
* Added multiple testing correction to `FindMotifs()`, and new `p.adjust` column in output dataframe
* Added `p.adjust.method` parameter to `FindMotifs()` to control multiple testing correction method used

Bug fixes:

* Fixed bug in `CallPeaks()` when project name contained whitespace ([#981](https://github.com/timoast/signac/issues/981))
* Fixed bug in `CoveragePlot()` when `tile=TRUE`
* Fixed bug in `InsertionBias()` that set the coordinates beyond the end of some chromosomes ([#986](https://github.com/timoast/signac/issues/986))
* Fixed bug in `BigwigTrack()` when supplying a single bigwig file ([#1053](https://github.com/timoast/signac/issues/1053))
* Fixed bug in `GeneActivity()` when specifying biotypes ([#1058](https://github.com/timoast/signac/issues/1058))
* Fixed bug in `GeneActivity()` when gene name is an empty string ([#1055](https://github.com/timoast/signac/issues/1055))
* Fixed bug in `FeatureMatrix()` when using list of Fragment objects ([#1056](https://github.com/timoast/signac/issues/1056))
* Fixed bug in `RegionMatrix()` when running on objects containing renamed cells ([#1076](https://github.com/timoast/signac/issues/1076))
* Fixed bug in `Footprint()` when using a FASTA file ([#1092](https://github.com/timoast/signac/issues/1092))
* Fixed bug in `Footprint()` when using list of genomic regions ([#1098](https://github.com/timoast/signac/issues/1098))
* Add check for invalid features in `FindMotifs()` ([#1109](https://github.com/timoast/signac/issues/1109))

Other changes:

* Improved error message when no fragment file is supplied in `CallPeaks()` ([#1062](https://github.com/timoast/signac/issues/1062))
* Moved `Seurat`, `ggforce`, `ggrepel`, `ggseqlogo`, `lsa`, `qlcMatrix` to suggested packages
* Added progress bar to `GetGRangesFromEnsDb()`

# Signac 1.6.0

New functionality:
Expand Down
15 changes: 6 additions & 9 deletions R/differential_accessibility.R
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
# Re-export Seurat generic
#' @importFrom Seurat FoldChange
#' @export
Seurat::FoldChange

#' @rdname FoldChange
#' @export
# dynamically exported, see zzz.R
#' @method FoldChange ChromatinAssay
#' @importFrom Seurat FoldChange GetAssayData
#' @importFrom SeuratObject GetAssayData
#' @importFrom Matrix rowMeans
FoldChange.ChromatinAssay <- function(
object,
Expand All @@ -20,6 +14,9 @@ FoldChange.ChromatinAssay <- function(
base = 2,
...
) {
if (!requireNamespace(package = "Seurat", quietly = TRUE)) {
stop("Please install Seurat: install.packages('Seurat')")
}
mean.fxn <- function(x) {
return(log(x = rowMeans(x = x) + pseudocount.use, base = base))
}
Expand All @@ -31,7 +28,7 @@ FoldChange.ChromatinAssay <- function(
)
fc.name <- SetIfNull(x = fc.name, y = paste0("avg_log", base.text, "FC"))
data <- GetAssayData(object = object, slot = slot)
FoldChange(
Seurat::FoldChange(
object = data,
cells.1 = cells.1,
cells.2 = cells.2,
Expand Down
6 changes: 3 additions & 3 deletions R/dimension_reduction.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Jaccard <- function(x, y) {
#'
#' @importFrom irlba irlba
#' @importFrom stats sd
#' @importFrom Seurat CreateDimReducObject
#' @importFrom SeuratObject CreateDimReducObject
#' @importMethodsFrom Matrix t
#'
#' @rdname RunSVD
Expand Down Expand Up @@ -120,7 +120,7 @@ RunSVD.default <- function(
#' @param features Which features to use. If NULL, use variable features
#'
#' @rdname RunSVD
#' @importFrom Seurat VariableFeatures GetAssayData
#' @importFrom SeuratObject VariableFeatures GetAssayData
#' @export
#' @concept dimension_reduction
#' @method RunSVD Assay
Expand Down Expand Up @@ -174,7 +174,7 @@ RunSVD.Seurat <- function(
...
) {
assay <- SetIfNull(x = assay, y = DefaultAssay(object = object))
assay.data <- GetAssay(object = object, assay = assay)
assay.data <- object[[assay]]
reduction.data <- RunSVD(
object = assay.data,
assay = assay,
Expand Down
Loading

0 comments on commit fa23843

Please sign in to comment.