diff --git a/DESCRIPTION b/DESCRIPTION index cb590de..1867c06 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: chromVAR Type: Package Title: Chromatin Variation Across Regions -Version: 1.5.0 +Version: 1.35.1 Authors@R: c( person("Alicia", "Schep", email = "aschep@gmail.com", role = c("aut","cre")), person("Jason", "Buenrostro", role = "ctb"), @@ -15,13 +15,14 @@ Description: Determine variation in chromatin accessibility across sets of License: MIT + file LICENSE Imports: IRanges, - GenomeInfoDb, + Seqinfo, GenomicRanges, ggplot2, nabor, BiocParallel, BiocGenerics, Biostrings, + pwalign, TFBSTools, Rsamtools, S4Vectors, @@ -54,6 +55,6 @@ Suggests: biocViews: SingleCell, Sequencing, GeneRegulation, ImmunoOncology LazyData: TRUE LinkingTo: Rcpp, RcppArmadillo -SystemRequirements: C++11 +SystemRequirements: C++14 VignetteBuilder: knitr -RoxygenNote: 6.0.1 +RoxygenNote: 7.3.2 diff --git a/NAMESPACE b/NAMESPACE index 2a59c99..5935eb2 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -70,14 +70,10 @@ importClassesFrom(SummarizedExperiment,SummarizedExperiment) importFrom(BSgenome,getBSgenome) importFrom(BiocGenerics,relist) importFrom(BiocParallel,bplapply) -importFrom(Biostrings,nucleotideSubstitutionMatrix) -importFrom(Biostrings,stringDist) +importFrom(pwalign,nucleotideSubstitutionMatrix) +importFrom(pwalign,stringDist) importFrom(DT,datatable) importFrom(DT,formatSignif) -importFrom(GenomeInfoDb,"seqlevels<-") -importFrom(GenomeInfoDb,seqlevels) -importFrom(GenomeInfoDb,seqnames) -importFrom(GenomeInfoDb,sortSeqlevels) importFrom(IRanges,IRanges) importFrom(IRanges,PartitioningByEnd) importFrom(IRanges,overlapsAny) @@ -91,6 +87,10 @@ importFrom(S4Vectors,elementNROWS) importFrom(S4Vectors,isSorted) importFrom(S4Vectors,queryHits) importFrom(S4Vectors,subjectHits) +importFrom(Seqinfo,"seqlevels<-") +importFrom(Seqinfo,seqlevels) +importFrom(Seqinfo,seqnames) +importFrom(Seqinfo,sortSeqlevels) importFrom(TFBSTools,PWMatrix) importFrom(TFBSTools,PWMatrixList) importFrom(TFBSTools,bg) diff --git a/R/background_peaks.R b/R/background_peaks.R index 53d837d..463de24 100644 --- a/R/background_peaks.R +++ b/R/background_peaks.R @@ -22,7 +22,7 @@ setGeneric("addGCBias", function(object, ...) standardGeneric("addGCBias")) #' @export setMethod(addGCBias, c(object = "RangedSummarizedExperiment"), function(object, - genome = GenomeInfoDb::genome(object)) { + genome = Seqinfo::genome(object)) { genome <- validate_genome_input(genome) peaks <- rowRanges(object) seqs <- getSeq(genome, peaks) @@ -38,7 +38,7 @@ setMethod(addGCBias, c(object = "RangedSummarizedExperiment"), #' @export setMethod(addGCBias, c(object = "SummarizedExperiment"), function(object, peaks, - genome = GenomeInfoDb::genome(peaks)) { + genome = Seqinfo::genome(peaks)) { genome <- validate_genome_input(genome) seqs <- getSeq(genome, peaks) nucfreqs <- letterFrequency(seqs, c("A", "C", "G", "T")) diff --git a/R/chromVAR.R b/R/chromVAR.R index 1bf6033..0e213f3 100644 --- a/R/chromVAR.R +++ b/R/chromVAR.R @@ -21,7 +21,7 @@ #' txtProgressBar #' @importFrom Rcpp sourceCpp #' @importFrom S4Vectors queryHits subjectHits DataFrame elementNROWS isSorted -#' @importFrom GenomeInfoDb seqlevels seqlevels<- sortSeqlevels seqnames +#' @importFrom Seqinfo seqlevels seqlevels<- sortSeqlevels seqnames #' @importFrom Rsamtools ScanBamParam scanBamFlag scanBam countBam #' @importFrom IRanges IRanges overlapsAny #' @importFrom BiocParallel bplapply diff --git a/R/kmers.R b/R/kmers.R index 02cec1d..21a7e08 100644 --- a/R/kmers.R +++ b/R/kmers.R @@ -56,7 +56,7 @@ deviationsCovariability <- function(object) { return(normed_covs) } -#' @importFrom Biostrings nucleotideSubstitutionMatrix stringDist +#' @importFrom pwalign nucleotideSubstitutionMatrix stringDist get_kmer_dist <- function(kmers) { stopifnot(all_equal(nchar(kmers))) out <- as.matrix(stringDist(kmers, diff --git a/R/match_kmers.R b/R/match_kmers.R index c4cd714..b5d1d96 100644 --- a/R/match_kmers.R +++ b/R/match_kmers.R @@ -153,7 +153,7 @@ setMethod("matchKmers", signature(k = "character", subject = "DNAString"), setMethod("matchKmers", signature(k = "character", subject = "GenomicRanges"), function(k, subject, - genome = GenomeInfoDb::genome(subject), + genome = Seqinfo::genome(subject), out = c("matches", "positions")) { out <- match.arg(out) GenomicRanges::strand(subject) <- "+" diff --git a/R/motifs.R b/R/motifs.R index e173dc2..348731e 100644 --- a/R/motifs.R +++ b/R/motifs.R @@ -1,28 +1,33 @@ #' getJasparMotifs #' #' Function to get motifs from JASPAR database -#' @param species Which species? use eithe jaspar code or latin name. +#' @param species Which species? use eithe jaspar code or latin name. #' default is 'Homo sapiens' #' @param collection Which collection to use? default is 'CORE' -#' @param ... additional arguments to opts for +#' @param jaspar_db Which JASPAR database? default is `JASPAR2016::JASPAR2016` +#' @param ... additional arguments to opts for #' \code{\link[TFBSTools]{getMatrixSet}} #' @details Simply a wrapper function for \code{\link[TFBSTools]{getMatrixSet}} #' that calls JASPAR2016 database using \code{\link[JASPAR2016]{JASPAR2016}} #' @return \code{\link[TFBSTools]{PFMatrixList}} #' @export -#' @examples -#' +#' @examples +#' #' motifs <- getJasparMotifs() -#' -#' -getJasparMotifs <- function(species = "Homo sapiens", - collection = "CORE", ...) { +#' +#' # use the JASPAR2020 database +#' motifs <- getJasparMotifs(jaspar_db = JASPAR2020::JASPAR2020) +#' +getJasparMotifs <- function(species = "Homo sapiens", + collection = "CORE", + jaspar_db = JASPAR2016::JASPAR2016, + ...) { opts <- list() opts["species"] <- species opts["collection"] <- collection opts <- c(opts, list(...)) - out <- TFBSTools::getMatrixSet(JASPAR2016::JASPAR2016, opts) - if (!isTRUE(all.equal(TFBSTools::name(out), names(out)))) + out <- TFBSTools::getMatrixSet(jaspar_db, opts) + if (!isTRUE(all.equal(TFBSTools::name(out), names(out)))) names(out) <- paste(names(out), TFBSTools::name(out), sep = "_") return(out) } diff --git a/data-raw/example_counts.R b/data-raw/example_counts.R index ffbbcff..a1685e5 100644 --- a/data-raw/example_counts.R +++ b/data-raw/example_counts.R @@ -17,7 +17,7 @@ cleanup_peaks <- function(peaks){ non_mito_peaks = which(!blacklisted) peaks <- peaks[non_mito_peaks] - seqlengths(peaks) <- GenomeInfoDb::seqlengths(BSgenome.Hsapiens.UCSC.hg19::BSgenome.Hsapiens.UCSC.hg19)[GenomeInfoDb::seqlevels(peaks)] + seqlengths(peaks) <- Seqinfo::seqlengths(BSgenome.Hsapiens.UCSC.hg19::BSgenome.Hsapiens.UCSC.hg19)[Seqinfo::seqlevels(peaks)] within_boundaries = which(GenomicRanges::trim(peaks) == peaks) peaks <- peaks[within_boundaries] return(peaks) diff --git a/data/example_counts.rda b/data/example_counts.rda index eaec5dc..03c222a 100644 Binary files a/data/example_counts.rda and b/data/example_counts.rda differ diff --git a/data/mini_counts.rda b/data/mini_counts.rda index 63ed7a5..a4737e1 100644 Binary files a/data/mini_counts.rda and b/data/mini_counts.rda differ diff --git a/data/mini_dev.rda b/data/mini_dev.rda index b8f058d..fa6d94c 100644 Binary files a/data/mini_dev.rda and b/data/mini_dev.rda differ diff --git a/data/mini_ix.rda b/data/mini_ix.rda index 6999133..72d5414 100644 Binary files a/data/mini_ix.rda and b/data/mini_ix.rda differ diff --git a/man/addGCBias.Rd b/man/addGCBias.Rd index b2e3ca6..c202d3c 100644 --- a/man/addGCBias.Rd +++ b/man/addGCBias.Rd @@ -1,6 +1,5 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/background_peaks.R -\docType{methods} \name{addGCBias} \alias{addGCBias} \alias{addGCBias,RangedSummarizedExperiment-method} @@ -9,11 +8,9 @@ \usage{ addGCBias(object, ...) -\S4method{addGCBias}{RangedSummarizedExperiment}(object, - genome = GenomeInfoDb::genome(object)) +\S4method{addGCBias}{RangedSummarizedExperiment}(object, genome = Seqinfo::genome(object)) -\S4method{addGCBias}{SummarizedExperiment}(object, peaks, - genome = GenomeInfoDb::genome(peaks)) +\S4method{addGCBias}{SummarizedExperiment}(object, peaks, genome = Seqinfo::genome(peaks)) } \arguments{ \item{object}{(Ranged)SummarizedExperiment} @@ -34,11 +31,11 @@ Computes GC content for peaks } \section{Methods (by class)}{ \itemize{ -\item \code{RangedSummarizedExperiment}: method for RangedSummarizedExperiment +\item \code{addGCBias(RangedSummarizedExperiment)}: method for RangedSummarizedExperiment -\item \code{SummarizedExperiment}: method for SummarizedExperiment -}} +\item \code{addGCBias(SummarizedExperiment)}: method for SummarizedExperiment +}} \examples{ data(example_counts, package = "chromVAR") diff --git a/man/annotationMatches.Rd b/man/annotationMatches.Rd index 470cfb1..649d619 100644 --- a/man/annotationMatches.Rd +++ b/man/annotationMatches.Rd @@ -1,12 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_annotations.R -\docType{methods} \name{annotationMatches} \alias{annotationMatches} \alias{annotationMatches,SummarizedExperiment-method} \alias{annoation_matches<-,SummarizedExperiment-method} \alias{annotationMatches<-} -\alias{annotationMatches,SummarizedExperiment-method} \alias{annotationMatches<-,SummarizedExperiment-method} \title{annotationMatches} \usage{ diff --git a/man/cbind-chromVARDeviations-method.Rd b/man/cbind-chromVARDeviations-method.Rd index 97bcc64..dc8c8bd 100644 --- a/man/cbind-chromVARDeviations-method.Rd +++ b/man/cbind-chromVARDeviations-method.Rd @@ -1,6 +1,5 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/compute_deviations.R -\docType{methods} \name{cbind,chromVARDeviations-method} \alias{cbind,chromVARDeviations-method} \title{cbind method for chromVARDeviations} diff --git a/man/chromVAR.Rd b/man/chromVAR.Rd index 762740d..27b6ac2 100644 --- a/man/chromVAR.Rd +++ b/man/chromVAR.Rd @@ -2,11 +2,23 @@ % Please edit documentation in R/chromVAR.R \docType{package} \name{chromVAR} -\alias{chromVAR} \alias{chromVAR-package} +\alias{chromVAR} \title{chromVAR: A package for computing variability across sets of peaks.} \description{ Determine variation in chromatin accessibility across sets of annotations or peaks. Designed primarily for single-cell or sparse chromatin accessibility, e.g. from scATAC-seq or sparse ATAC or DNAse-seq experiments. } +\author{ +\strong{Maintainer}: Alicia Schep \email{aschep@gmail.com} + +Other contributors: +\itemize{ + \item Jason Buenrostro [contributor] + \item Caleb Lareau [contributor] + \item William Greenleaf [thesis advisor] + \item Stanford University [copyright holder] +} + +} diff --git a/man/computeDeviations.Rd b/man/computeDeviations.Rd index f45c3c1..72b5791 100644 --- a/man/computeDeviations.Rd +++ b/man/computeDeviations.Rd @@ -1,6 +1,5 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/compute_deviations.R -\docType{methods} \name{computeDeviations} \alias{computeDeviations} \alias{computeDeviations,SummarizedExperiment,SummarizedExperiment-method} @@ -15,33 +14,61 @@ \usage{ computeDeviations(object, annotations, ...) -\S4method{computeDeviations}{SummarizedExperiment,SummarizedExperiment}(object, - annotations, background_peaks = getBackgroundPeaks(object), - expectation = computeExpectations(object)) - -\S4method{computeDeviations}{SummarizedExperiment,MatrixOrmatrix}(object, - annotations, background_peaks = getBackgroundPeaks(object), - expectation = computeExpectations(object)) - -\S4method{computeDeviations}{SummarizedExperiment,list}(object, annotations, +\S4method{computeDeviations}{SummarizedExperiment,SummarizedExperiment}( + object, + annotations, background_peaks = getBackgroundPeaks(object), - expectation = computeExpectations(object)) - -\S4method{computeDeviations}{SummarizedExperiment,missingOrNULL}(object, - annotations, background_peaks = getBackgroundPeaks(object), - expectation = computeExpectations(object)) + expectation = computeExpectations(object) +) -\S4method{computeDeviations}{MatrixOrmatrix,SummarizedExperiment}(object, - annotations, background_peaks, expectation = computeExpectations(object)) - -\S4method{computeDeviations}{MatrixOrmatrix,MatrixOrmatrix}(object, annotations, - background_peaks, expectation = computeExpectations(object)) +\S4method{computeDeviations}{SummarizedExperiment,MatrixOrmatrix}( + object, + annotations, + background_peaks = getBackgroundPeaks(object), + expectation = computeExpectations(object) +) -\S4method{computeDeviations}{MatrixOrmatrix,list}(object, annotations, - background_peaks, expectation = computeExpectations(object)) +\S4method{computeDeviations}{SummarizedExperiment,list}( + object, + annotations, + background_peaks = getBackgroundPeaks(object), + expectation = computeExpectations(object) +) -\S4method{computeDeviations}{MatrixOrmatrix,missingOrNULL}(object, annotations, - background_peaks, expectation = computeExpectations(object)) +\S4method{computeDeviations}{SummarizedExperiment,missingOrNULL}( + object, + annotations, + background_peaks = getBackgroundPeaks(object), + expectation = computeExpectations(object) +) + +\S4method{computeDeviations}{MatrixOrmatrix,SummarizedExperiment}( + object, + annotations, + background_peaks, + expectation = computeExpectations(object) +) + +\S4method{computeDeviations}{MatrixOrmatrix,MatrixOrmatrix}( + object, + annotations, + background_peaks, + expectation = computeExpectations(object) +) + +\S4method{computeDeviations}{MatrixOrmatrix,list}( + object, + annotations, + background_peaks, + expectation = computeExpectations(object) +) + +\S4method{computeDeviations}{MatrixOrmatrix,missingOrNULL}( + object, + annotations, + background_peaks, + expectation = computeExpectations(object) +) } \arguments{ \item{object}{chromVARCounts object} @@ -69,29 +96,32 @@ multiprocessing using \code{\link[BiocParallel]{bplapply}} } \section{Methods (by class)}{ \itemize{ -\item \code{object = SummarizedExperiment,annotations = SummarizedExperiment}: object and annotations are SummarizedExperiment +\item \code{computeDeviations( + object = SummarizedExperiment, + annotations = SummarizedExperiment +)}: object and annotations are SummarizedExperiment -\item \code{object = SummarizedExperiment,annotations = MatrixOrmatrix}: object is SummarizedExperiment, +\item \code{computeDeviations(object = SummarizedExperiment, annotations = MatrixOrmatrix)}: object is SummarizedExperiment, annotations are Matrix -\item \code{object = SummarizedExperiment,annotations = list}: object is SummarizedExperiment, +\item \code{computeDeviations(object = SummarizedExperiment, annotations = list)}: object is SummarizedExperiment, annotations are list -\item \code{object = SummarizedExperiment,annotations = missingOrNULL}: object is SummarizedExperiment, +\item \code{computeDeviations(object = SummarizedExperiment, annotations = missingOrNULL)}: object is SummarizedExperiment, annotations are missing -\item \code{object = MatrixOrmatrix,annotations = SummarizedExperiment}: object and annotations are SummarizedExperiment +\item \code{computeDeviations(object = MatrixOrmatrix, annotations = SummarizedExperiment)}: object and annotations are SummarizedExperiment -\item \code{object = MatrixOrmatrix,annotations = MatrixOrmatrix}: object is SummarizedExperiment, +\item \code{computeDeviations(object = MatrixOrmatrix, annotations = MatrixOrmatrix)}: object is SummarizedExperiment, annotations are Matrix -\item \code{object = MatrixOrmatrix,annotations = list}: object is SummarizedExperiment, +\item \code{computeDeviations(object = MatrixOrmatrix, annotations = list)}: object is SummarizedExperiment, annotations are list -\item \code{object = MatrixOrmatrix,annotations = missingOrNULL}: object is SummarizedExperiment, +\item \code{computeDeviations(object = MatrixOrmatrix, annotations = missingOrNULL)}: object is SummarizedExperiment, annotations are missing -}} +}} \examples{ # Register BiocParallel BiocParallel::register(BiocParallel::SerialParam()) diff --git a/man/computeExpectations.Rd b/man/computeExpectations.Rd index d98e4e8..b54b7a1 100644 --- a/man/computeExpectations.Rd +++ b/man/computeExpectations.Rd @@ -1,6 +1,5 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/compute_deviations.R -\docType{methods} \name{computeExpectations} \alias{computeExpectations} \alias{computeExpectations,MatrixOrmatrix-method} @@ -9,11 +8,9 @@ \usage{ computeExpectations(object, ...) -\S4method{computeExpectations}{MatrixOrmatrix}(object, norm = FALSE, - group = NULL) +\S4method{computeExpectations}{MatrixOrmatrix}(object, norm = FALSE, group = NULL) -\S4method{computeExpectations}{SummarizedExperiment}(object, norm = FALSE, - group = NULL) +\S4method{computeExpectations}{SummarizedExperiment}(object, norm = FALSE, group = NULL) } \arguments{ \item{object}{SummarizedExperiment} @@ -49,12 +46,12 @@ By default, this function will compute the expected fraction of } \section{Methods (by class)}{ \itemize{ -\item \code{MatrixOrmatrix}: method for Matrix or matrix +\item \code{computeExpectations(MatrixOrmatrix)}: method for Matrix or matrix -\item \code{SummarizedExperiment}: method for SummarizedExperiment with counts +\item \code{computeExpectations(SummarizedExperiment)}: method for SummarizedExperiment with counts slot -}} +}} \examples{ # First get some data diff --git a/man/computeVariability.Rd b/man/computeVariability.Rd index 853cb1c..e303676 100644 --- a/man/computeVariability.Rd +++ b/man/computeVariability.Rd @@ -4,8 +4,13 @@ \alias{computeVariability} \title{computeVariability} \usage{ -computeVariability(object, bootstrap_error = TRUE, bootstrap_samples = 1000, - bootstrap_quantiles = c(0.025, 0.975), na.rm = TRUE) +computeVariability( + object, + bootstrap_error = TRUE, + bootstrap_samples = 1000, + bootstrap_quantiles = c(0.025, 0.975), + na.rm = TRUE +) } \arguments{ \item{object}{output from \code{\link{computeDeviations}}} diff --git a/man/deviationScores.Rd b/man/deviationScores.Rd index fa2fdf6..f237675 100644 --- a/man/deviationScores.Rd +++ b/man/deviationScores.Rd @@ -1,10 +1,8 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/compute_deviations.R -\docType{methods} \name{deviationScores} \alias{deviationScores} \alias{deviationScores,chromVARDeviations-method} -\alias{deviationScores,chromVARDeviations-method} \title{deviationScores} \usage{ deviationScores(object) diff --git a/man/deviations.Rd b/man/deviations.Rd index 32ad3d3..ce2f4f5 100644 --- a/man/deviations.Rd +++ b/man/deviations.Rd @@ -1,10 +1,8 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/compute_deviations.R -\docType{methods} \name{deviations} \alias{deviations} \alias{deviations,chromVARDeviations-method} -\alias{deviations,chromVARDeviations-method} \title{deviations} \usage{ deviations(object) diff --git a/man/deviationsTsne.Rd b/man/deviationsTsne.Rd index 1c17710..66ef41c 100644 --- a/man/deviationsTsne.Rd +++ b/man/deviationsTsne.Rd @@ -4,9 +4,15 @@ \alias{deviationsTsne} \title{deviationsTsne} \usage{ -deviationsTsne(object, threshold = 1.5, perplexity = if (what == "samples") - 30 else 8, max_iter = 1000, theta = 0.5, what = c("samples", - "annotations"), shiny = FALSE) +deviationsTsne( + object, + threshold = 1.5, + perplexity = if (what == "samples") 30 else 8, + max_iter = 1000, + theta = 0.5, + what = c("samples", "annotations"), + shiny = FALSE +) } \arguments{ \item{object}{deviations result} diff --git a/man/differentialDeviations.Rd b/man/differentialDeviations.Rd index b2e6ccf..58489ba 100644 --- a/man/differentialDeviations.Rd +++ b/man/differentialDeviations.Rd @@ -4,8 +4,12 @@ \alias{differentialDeviations} \title{differentialDeviations} \usage{ -differentialDeviations(object, groups, alternative = c("two.sided", "less", - "greater"), parametric = TRUE) +differentialDeviations( + object, + groups, + alternative = c("two.sided", "less", "greater"), + parametric = TRUE +) } \arguments{ \item{object}{chromVARDeviations object} diff --git a/man/filterPeaks.Rd b/man/filterPeaks.Rd index 0c15562..629ddc7 100644 --- a/man/filterPeaks.Rd +++ b/man/filterPeaks.Rd @@ -4,8 +4,12 @@ \alias{filterPeaks} \title{filterPeaks} \usage{ -filterPeaks(object, min_fragments_per_peak = 1, non_overlapping = TRUE, - ix_return = FALSE) +filterPeaks( + object, + min_fragments_per_peak = 1, + non_overlapping = TRUE, + ix_return = FALSE +) } \arguments{ \item{object}{SummarizedExperiment with matrix of fragment counts per peak diff --git a/man/filterSamples.Rd b/man/filterSamples.Rd index 867a69b..bb30ece 100644 --- a/man/filterSamples.Rd +++ b/man/filterSamples.Rd @@ -4,8 +4,13 @@ \alias{filterSamples} \title{filterSamples} \usage{ -filterSamples(object, min_in_peaks = NULL, min_depth = NULL, - shiny = interactive(), ix_return = FALSE) +filterSamples( + object, + min_in_peaks = NULL, + min_depth = NULL, + shiny = interactive(), + ix_return = FALSE +) } \arguments{ \item{object}{SummarizedExperiment with matrix of fragment counts per peak diff --git a/man/filterSamplesPlot.Rd b/man/filterSamplesPlot.Rd index 56a5d7f..5c6a5c1 100644 --- a/man/filterSamplesPlot.Rd +++ b/man/filterSamplesPlot.Rd @@ -4,8 +4,12 @@ \alias{filterSamplesPlot} \title{filterSamplesPlot} \usage{ -filterSamplesPlot(object, min_in_peaks = NULL, min_depth = NULL, - use_plotly = interactive()) +filterSamplesPlot( + object, + min_in_peaks = NULL, + min_depth = NULL, + use_plotly = interactive() +) } \arguments{ \item{object}{SummarizedExperiment with matrix of fragment counts per peak diff --git a/man/getAnnotationCorrelation.Rd b/man/getAnnotationCorrelation.Rd index 996eb53..cb6f7a3 100644 --- a/man/getAnnotationCorrelation.Rd +++ b/man/getAnnotationCorrelation.Rd @@ -1,6 +1,5 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/variability_synergy.R -\docType{methods} \name{getAnnotationCorrelation} \alias{getAnnotationCorrelation} \alias{getAnnotationCorrelation,SummarizedExperiment,SummarizedExperiment-method} @@ -13,32 +12,53 @@ \usage{ getAnnotationCorrelation(object, annotations, ...) - - \S4method{getAnnotationCorrelation}{SummarizedExperiment,SummarizedExperiment}(object, - annotations, background_peaks = getBackgroundPeaks(object), - expectation = computeExpectations(object), variabilities = NULL) - - - \S4method{getAnnotationCorrelation}{SummarizedExperiment,MatrixOrmatrix}(object, - annotations, background_peaks = getBackgroundPeaks(object), - expectation = computeExpectations(object), variabilities = NULL) - -\S4method{getAnnotationCorrelation}{SummarizedExperiment,list}(object, - annotations, background_peaks = getBackgroundPeaks(object), - expectation = computeExpectations(object), variabilities = NULL) - - - \S4method{getAnnotationCorrelation}{MatrixOrmatrix,SummarizedExperiment}(object, - annotations, background_peaks, expectation = computeExpectations(object), - variabilities = NULL) - -\S4method{getAnnotationCorrelation}{MatrixOrmatrix,MatrixOrmatrix}(object, - annotations, background_peaks, expectation = computeExpectations(object), - variabilities = NULL) - -\S4method{getAnnotationCorrelation}{MatrixOrmatrix,list}(object, annotations, - background_peaks, expectation = computeExpectations(object), - variabilities = NULL) +\S4method{getAnnotationCorrelation}{SummarizedExperiment,SummarizedExperiment}( + object, + annotations, + background_peaks = getBackgroundPeaks(object), + expectation = computeExpectations(object), + variabilities = NULL +) + +\S4method{getAnnotationCorrelation}{SummarizedExperiment,MatrixOrmatrix}( + object, + annotations, + background_peaks = getBackgroundPeaks(object), + expectation = computeExpectations(object), + variabilities = NULL +) + +\S4method{getAnnotationCorrelation}{SummarizedExperiment,list}( + object, + annotations, + background_peaks = getBackgroundPeaks(object), + expectation = computeExpectations(object), + variabilities = NULL +) + +\S4method{getAnnotationCorrelation}{MatrixOrmatrix,SummarizedExperiment}( + object, + annotations, + background_peaks, + expectation = computeExpectations(object), + variabilities = NULL +) + +\S4method{getAnnotationCorrelation}{MatrixOrmatrix,MatrixOrmatrix}( + object, + annotations, + background_peaks, + expectation = computeExpectations(object), + variabilities = NULL +) + +\S4method{getAnnotationCorrelation}{MatrixOrmatrix,list}( + object, + annotations, + background_peaks, + expectation = computeExpectations(object), + variabilities = NULL +) } \arguments{ \item{object}{result from computeDeviations} @@ -67,22 +87,31 @@ should only be run on small number of motifs/kmers/peaksets } \section{Methods (by class)}{ \itemize{ -\item \code{object = SummarizedExperiment,annotations = SummarizedExperiment}: object and annotations are +\item \code{getAnnotationCorrelation( + object = SummarizedExperiment, + annotations = SummarizedExperiment +)}: object and annotations are SummarizedExperiment -\item \code{object = SummarizedExperiment,annotations = MatrixOrmatrix}: object is SummarizedExperiment, +\item \code{getAnnotationCorrelation( + object = SummarizedExperiment, + annotations = MatrixOrmatrix +)}: object is SummarizedExperiment, annotations are Matrix -\item \code{object = SummarizedExperiment,annotations = list}: object is SummarizedExperiment, +\item \code{getAnnotationCorrelation(object = SummarizedExperiment, annotations = list)}: object is SummarizedExperiment, annotations are list -\item \code{object = MatrixOrmatrix,annotations = SummarizedExperiment}: object and annotations are +\item \code{getAnnotationCorrelation( + object = MatrixOrmatrix, + annotations = SummarizedExperiment +)}: object and annotations are SummarizedExperiment -\item \code{object = MatrixOrmatrix,annotations = MatrixOrmatrix}: object is SummarizedExperiment, +\item \code{getAnnotationCorrelation(object = MatrixOrmatrix, annotations = MatrixOrmatrix)}: object is SummarizedExperiment, annotations are Matrix -\item \code{object = MatrixOrmatrix,annotations = list}: object is SummarizedExperiment, +\item \code{getAnnotationCorrelation(object = MatrixOrmatrix, annotations = list)}: object is SummarizedExperiment, annotations are list -}} +}} diff --git a/man/getAnnotationSynergy.Rd b/man/getAnnotationSynergy.Rd index 9e7d55e..97bd33c 100644 --- a/man/getAnnotationSynergy.Rd +++ b/man/getAnnotationSynergy.Rd @@ -1,6 +1,5 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/variability_synergy.R -\docType{methods} \name{getAnnotationSynergy} \alias{getAnnotationSynergy} \alias{getAnnotationSynergy,SummarizedExperiment,SummarizedExperiment-method} @@ -13,33 +12,59 @@ \usage{ getAnnotationSynergy(object, annotations, ...) - - \S4method{getAnnotationSynergy}{SummarizedExperiment,SummarizedExperiment}(object, - annotations, background_peaks = getBackgroundPeaks(object), - expectation = computeExpectations(object), variabilities = NULL, - nbg = 25) - -\S4method{getAnnotationSynergy}{SummarizedExperiment,MatrixOrmatrix}(object, - annotations, background_peaks = getBackgroundPeaks(object), - expectation = computeExpectations(object), variabilities = NULL, - nbg = 25) - -\S4method{getAnnotationSynergy}{SummarizedExperiment,list}(object, annotations, +\S4method{getAnnotationSynergy}{SummarizedExperiment,SummarizedExperiment}( + object, + annotations, background_peaks = getBackgroundPeaks(object), - expectation = computeExpectations(object), variabilities = NULL, - nbg = 25) - -\S4method{getAnnotationSynergy}{MatrixOrmatrix,SummarizedExperiment}(object, - annotations, background_peaks, expectation = computeExpectations(object), - variabilities = NULL, nbg = 25) - -\S4method{getAnnotationSynergy}{MatrixOrmatrix,MatrixOrmatrix}(object, - annotations, background_peaks, expectation = computeExpectations(object), - variabilities = NULL, nbg = 25) - -\S4method{getAnnotationSynergy}{MatrixOrmatrix,list}(object, annotations, - background_peaks, expectation = computeExpectations(object), - variabilities = NULL, nbg = 25) + expectation = computeExpectations(object), + variabilities = NULL, + nbg = 25 +) + +\S4method{getAnnotationSynergy}{SummarizedExperiment,MatrixOrmatrix}( + object, + annotations, + background_peaks = getBackgroundPeaks(object), + expectation = computeExpectations(object), + variabilities = NULL, + nbg = 25 +) + +\S4method{getAnnotationSynergy}{SummarizedExperiment,list}( + object, + annotations, + background_peaks = getBackgroundPeaks(object), + expectation = computeExpectations(object), + variabilities = NULL, + nbg = 25 +) + +\S4method{getAnnotationSynergy}{MatrixOrmatrix,SummarizedExperiment}( + object, + annotations, + background_peaks, + expectation = computeExpectations(object), + variabilities = NULL, + nbg = 25 +) + +\S4method{getAnnotationSynergy}{MatrixOrmatrix,MatrixOrmatrix}( + object, + annotations, + background_peaks, + expectation = computeExpectations(object), + variabilities = NULL, + nbg = 25 +) + +\S4method{getAnnotationSynergy}{MatrixOrmatrix,list}( + object, + annotations, + background_peaks, + expectation = computeExpectations(object), + variabilities = NULL, + nbg = 25 +) } \arguments{ \item{object}{result from computeDeviations} @@ -69,22 +94,31 @@ should only be run on small number of motifs/kmers/peaksets } \section{Methods (by class)}{ \itemize{ -\item \code{object = SummarizedExperiment,annotations = SummarizedExperiment}: object and annotations are +\item \code{getAnnotationSynergy( + object = SummarizedExperiment, + annotations = SummarizedExperiment +)}: object and annotations are SummarizedExperiment -\item \code{object = SummarizedExperiment,annotations = MatrixOrmatrix}: object is SummarizedExperiment, +\item \code{getAnnotationSynergy( + object = SummarizedExperiment, + annotations = MatrixOrmatrix +)}: object is SummarizedExperiment, annotations are Matrix -\item \code{object = SummarizedExperiment,annotations = list}: object is SummarizedExperiment, +\item \code{getAnnotationSynergy(object = SummarizedExperiment, annotations = list)}: object is SummarizedExperiment, annotations are list -\item \code{object = MatrixOrmatrix,annotations = SummarizedExperiment}: object and annotations are +\item \code{getAnnotationSynergy( + object = MatrixOrmatrix, + annotations = SummarizedExperiment +)}: object and annotations are SummarizedExperiment -\item \code{object = MatrixOrmatrix,annotations = MatrixOrmatrix}: object is SummarizedExperiment, +\item \code{getAnnotationSynergy(object = MatrixOrmatrix, annotations = MatrixOrmatrix)}: object is SummarizedExperiment, annotations are Matrix -\item \code{object = MatrixOrmatrix,annotations = list}: object is SummarizedExperiment, +\item \code{getAnnotationSynergy(object = MatrixOrmatrix, annotations = list)}: object is SummarizedExperiment, annotations are list -}} +}} diff --git a/man/getAnnotations.Rd b/man/getAnnotations.Rd index 6f7c223..278485f 100644 --- a/man/getAnnotations.Rd +++ b/man/getAnnotations.Rd @@ -1,6 +1,5 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_annotations.R -\docType{methods} \name{getAnnotations} \alias{getAnnotations} \alias{getAnnotations,GRangesList-method} @@ -20,8 +19,7 @@ getAnnotations(annotations, ...) \S4method{getAnnotations}{list}(annotations, npeaks = NULL, ...) -\S4method{getAnnotations}{character}(annotations, rowRanges, column = NULL, - ...) +\S4method{getAnnotations}{character}(annotations, rowRanges, column = NULL, ...) } \arguments{ \item{annotations}{matrix, Matrix, or data.frame of fragment counts, @@ -44,17 +42,17 @@ getAnnotations } \section{Methods (by class)}{ \itemize{ -\item \code{GRangesList}: get annotation matrix from GRangesList +\item \code{getAnnotations(GRangesList)}: get annotation matrix from GRangesList -\item \code{MatrixOrmatrix}: get annotation matrix from Matrix or matrix +\item \code{getAnnotations(MatrixOrmatrix)}: get annotation matrix from Matrix or matrix -\item \code{data.frame}: get annotation matrix from data.frame +\item \code{getAnnotations(data.frame)}: get annotation matrix from data.frame -\item \code{list}: get annotation matrix from list +\item \code{getAnnotations(list)}: get annotation matrix from list -\item \code{character}: get annotations from bed files -}} +\item \code{getAnnotations(character)}: get annotations from bed files +}} \examples{ # First get example counts diff --git a/man/getBackgroundPeaks.Rd b/man/getBackgroundPeaks.Rd index 99ef258..51d5356 100644 --- a/man/getBackgroundPeaks.Rd +++ b/man/getBackgroundPeaks.Rd @@ -1,6 +1,5 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/background_peaks.R -\docType{methods} \name{getBackgroundPeaks} \alias{getBackgroundPeaks} \alias{getBackgroundPeaks,SummarizedExperiment-method} @@ -10,14 +9,23 @@ \usage{ getBackgroundPeaks(object, ...) -\S4method{getBackgroundPeaks}{SummarizedExperiment}(object, - bias = rowData(object)$bias, niterations = 50, w = 0.1, bs = 50) +\S4method{getBackgroundPeaks}{SummarizedExperiment}( + object, + bias = rowData(object)$bias, + niterations = 50, + w = 0.1, + bs = 50 +) -\S4method{getBackgroundPeaks}{RangedSummarizedExperiment}(object, - bias = rowRanges(object)$bias, niterations = 50, w = 0.1, bs = 50) +\S4method{getBackgroundPeaks}{RangedSummarizedExperiment}( + object, + bias = rowRanges(object)$bias, + niterations = 50, + w = 0.1, + bs = 50 +) -\S4method{getBackgroundPeaks}{MatrixOrmatrix}(object, bias, niterations = 50, - w = 0.1, bs = 50) +\S4method{getBackgroundPeaks}{MatrixOrmatrix}(object, bias, niterations = 50, w = 0.1, bs = 50) } \arguments{ \item{object}{fragment counts as SummarizedExperiment, RangedSummarized, @@ -51,13 +59,13 @@ are chosen for both. } \section{Methods (by class)}{ \itemize{ -\item \code{SummarizedExperiment}: method for SummarizedExperiment +\item \code{getBackgroundPeaks(SummarizedExperiment)}: method for SummarizedExperiment -\item \code{RangedSummarizedExperiment}: method for RangedSummarizedExperiment +\item \code{getBackgroundPeaks(RangedSummarizedExperiment)}: method for RangedSummarizedExperiment -\item \code{MatrixOrmatrix}: method for Matrix or matrix -}} +\item \code{getBackgroundPeaks(MatrixOrmatrix)}: method for Matrix or matrix +}} \examples{ # Load very small example counts (already filtered) diff --git a/man/getCisGroups.Rd b/man/getCisGroups.Rd index 4808630..aa414c0 100644 --- a/man/getCisGroups.Rd +++ b/man/getCisGroups.Rd @@ -1,6 +1,5 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/cis.R -\docType{methods} \name{getCisGroups} \alias{getCisGroups} \alias{getCisGroups,RangedSummarizedExperiment-method} @@ -9,8 +8,7 @@ \usage{ getCisGroups(object, ...) -\S4method{getCisGroups}{RangedSummarizedExperiment}(object, grpsize = 25, - stepsize = 10) +\S4method{getCisGroups}{RangedSummarizedExperiment}(object, grpsize = 25, stepsize = 10) \S4method{getCisGroups}{GenomicRanges}(object, grpsize = 25, stepsize = 10) } @@ -32,11 +30,11 @@ Function for grouping peaks based on proximity along chromosomes } \section{Methods (by class)}{ \itemize{ -\item \code{RangedSummarizedExperiment}: method for RangedSummarizedExperiment +\item \code{getCisGroups(RangedSummarizedExperiment)}: method for RangedSummarizedExperiment -\item \code{GenomicRanges}: method for GenomicRanges -}} +\item \code{getCisGroups(GenomicRanges)}: method for GenomicRanges +}} \examples{ # Load very small example counts (already filtered) diff --git a/man/getCounts.Rd b/man/getCounts.Rd index 0b183d1..d98ad5b 100644 --- a/man/getCounts.Rd +++ b/man/getCounts.Rd @@ -4,8 +4,14 @@ \alias{getCounts} \title{getCounts} \usage{ -getCounts(alignment_files, peaks, paired, by_rg = FALSE, format = c("bam", - "bed"), colData = NULL) +getCounts( + alignment_files, + peaks, + paired, + by_rg = FALSE, + format = c("bam", "bed"), + colData = NULL +) } \arguments{ \item{alignment_files}{filenames for bam or bed files with aligned reads} diff --git a/man/getFragmentsPerPeak.Rd b/man/getFragmentsPerPeak.Rd index 7e9066f..44dfe1c 100644 --- a/man/getFragmentsPerPeak.Rd +++ b/man/getFragmentsPerPeak.Rd @@ -1,6 +1,5 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/helper_functions.R -\docType{methods} \name{getFragmentsPerPeak} \alias{getFragmentsPerPeak} \alias{getFragmentsPerPeak,SummarizedExperiment-method} @@ -24,12 +23,12 @@ getFragmentsPerPeak } \section{Methods (by class)}{ \itemize{ -\item \code{SummarizedExperiment}: method for SummarizedExperiment object +\item \code{getFragmentsPerPeak(SummarizedExperiment)}: method for SummarizedExperiment object with counts assay -\item \code{MatrixOrmatrix}: method for Matrix or matrix object -}} +\item \code{getFragmentsPerPeak(MatrixOrmatrix)}: method for Matrix or matrix object +}} \examples{ # Load very small example counts (already filtered) data(mini_counts, package = "chromVAR") diff --git a/man/getFragmentsPerSample.Rd b/man/getFragmentsPerSample.Rd index bef62d8..3895393 100644 --- a/man/getFragmentsPerSample.Rd +++ b/man/getFragmentsPerSample.Rd @@ -1,6 +1,5 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/helper_functions.R -\docType{methods} \name{getFragmentsPerSample} \alias{getFragmentsPerSample} \alias{getFragmentsPerSample,SummarizedExperiment-method} @@ -24,12 +23,12 @@ getFragmentsPerSample } \section{Methods (by class)}{ \itemize{ -\item \code{SummarizedExperiment}: method for SummarizedExperiment object +\item \code{getFragmentsPerSample(SummarizedExperiment)}: method for SummarizedExperiment object with counts assay -\item \code{MatrixOrmatrix}: method for Matrix or matrix object -}} +\item \code{getFragmentsPerSample(MatrixOrmatrix)}: method for Matrix or matrix object +}} \examples{ # Load very small example counts (already filtered) data(mini_counts, package = "chromVAR") diff --git a/man/getJasparMotifs.Rd b/man/getJasparMotifs.Rd index 608ef7f..2a38f40 100644 --- a/man/getJasparMotifs.Rd +++ b/man/getJasparMotifs.Rd @@ -4,15 +4,18 @@ \alias{getJasparMotifs} \title{getJasparMotifs} \usage{ -getJasparMotifs(species = "Homo sapiens", collection = "CORE", ...) +getJasparMotifs(species = "Homo sapiens", collection = "CORE", + jaspar_db = JASPAR2016::JASPAR2016, ...) } \arguments{ -\item{species}{Which species? use eithe jaspar code or latin name. +\item{species}{Which species? use eithe jaspar code or latin name. default is 'Homo sapiens'} \item{collection}{Which collection to use? default is 'CORE'} -\item{...}{additional arguments to opts for +\item{jaspar_db}{Which JASPAR database? default is \code{JASPAR2016::JASPAR2016}} + +\item{...}{additional arguments to opts for \code{\link[TFBSTools]{getMatrixSet}}} } \value{ diff --git a/man/getSampleDepths.Rd b/man/getSampleDepths.Rd index 910c005..eedbc77 100644 --- a/man/getSampleDepths.Rd +++ b/man/getSampleDepths.Rd @@ -4,8 +4,12 @@ \alias{getSampleDepths} \title{getSampleDepths} \usage{ -getSampleDepths(alignment_files, paired = TRUE, by_rg = FALSE, - format = c("bam", "bed")) +getSampleDepths( + alignment_files, + paired = TRUE, + by_rg = FALSE, + format = c("bam", "bed") +) } \arguments{ \item{alignment_files}{filenames for bam or bed file(s) with aligned reads} diff --git a/man/getSampleDistance.Rd b/man/getSampleDistance.Rd index 46ea2be..2397ee1 100644 --- a/man/getSampleDistance.Rd +++ b/man/getSampleDistance.Rd @@ -4,8 +4,12 @@ \alias{getSampleDistance} \title{getSampleDistance} \usage{ -getSampleDistance(object, threshold = 1.5, initial_dims = 50, - distance_function = dist) +getSampleDistance( + object, + threshold = 1.5, + initial_dims = 50, + distance_function = dist +) } \arguments{ \item{object}{deviations result} diff --git a/man/getTotalFragments.Rd b/man/getTotalFragments.Rd index aadd30b..bdfa8e4 100644 --- a/man/getTotalFragments.Rd +++ b/man/getTotalFragments.Rd @@ -1,6 +1,5 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/helper_functions.R -\docType{methods} \name{getTotalFragments} \alias{getTotalFragments} \alias{getTotalFragments,SummarizedExperiment-method} @@ -24,12 +23,12 @@ getTotalFragments } \section{Methods (by class)}{ \itemize{ -\item \code{SummarizedExperiment}: method for SummarizedExperiment object +\item \code{getTotalFragments(SummarizedExperiment)}: method for SummarizedExperiment object with counts assay -\item \code{MatrixOrmatrix}: method for Matrix or matrix object -}} +\item \code{getTotalFragments(MatrixOrmatrix)}: method for Matrix or matrix object +}} \examples{ # Load very small example counts (already filtered) data(mini_counts, package = "chromVAR") diff --git a/man/makeBiasBins.Rd b/man/makeBiasBins.Rd index 18640e7..2925f0c 100644 --- a/man/makeBiasBins.Rd +++ b/man/makeBiasBins.Rd @@ -1,6 +1,5 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/test_sets.R -\docType{methods} \name{makeBiasBins} \alias{makeBiasBins} \alias{makeBiasBins,SummarizedExperiment-method} @@ -10,14 +9,11 @@ \usage{ makeBiasBins(object, ...) -\S4method{makeBiasBins}{SummarizedExperiment}(object, - bias = rowData(object)$bias, nbins = 25, frac = 0.3) +\S4method{makeBiasBins}{SummarizedExperiment}(object, bias = rowData(object)$bias, nbins = 25, frac = 0.3) -\S4method{makeBiasBins}{RangedSummarizedExperiment}(object, - bias = rowRanges(object)$bias, nbins = 25, frac = 0.3) +\S4method{makeBiasBins}{RangedSummarizedExperiment}(object, bias = rowRanges(object)$bias, nbins = 25, frac = 0.3) -\S4method{makeBiasBins}{MatrixOrmatrix}(object, bias, nbins = 25, - frac = 0.3) +\S4method{makeBiasBins}{MatrixOrmatrix}(object, bias, nbins = 25, frac = 0.3) } \arguments{ \item{object}{fragment counts stored as RangedSummarizedExperiment, @@ -44,13 +40,13 @@ a certain fragment count, fragment count, or fragment count & bias. } \section{Methods (by class)}{ \itemize{ -\item \code{SummarizedExperiment}: method for SummarizedExperiment +\item \code{makeBiasBins(SummarizedExperiment)}: method for SummarizedExperiment -\item \code{RangedSummarizedExperiment}: method for RangedSummarizedExperiment +\item \code{makeBiasBins(RangedSummarizedExperiment)}: method for RangedSummarizedExperiment -\item \code{MatrixOrmatrix}: method for Matrix or matrix -}} +\item \code{makeBiasBins(MatrixOrmatrix)}: method for Matrix or matrix +}} \examples{ # Load very small example counts (already filtered) data(mini_counts, package = "chromVAR") diff --git a/man/makePermutedSets.Rd b/man/makePermutedSets.Rd index 248de1b..edd9529 100644 --- a/man/makePermutedSets.Rd +++ b/man/makePermutedSets.Rd @@ -1,6 +1,5 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/test_sets.R -\docType{methods} \name{makePermutedSets} \alias{makePermutedSets} \alias{makePermutedSets,SummarizedExperiment,SummarizedExperiment-method} @@ -16,33 +15,38 @@ \usage{ makePermutedSets(object, annotations, ...) -\S4method{makePermutedSets}{SummarizedExperiment,SummarizedExperiment}(object, - annotations, bias = rowData(object)$bias, window = 10) +\S4method{makePermutedSets}{SummarizedExperiment,SummarizedExperiment}(object, annotations, bias = rowData(object)$bias, window = 10) +\S4method{makePermutedSets}{RangedSummarizedExperiment,SummarizedExperiment}( + object, + annotations, + bias = rowRanges(object)$bias, + window = 10 +) - \S4method{makePermutedSets}{RangedSummarizedExperiment,SummarizedExperiment}(object, - annotations, bias = rowRanges(object)$bias, window = 10) +\S4method{makePermutedSets}{MatrixOrmatrix,SummarizedExperiment}(object, annotations, bias, window = 10) -\S4method{makePermutedSets}{MatrixOrmatrix,SummarizedExperiment}(object, - annotations, bias, window = 10) +\S4method{makePermutedSets}{SummarizedExperiment,MatrixOrmatrix}(object, annotations, bias = rowData(object)$bias, window = 10) -\S4method{makePermutedSets}{SummarizedExperiment,MatrixOrmatrix}(object, - annotations, bias = rowData(object)$bias, window = 10) +\S4method{makePermutedSets}{RangedSummarizedExperiment,MatrixOrmatrix}( + object, + annotations, + bias = rowRanges(object)$bias, + window = 10 +) -\S4method{makePermutedSets}{RangedSummarizedExperiment,MatrixOrmatrix}(object, - annotations, bias = rowRanges(object)$bias, window = 10) +\S4method{makePermutedSets}{MatrixOrmatrix,MatrixOrmatrix}(object, annotations, bias, window = 10) -\S4method{makePermutedSets}{MatrixOrmatrix,MatrixOrmatrix}(object, annotations, - bias, window = 10) +\S4method{makePermutedSets}{SummarizedExperiment,list}(object, annotations, bias = rowData(object)$bias, window = 10) -\S4method{makePermutedSets}{SummarizedExperiment,list}(object, annotations, - bias = rowData(object)$bias, window = 10) +\S4method{makePermutedSets}{RangedSummarizedExperiment,list}( + object, + annotations, + bias = rowRanges(object)$bias, + window = 10 +) -\S4method{makePermutedSets}{RangedSummarizedExperiment,list}(object, - annotations, bias = rowRanges(object)$bias, window = 10) - -\S4method{makePermutedSets}{MatrixOrmatrix,list}(object, annotations, bias, - window = 10) +\S4method{makePermutedSets}{MatrixOrmatrix,list}(object, annotations, bias, window = 10) } \arguments{ \item{object}{fragment counts stored as RangedSummarizedExperiment, @@ -69,30 +73,39 @@ a certain fragment count, fragment count, or fragment count & bias. } \section{Methods (by class)}{ \itemize{ -\item \code{object = SummarizedExperiment,annotations = SummarizedExperiment}: method for SummarizedExperiment and +\item \code{makePermutedSets( + object = SummarizedExperiment, + annotations = SummarizedExperiment +)}: method for SummarizedExperiment and SummarizedExperiment -\item \code{object = RangedSummarizedExperiment,annotations = SummarizedExperiment}: method for RangedSummarizedExperiment and +\item \code{makePermutedSets( + object = RangedSummarizedExperiment, + annotations = SummarizedExperiment +)}: method for RangedSummarizedExperiment and SummarizedExperiment -\item \code{object = MatrixOrmatrix,annotations = SummarizedExperiment}: method for Matrix or matrix and +\item \code{makePermutedSets(object = MatrixOrmatrix, annotations = SummarizedExperiment)}: method for Matrix or matrix and SummarizedExperiment -\item \code{object = SummarizedExperiment,annotations = MatrixOrmatrix}: method for SummarizedExperiment and +\item \code{makePermutedSets(object = SummarizedExperiment, annotations = MatrixOrmatrix)}: method for SummarizedExperiment and MatrixOrmatrix -\item \code{object = RangedSummarizedExperiment,annotations = MatrixOrmatrix}: method for RangedSummarizedExperiment and +\item \code{makePermutedSets( + object = RangedSummarizedExperiment, + annotations = MatrixOrmatrix +)}: method for RangedSummarizedExperiment and MatrixOrmatrix -\item \code{object = MatrixOrmatrix,annotations = MatrixOrmatrix}: method for Matrix/matrix and Matrix/matrix +\item \code{makePermutedSets(object = MatrixOrmatrix, annotations = MatrixOrmatrix)}: method for Matrix/matrix and Matrix/matrix -\item \code{object = SummarizedExperiment,annotations = list}: method for SummarizedExperiment and list +\item \code{makePermutedSets(object = SummarizedExperiment, annotations = list)}: method for SummarizedExperiment and list -\item \code{object = RangedSummarizedExperiment,annotations = list}: method for RangedSummarizedExperiment and list +\item \code{makePermutedSets(object = RangedSummarizedExperiment, annotations = list)}: method for RangedSummarizedExperiment and list -\item \code{object = MatrixOrmatrix,annotations = list}: method for Matrix or matrix and list -}} +\item \code{makePermutedSets(object = MatrixOrmatrix, annotations = list)}: method for Matrix or matrix and list +}} \examples{ # Load very small example counts (already filtered) data(mini_counts, package = "chromVAR") diff --git a/man/matchKmers.Rd b/man/matchKmers.Rd index 1357a3d..f54e1ff 100644 --- a/man/matchKmers.Rd +++ b/man/matchKmers.Rd @@ -1,6 +1,5 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/match_kmers.R -\docType{methods} \name{matchKmers} \alias{matchKmers} \alias{matchKmers,character,DNAStringSet-method} @@ -15,17 +14,18 @@ \usage{ matchKmers(k, subject, ...) -\S4method{matchKmers}{character,DNAStringSet}(k, subject, out = c("matches", - "positions"), ranges = NULL) +\S4method{matchKmers}{character,DNAStringSet}(k, subject, out = c("matches", "positions"), ranges = NULL) -\S4method{matchKmers}{character,character}(k, subject, out = c("matches", - "positions"), ranges = NULL) +\S4method{matchKmers}{character,character}(k, subject, out = c("matches", "positions"), ranges = NULL) -\S4method{matchKmers}{character,DNAString}(k, subject, out = c("matches", - "positions"), ranges = NULL) +\S4method{matchKmers}{character,DNAString}(k, subject, out = c("matches", "positions"), ranges = NULL) -\S4method{matchKmers}{character,GenomicRanges}(k, subject, - genome = GenomeInfoDb::genome(subject), out = c("matches", "positions")) +\S4method{matchKmers}{character,GenomicRanges}( + k, + subject, + genome = Seqinfo::genome(subject), + out = c("matches", "positions") +) \S4method{matchKmers}{character,RangedSummarizedExperiment}(k, subject, ...) @@ -66,25 +66,25 @@ GenomicRanges object with all the positions of matches } \section{Methods (by class)}{ \itemize{ -\item \code{k = character,subject = DNAStringSet}: For DNAStringSet Objects +\item \code{matchKmers(k = character, subject = DNAStringSet)}: For DNAStringSet Objects -\item \code{k = character,subject = character}: For character strings +\item \code{matchKmers(k = character, subject = character)}: For character strings -\item \code{k = character,subject = DNAString}: For DNA String objects +\item \code{matchKmers(k = character, subject = DNAString)}: For DNA String objects -\item \code{k = character,subject = GenomicRanges}: For GenomicRanges +\item \code{matchKmers(k = character, subject = GenomicRanges)}: For GenomicRanges -\item \code{k = character,subject = RangedSummarizedExperiment}: For RangedSummarizedExperiment (containing GRanges in +\item \code{matchKmers(k = character, subject = RangedSummarizedExperiment)}: For RangedSummarizedExperiment (containing GRanges in rowRanges) -\item \code{k = numeric,subject = ANY}: Catch-all for other un-documented types +\item \code{matchKmers(k = numeric, subject = ANY)}: Catch-all for other un-documented types -\item \code{k = DNAStringSet,subject = ANY}: Catch-all for other un-documented types with +\item \code{matchKmers(k = DNAStringSet, subject = ANY)}: Catch-all for other un-documented types with DNAStringSet -\item \code{k = DNAString,subject = ANY}: Catch-all for other un-documented types with DNAString -}} +\item \code{matchKmers(k = DNAString, subject = ANY)}: Catch-all for other un-documented types with DNAString +}} \examples{ # Load very small example counts (already filtered) diff --git a/man/plotDeviationsTsne.Rd b/man/plotDeviationsTsne.Rd index c94a94c..d465838 100644 --- a/man/plotDeviationsTsne.Rd +++ b/man/plotDeviationsTsne.Rd @@ -4,8 +4,14 @@ \alias{plotDeviationsTsne} \title{plotDeviationsTsne} \usage{ -plotDeviationsTsne(object, tsne, var_df = NULL, sample_column = NULL, - annotation_name = NULL, shiny = interactive()) +plotDeviationsTsne( + object, + tsne, + var_df = NULL, + sample_column = NULL, + annotation_name = NULL, + shiny = interactive() +) } \arguments{ \item{object}{deviations result object} diff --git a/man/plotVariability.Rd b/man/plotVariability.Rd index 11b4161..d7aec29 100644 --- a/man/plotVariability.Rd +++ b/man/plotVariability.Rd @@ -4,8 +4,13 @@ \alias{plotVariability} \title{plotVariability} \usage{ -plotVariability(variability, xlab = "Sorted TFs", n = 3, - labels = variability$name, use_plotly = interactive()) +plotVariability( + variability, + xlab = "Sorted TFs", + n = 3, + labels = variability$name, + use_plotly = interactive() +) } \arguments{ \item{variability}{output from \code{\link{computeVariability}}} diff --git a/man/rbind-chromVARDeviations-method.Rd b/man/rbind-chromVARDeviations-method.Rd index 4197632..7d3c961 100644 --- a/man/rbind-chromVARDeviations-method.Rd +++ b/man/rbind-chromVARDeviations-method.Rd @@ -1,6 +1,5 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/compute_deviations.R -\docType{methods} \name{rbind,chromVARDeviations-method} \alias{rbind,chromVARDeviations-method} \title{rbind method chromVARDeviations} diff --git a/src/Makevars b/src/Makevars index 22ebc63..9defeb6 100644 --- a/src/Makevars +++ b/src/Makevars @@ -1 +1,2 @@ +CXX_STD = CXX14 PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) diff --git a/src/RcppExports.cpp b/src/RcppExports.cpp index f2d73ec..a18a3de 100644 --- a/src/RcppExports.cpp +++ b/src/RcppExports.cpp @@ -6,6 +6,11 @@ using namespace Rcpp; +#ifdef RCPP_USE_GLOBAL_ROSTREAM +Rcpp::Rostream& Rcpp::Rcout = Rcpp::Rcpp_cout_get(); +Rcpp::Rostream& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get(); +#endif + // pwm_euclidean double pwm_euclidean(arma::mat mat1, arma::mat mat2); RcppExport SEXP _chromVAR_pwm_euclidean(SEXP mat1SEXP, SEXP mat2SEXP) {