Crandore Hub

glmmSeq

General Linear Mixed Models for Gene-Level Differential Expression

Using mixed effects models to analyse longitudinal gene expression can highlight differences between sample groups over time. The most widely used differential gene expression tools are unable to fit linear mixed effect models, and are less optimal for analysing longitudinal data. This package provides negative binomial and Gaussian mixed effects models to fit gene expression and other biological data across repeated samples. This is particularly useful for investigating changes in RNA-Sequencing gene expression between groups of individuals over time, as described in: Rivellese, F., Surace, A. E., Goldmann, K., Sciacca, E., Cubuk, C., Giorli, G., ... Lewis, M. J., & Pitzalis, C. (2022) Nature medicine <doi:10.1038/s41591-022-01789-0>.

README

[![Lifecycle: Maturing](https://img.shields.io/badge/lifecycle-stable-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html)
[![License: MIT](https://img.shields.io/badge/License-MIT-mediumpurple.svg)](https://choosealicense.com/licenses/mit/)
[![CRAN status](https://www.r-pkg.org/badges/version/glmmSeq)](https://cran.r-project.org/package=glmmSeq)
[![GitHub issues](https://img.shields.io/github/issues/myles-lewis/glmmSeq.svg)](https://GitHub.com/myles-lewis/glmmSeq/issues/)
[![GitHub
tag](https://img.shields.io/github/tag/myles-lewis/glmmSeq.svg)](https://GitHub.com/myles-lewis/glmmSeq/tags/)
[![Downloads](https://cranlogs.r-pkg.org/badges/grand-total/glmmSeq?color=orange)](https://CRAN.R-project.org/package=glmmSeq)

# glmmSeq 

<img src="https://myles-lewis.github.io/glmmSeq/logo.png" align="right" alt="" width="200" hspace="20" />



This R package is designed to model gene expression with a general linear mixed model (GLMM). This allows us to include random effects as well as fixed effects. For the purpose of the package we use the `glmer` function from the [`lme4`](https://CRAN.R-project.org/package=lme4)
package which fits a GLMM.

This package focuses in particular on changes in genes expression between different response or treatment groups over time. 


# Loading the package

### From CRAN

```
install.packages("glmmSeq")
```

### From Github

```
devtools::install_github("myles-lewis/glmmSeq")
```

### Locally

You can also download the source directory and load the functions individually:

```
functions = list.files("./R", full.names = TRUE)
invisible(lapply(functions, source))
```

But you will need to load in the additional libraries then:

```
# Install CRAN packages
invisible(lapply(c("MASS", "car", "ggplot2", "ggpubr", "lme4", 
                   "lmerTest", "methods", "parallel", "plotly", 
                   "pbapply", "pbmcapply"),
                 function(p){
                   if(! p %in% rownames(installed.packages())) {
                     install.packages(p)
                   }
                   library(p, character.only=TRUE)
                 }))

# Install BioConductor packages
if (!requireNamespace("BiocManager", quietly = TRUE))
  install.packages("BiocManager")
invisible(lapply(c("qvalue"), function(p){
  if(! p %in% rownames(installed.packages())) BiocManager::install(p)
  library(p, character.only=TRUE)
}))
```

# Example script

For examples see the [vignette](https://myles-lewis.github.io/glmmSeq/articles/glmmSeq.html). 

# Reference

glmmSeq was developed by the bioinformatics team at the [Experimental Medicine & Rheumatology department](https://www.qmul.ac.uk/whri/emr/) at Queen Mary University London.

If you use this package please cite as:

```
citation("glmmSeq")

## To cite package ‘glmmSeq’ in publications use:
##
##  Myles Lewis, Katriona Goldmann, Elisabetta Sciacca, Cankut Cubuk and Anna Surace (2021). 
##  glmmSeq: General Linear Mixed Models for Gene-level Differential Expression. 
##  R package version 0.5.4. https://github.com/myles-lewis/glmmSeq
##
## A BibTeX entry for LaTeX users is
##
##  @Manual{,
##    title = {glmmSeq: General Linear Mixed Models for Gene-level Differential Expression},
##    author = {Myles Lewis and Katriona Goldmann and Elisabetta Sciacca and Cankut Cubuk and Anna Surace},
##    year = {2022},
##    note = {R package version 0.5.4},
##    url = {https://github.com/myles-lewis/glmmSeq},
##  }
```

Versions across snapshots

VersionRepositoryFileSize
0.5.7 rolling linux/jammy R-4.5 glmmSeq_0.5.7.tar.gz 1.6 MiB
0.5.7 rolling linux/noble R-4.5 glmmSeq_0.5.7.tar.gz 1.6 MiB
0.5.7 rolling source/ R- glmmSeq_0.5.7.tar.gz 1.6 MiB
0.5.7 latest linux/jammy R-4.5 glmmSeq_0.5.7.tar.gz 1.6 MiB
0.5.7 latest linux/noble R-4.5 glmmSeq_0.5.7.tar.gz 1.6 MiB
0.5.7 latest source/ R- glmmSeq_0.5.7.tar.gz 1.6 MiB
0.5.7 2026-04-26 source/ R- glmmSeq_0.5.7.tar.gz 1.6 MiB
0.5.7 2026-04-23 source/ R- glmmSeq_0.5.7.tar.gz 1.6 MiB
0.5.5 2025-04-20 source/ R- glmmSeq_0.5.5.tar.gz 1.6 MiB

Dependencies (latest)

Imports

Suggests