Skip to content

Commit

Permalink
Merge branch 'master' into RELEASE_3_18
Browse files Browse the repository at this point in the history
  • Loading branch information
c-mertes committed Apr 24, 2024
2 parents d00fec0 + b17d86d commit 9c8a146
Show file tree
Hide file tree
Showing 19 changed files with 820 additions and 98 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/check-bioc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ jobs:
fail-fast: false
matrix:
config:
- { os: ubuntu-latest, r: '4.2', bioc: '3.16', cont: "bioconductor/bioconductor_docker:RELEASE_3_16", rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" }
- { os: ubuntu-latest, r: 'next', bioc: '3.17', cont: "bioconductor/bioconductor_docker:RELEASE_3_17", rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" }
- { os: macOS-latest, r: '4.2', bioc: '3.16'}
- { os: windows-latest, r: '4.2', bioc: '3.16'}
# This needs to be updated after each Bioconductor release. Please make sure we have the matching R and Bioc versions in it.
- { os: ubuntu-latest, r: '4.3', bioc: '3.18', cont: "bioconductor/bioconductor_docker:RELEASE_3_18", rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" }
- { os: ubuntu-latest, r: 'next', bioc: '3.19', cont: "bioconductor/bioconductor_docker:devel", rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest" }
- { os: macOS-latest, r: '4.3', bioc: '3.18'}
- { os: windows-latest, r: '4.3', bioc: '3.18'}
## Check https://github.com/r-lib/actions/tree/master/examples
## for examples using the http-user-agent
env:
Expand Down Expand Up @@ -106,16 +107,16 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_16-r-4.2-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_16-r-4.2-
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-${{ runner.bioc }}-r-${{ runner.r }}-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-${{ runner.bioc }}-r-${{ runner.r }}-

- name: Cache R packages on Linux
if: "!contains(github.event.head_commit.message, '/nocache') && runner.os == 'Linux' "
uses: actions/cache@v3
with:
path: /home/runner/work/_temp/Library
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_16-r-4.2-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-RELEASE_3_16-r-4.2-
key: ${{ env.cache-version }}-${{ runner.os }}-biocversion-${{ runner.bioc }}-r-${{ runner.r }}-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-biocversion-${{ runner.bioc }}-r-${{ runner.r }}-

- name: Install Linux system dependencies
if: runner.os == 'Linux'
Expand Down Expand Up @@ -249,7 +250,7 @@ jobs:
rcmdcheck::rcmdcheck(
args = c("--no-manual", "--no-vignettes", "--timings"),
build_args = c("--no-manual", "--keep-empty-dirs", "--no-resave-data"),
error_on = "error",
error_on = "warning",
check_dir = "check"
)
shell: Rscript {0}
Expand Down Expand Up @@ -313,7 +314,7 @@ jobs:
if: failure()
uses: actions/upload-artifact@master
with:
name: ${{ runner.os }}-biocversion-RELEASE_3_16-r-4.2-results
name: ${{ runner.os }}-biocversion-${{ runner.bioc }}-r-${{ runner.r }}-results
path: check

## Note that DOCKER_PASSWORD is really a token for your dockerhub
Expand Down
6 changes: 5 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Imports:
generics,
GenomicRanges,
ggplot2,
ggrepel,
grDevices,
heatmaply,
pheatmap,
Expand Down Expand Up @@ -69,7 +70,10 @@ Suggests:
RMariaDB,
AnnotationDbi,
beeswarm,
covr
covr,
GenomeInfoDb,
ggbio,
biovizBase
LinkingTo:
Rcpp,
RcppArmadillo
Expand Down
16 changes: 16 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export(plotExpectedVsObservedCounts)
export(plotExpressedGenes)
export(plotExpressionRank)
export(plotFPKM)
export(plotManhattan)
export(plotPowerAnalysis)
export(plotQQ)
export(plotSizeFactors)
Expand All @@ -53,6 +54,7 @@ exportMethods(plotAberrantPerSample)
exportMethods(plotCountCorHeatmap)
exportMethods(plotDispEsts)
exportMethods(plotEncDimSearch)
exportMethods(plotManhattan)
exportMethods(plotQQ)
exportMethods(plotVolcano)
exportMethods(results)
Expand All @@ -73,6 +75,7 @@ importFrom(BiocGenerics,plotDispEsts)
importFrom(BiocParallel,SerialParam)
importFrom(BiocParallel,bpisup)
importFrom(BiocParallel,bplapply)
importFrom(BiocParallel,bpmapply)
importFrom(BiocParallel,bpparam)
importFrom(BiocParallel,bpstart)
importFrom(BiocParallel,bpstop)
Expand All @@ -95,14 +98,22 @@ importFrom(DESeq2,sizeFactors)
importFrom(GenomicFeatures,exonsBy)
importFrom(GenomicFeatures,makeTxDbFromGFF)
importFrom(GenomicRanges,GRanges)
importFrom(GenomicRanges,end)
importFrom(GenomicRanges,findOverlaps)
importFrom(GenomicRanges,reduce)
importFrom(GenomicRanges,start)
importFrom(GenomicRanges,width)
importFrom(IRanges,IRanges)
importFrom(PRROC,pr.curve)
importFrom(RColorBrewer,brewer.pal)
importFrom(S4Vectors,"metadata<-")
importFrom(S4Vectors,"values<-")
importFrom(S4Vectors,DataFrame)
importFrom(S4Vectors,endoapply)
importFrom(S4Vectors,metadata)
importFrom(S4Vectors,queryHits)
importFrom(S4Vectors,subjectHits)
importFrom(S4Vectors,values)
importFrom(SummarizedExperiment,"assay<-")
importFrom(SummarizedExperiment,"assays<-")
importFrom(SummarizedExperiment,"colData<-")
Expand All @@ -114,10 +125,13 @@ importFrom(SummarizedExperiment,assays)
importFrom(SummarizedExperiment,colData)
importFrom(SummarizedExperiment,mcols)
importFrom(SummarizedExperiment,rowData)
importFrom(SummarizedExperiment,rowRanges)
importFrom(generics,fit)
importFrom(ggplot2,aes)
importFrom(ggplot2,annotate)
importFrom(ggplot2,element_blank)
importFrom(ggplot2,facet_grid)
importFrom(ggplot2,facet_wrap)
importFrom(ggplot2,geom_abline)
importFrom(ggplot2,geom_bar)
importFrom(ggplot2,geom_histogram)
Expand All @@ -130,6 +144,7 @@ importFrom(ggplot2,geom_vline)
importFrom(ggplot2,ggplot)
importFrom(ggplot2,ggtitle)
importFrom(ggplot2,labs)
importFrom(ggplot2,quo_name)
importFrom(ggplot2,scale_color_brewer)
importFrom(ggplot2,scale_color_identity)
importFrom(ggplot2,scale_color_manual)
Expand All @@ -143,6 +158,7 @@ importFrom(ggplot2,theme_bw)
importFrom(ggplot2,xlab)
importFrom(ggplot2,ylab)
importFrom(ggplot2,ylim)
importFrom(ggrepel,geom_text_repel)
importFrom(grDevices,colorRampPalette)
importFrom(graphics,abline)
importFrom(graphics,axis)
Expand Down
5 changes: 5 additions & 0 deletions R/AllGenerics.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ setGeneric("plotAberrantPerSample", function(object, ...)
setGeneric("plotCountCorHeatmap", function(object, ...)
standardGeneric("plotCountCorHeatmap"))

#' @rdname plotFunctions
#' @export
setGeneric("plotManhattan", function(object, ...)
standardGeneric("plotManhattan"))

#' @importFrom DESeq2 plotDispEsts
#' @noRd
#' @export
Expand Down
15 changes: 7 additions & 8 deletions R/ZscoreMatrix.R
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#'
#' Z score computation
#'
#' Computes the z scores for every count in the matrix.
#' The z score is defined in the log2 space as follows:
#' \ifelse{html}{
#' \out{z<sub>ij</sub> = (l<sub>ij</sub> - mu<sub>j</sub><sup>l</sup>)/
#' sigma<sub>j</sub><sup>l</sup>}}{
#' \deqn{z_{ij} = \frac{l_{ij} - \mu_j^l}{\sigma_j^l}}},
#' where l is the log2 transformed normalized count and mu and sigma the
#' mean and standard deviation for gene j, respectively.
#' Computes the z scores for every count in the matrix.
#' The z score is defined in the log\eqn{_2}{[2]} space as follows:
#' \eqn{z_{ij} = \frac{l_{ij} - \mu_j^l}{
#' \sigma_j^l}}{z_ij = (l[ij] - mu[j]^l)/sigma[ij]}
#' where \code{l} is the log\eqn{_2}{[2]} transformed normalized count and
#' \eqn{\mu}{mu} and \eqn{\sigma}{sigma} the mean and standard deviation
#' for gene \code{j} and sample \code{i}, respectively.
#'
#' @param ods OutriderDataSet
#' @param ... Further arguments passed on to \code{ZscoreMatrix}.
Expand Down
2 changes: 2 additions & 0 deletions R/inputCheckerFunctions.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ checkCountRequirements <- function(ods, test=FALSE){
stop("There are genes without any read. Please filter first ",
"the data with: ods <- filterExpression(ods)")
}
# Filter out genes that have on average less than 1 count per 100 samples.
# Ony affects datasets with more than 100 samples.
filterGenes <- filterGenes | rowSums(counts(ods)) < ncol(ods)/100
if(any(filterGenes) & isFALSE(test)){
stop("The model requires for each gene at least 1 read ",
Expand Down
2 changes: 1 addition & 1 deletion R/method-evaluation.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ aberrant.OUTRIDER <- function(object, padjCutoff=0.05, zScoreCutoff=0,
#' @param by if the results should be summarized by 'sample',
#' 'gene' or not at all (default).
#' @param subsetName The name of a subset of genes of interest for which FDR
#' corected pvalues have been previously computed. Those FDR values
#' corected pvalues were previously computed. Those FDR values
#' on the subset will then be used to determine aberrant status.
#' Default is NULL (using transcriptome-wide FDR corrected pvalues).
#' @param ... Currently not in use.
Expand Down
Loading

0 comments on commit 9c8a146

Please sign in to comment.