Skip to content

Commit

Permalink
Merge pull request #295 from MarioniLab/devel
Browse files Browse the repository at this point in the history
Add NB-GLMM to master branch and upgrade to version 2.0
  • Loading branch information
MikeDMorgan authored Nov 9, 2023
2 parents a553200 + dfa360e commit 51a8e46
Show file tree
Hide file tree
Showing 73 changed files with 8,130 additions and 150 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/RCMD_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ on:
- main
- master
- devel
- alice_fast
- alice
- genetic_case
pull_request:
branches:
- main
- master
- devel
- alice

name: R-CMD-check

Expand Down Expand Up @@ -42,11 +40,11 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v1
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}

- uses: r-lib/actions/setup-pandoc@v1
- uses: r-lib/actions/setup-pandoc@v2

- name: Query dependencies
run: |
Expand Down Expand Up @@ -74,8 +72,8 @@ jobs:
- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
BiocManager::install("MouseGastrulationData")
remotes::install_cran(c("rcmdcheck", "XML", "RCurl"))
BiocManager::install(c("MouseGastrulationData", "MouseThymusAgeing", "scRNAseq"))
shell: Rscript {0}

- name: Check
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ doc
Meta
docs
.Rproj.user
*yml
*yml
*.o
*~
28 changes: 21 additions & 7 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,31 +1,36 @@
Package: miloR
Type: Package
Title: Differential neighbourhood abundance testing on a graph
Version: 1.9.99
Version: 1.99.9
Authors@R:
c(person("Mike", "Morgan", role=c("aut", "cre"), email="[email protected]"),
comment=c(ORCID="0000-0003-0757-0711"),
c(person("Mike", "Morgan", role=c("aut", "cre"), email="[email protected]",
comment=c(ORCID="0000-0003-0757-0711")),
person("Emma", "Dann", role=c("aut", "ctb"), email="[email protected]"))
Description: Milo performs single-cell differential abundance testing. Cell states are modelled
as representative neighbourhoods on a nearest neighbour graph. Hypothesis testing is performed using a
negative bionomial generalized linear model.
as representative neighbourhoods on a nearest neighbour graph. Hypothesis testing is performed using either
a negative bionomial generalized linear model or negative binomial generalized linear mixed model.
License: GPL-3 + file LICENSE
Encoding: UTF-8
URL: https://marionilab.github.io/miloR
BugReports: https://github.com/MarioniLab/miloR/issues
biocViews: SingleCell, MultipleComparison, FunctionalGenomics, Software
LinkingTo: Rcpp,
RcppArmadillo,
RcppEigen
Depends: R (>= 4.0.0),
edgeR
Imports: BiocNeighbors,
BiocGenerics,
SingleCellExperiment,
Matrix (>= 1.3-0),
MatrixGenerics,
S4Vectors,
stats,
stringr,
methods,
igraph,
irlba,
utils,
cowplot,
BiocParallel,
BiocSingular,
Expand All @@ -42,10 +47,11 @@ Imports: BiocNeighbors,
ggrepel,
ggbeeswarm,
RColorBrewer,
grDevices
grDevices,
Rcpp,
numDeriv
Suggests:
testthat,
MASS,
mvtnorm,
scater,
scran,
Expand All @@ -59,7 +65,9 @@ Suggests:
MouseThymusAgeing,
magick,
RCurl,
MASS,
curl,
scRNAseq,
graphics
RoxygenNote: 7.2.3
NeedsCompilation: no
Expand All @@ -71,15 +79,19 @@ Collate:
'buildGraph.R'
'calcNhoodExpression.R'
'calcNhoodDistance.R'
'checkSeparation.R'
'countCells.R'
'findNhoodMarkers.R'
'graphSpatialFDR.R'
'glmm.R'
'makeNhoods.R'
'milo.R'
'miloR-package.R'
'methods.R'
'plotNhoods.R'
'sim_discrete.R'
'sim_family.R'
'sim_nbglmm.R'
'sim_trajectory.R'
'testNhoods.R'
'testDiffExp.R'
Expand All @@ -88,4 +100,6 @@ Collate:
'annotateNhoods.R'
'groupNhoods.R'
'findNhoodGroupMarkers.R'
'RcppExports.R'
'miloR.R'
VignetteBuilder: knitr
26 changes: 26 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,30 @@ export("nhoodIndex<-")
export("nhoodReducedDim<-")
export("nhoods<-")
export(.calc_distance)
export(.parse_formula)
export(.rEParse)
export(Milo)
export(Satterthwaite_df)
export(annotateNhoods)
export(buildFromAdjacency)
export(buildGraph)
export(buildNhoodGraph)
export(calcNhoodDistance)
export(calcNhoodExpression)
export(checkSeparation)
export(computePvalue)
export(countCells)
export(findNhoodGroupMarkers)
export(findNhoodMarkers)
export(fitGLMM)
export(glmmControl.defaults)
export(graph)
export(graphSpatialFDR)
export(groupNhoods)
export(initialiseG)
export(initializeFullZ)
export(makeNhoods)
export(matrix.trace)
export(nhoodAdjacency)
export(nhoodCounts)
export(nhoodDistances)
Expand Down Expand Up @@ -80,18 +90,26 @@ importFrom(BiocGenerics,which)
importFrom(BiocNeighbors,KmknnParam)
importFrom(BiocNeighbors,findKNN)
importFrom(BiocParallel,SerialParam)
importFrom(BiocParallel,bplapply)
importFrom(BiocParallel,bpok)
importFrom(BiocParallel,bpoptions)
importFrom(BiocParallel,bptry)
importFrom(BiocSingular,bsparam)
importFrom(Matrix,Matrix)
importFrom(Matrix,colSums)
importFrom(Matrix,crossprod)
importFrom(Matrix,diag)
importFrom(Matrix,rowMeans)
importFrom(Matrix,rowSums)
importFrom(Matrix,solve)
importFrom(Matrix,sparseMatrix)
importFrom(Matrix,t)
importFrom(Matrix,tcrossprod)
importFrom(Matrix,tril)
importFrom(Matrix,which)
importFrom(MatrixGenerics,colSums2)
importFrom(RColorBrewer,brewer.pal)
importFrom(Rcpp,evalCpp)
importFrom(S4Vectors,DataFrame)
importFrom(S4Vectors,SimpleList)
importFrom(S4Vectors,coolcat)
Expand Down Expand Up @@ -158,6 +176,7 @@ importFrom(matrixStats,colMedians)
importFrom(methods,as)
importFrom(methods,callNextMethod)
importFrom(methods,slot)
importFrom(numDeriv,jacobian)
importFrom(stats,as.formula)
importFrom(stats,dist)
importFrom(stats,hclust)
Expand All @@ -167,8 +186,15 @@ importFrom(stats,na.exclude)
importFrom(stats,na.fail)
importFrom(stats,na.omit)
importFrom(stats,na.pass)
importFrom(stats,pt)
importFrom(stats,runif)
importFrom(stats,setNames)
importFrom(stats,var)
importFrom(stringr,str_replace)
importFrom(tibble,has_rownames)
importFrom(tibble,rownames_to_column)
importFrom(tidyr,pivot_longer)
importFrom(utils,tail)
importMethodsFrom(Matrix,"%*%")
importMethodsFrom(Matrix,t)
useDynLib(miloR)
8 changes: 7 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# 1.5.0 (TBD)
# 1.7.1 (2023-02-15)
+ Patch to fix `NA` plotting in `plotDABeeswarm`

# 1.60 (2022-11-02)
+ Vignette describing the use of contrasts in `testNhoods`

# 1.5.0 (2022-04-27)
+ Introduce plotting function to visualise neighbourhood count distributions for nhoods interest: `plotNhoodCounts`. Implemented by Nick Hirschmüller

# 1.3.1 (2022-01-07)
Expand Down
11 changes: 9 additions & 2 deletions R/AllClasses.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#' The Milo container class
#' @title
#' Milo class definition
#'
#' @description
#' The class definition container to hold the data structures required for the Milo workflow.
#'
#' @slot graph An igraph object that represents the kNN graph
#' @slot nhoods A CxN binary sparse matrix mapping cells to the neighbourhoods they belong to
Expand All @@ -14,14 +18,17 @@
#' @slot nhoodGraph an igraph object that represents the graph of neighbourhoods
#' @slot .k A hidden slot that stores the value of k used for graph building
#'
#' @returns A Milo class object - see object builder help pages for details
#'
#' @importClassesFrom Matrix dgCMatrix dsCMatrix dgTMatrix dgeMatrix ddiMatrix sparseMatrix
setClassUnion("matrixORMatrix", c("matrix", "dgCMatrix", "dsCMatrix", "ddiMatrix",
"dgTMatrix", "dgeMatrix")) # is there a record for how long a virtual class can be?!
"dgTMatrix", "dgeMatrix"))
setClassUnion("characterORNULL", c("character", "NULL"))
setClassUnion("listORNULL", c("list", "NULL"))
setClassUnion("numericORNULL", c("numeric", "NULL"))
#' @aliases Milo
#' @rdname Milo
#'
#' @export
#' @importFrom SingleCellExperiment SingleCellExperiment
#' @importFrom S4Vectors SimpleList
Expand Down
Loading

0 comments on commit 51a8e46

Please sign in to comment.