SPsimSeq

Semi-parametric simulation of bulk and single cell RNA-seq data

https://github.com/centerforstatistics-ugent/spsimseq

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.2%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

Semi-parametric simulation of bulk and single cell RNA-seq data

Basic Info
  • Host: GitHub
  • Owner: CenterForStatistics-UGent
  • Language: R
  • Default Branch: master
  • Size: 15.8 MB
Statistics
  • Stars: 10
  • Watchers: 1
  • Forks: 5
  • Open Issues: 4
  • Releases: 2
Created over 7 years ago · Last pushed over 1 year ago
Metadata Files
Readme

README.Rmd

---
title: "SPsimSeq"
output: "github_document"
---

This is the github repo for the SPsimSeq R package. 

# Overview
SPsimSeq uses a specially designed exponential family for density estimation to constructs the distribution of gene expression levels from a given real RNA sequencing data (single-cell or bulk), and subsequently, simulates a new dataset from the estimated marginal distributions using Gaussian-copulas to retain the dependence between genes. It allows simulation of multiple groups and batches with any required sample size and library size.

# Installation
 
Github installation

```{r githubinstall, eval=FALSE}
library(devtools)
install_github("CenterForStatistics-UGent/SPsimSeq")
```

BioConductor installation

```{r biocinstall, eval = FALSE}
library(BiocManager)
BiocManager::install("SPsimSeq")
```

```{r loadspsimseqpackage}
suppressPackageStartupMessages(library(SPsimSeq))
cat("SPsimSeq package version", 
    as.character(packageVersion("SPsimSeq")), "\n")
```

# Demonstrations
 
## Example 1: simulating bulk RNA-seq

```{r example1} 
# load the Zhang bulk RNA-seq data
data("zhang.data.sub") 
# filter genes with sufficient expression (important step) 
zhang.counts <- zhang.data.sub$counts[rowSums(zhang.data.sub$counts > 0)>=5, ]  
# We simulate only a single data (n.sim = 1) with the following property
# - 2000 genes ( n.genes = 2000) 
# - 20 samples (tot.samples = 20) 
# - the samples are equally divided into 2 groups each with 90 samples 
#   (group.config = c(0.5, 0.5))
# - all samples are from a single batch (batch = NULL, batch.config = 1)
# - we add 10% DE genes (pDE = 0.1) 
# - the DE genes have a log-fold-change of at least 0.5 in 
#   the source data (lfc.thrld = 0.5)
# - we do not model the zeroes separately, they are the part of density 
#    estimation (model.zero.prob = FALSE)
# simulate data
set.seed(6452)
zhang.counts2 <- zhang.counts[sample(nrow(zhang.counts), 2000), ]
sim.data.bulk <- SPsimSeq(n.sim = 1, s.data = zhang.counts2,
                          group = zhang.data.sub$MYCN.status, n.genes = 2000, 
                          batch.config = 1,
                          group.config = c(0.5, 0.5), tot.samples = 20, 
                          pDE = 0.1, lfc.thrld = 0.5, 
                          result.format = "list")
sim.data.bulk1 <- sim.data.bulk[[1]]                              
head(sim.data.bulk1$counts[, seq_len(5)])  # count data
head(sim.data.bulk1$colData)               # sample info
head(sim.data.bulk1$rowData)               # gene info
```

## Example 2: simulating single cell RNA-seq from a single batch (read-counts)

```{r example2}
# we simulate only a single scRNA-seq data (n.sim = 1) with the following property
# - 2000 genes (n.genes = 2000) 
# - 100 cells (tot.samples = 100) 
# - the cells are equally divided into 2 groups each with 50 cells 
#   (group.config = c(0.5, 0.5))
# - all cells are from a single batch (batch = NULL, batch.config = 1)
# - we add 10% DE genes (pDE = 0.1) 
# - the DE genes have a log-fold-change of at least 0.5
# - we model the zeroes separately (model.zero.prob = TRUE)
# - the ouput will be in SingleCellExperiment class object (result.format = "SCE")
suppressPackageStartupMessages(library(SingleCellExperiment))
# load the NGP nutlin data (availabl with the package, processed with 
# SMARTer/C1 protocol, and contains read-counts)
data("scNGP.data")
# filter genes with sufficient expression level (important step) 
scNGP.data2 <- scNGP.data[rowSums(counts(scNGP.data) > 0)>=5, ]  
treatment <- ifelse(scNGP.data2$characteristics..treatment=="nutlin",2,1)
set.seed(654321)
scNGP.data2 <- scNGP.data2[sample(nrow(scNGP.data2), 2000), ]
# simulate data (we simulate here only a single data, n.sim = 1)
sim.data.sc <- SPsimSeq(n.sim = 1, s.data = scNGP.data2,
                        group = treatment, n.genes = 2000, batch.config = 1,
                        group.config = c(0.5, 0.5), tot.samples = 100, 
                        pDE = 0.1, lfc.thrld = 0.5, model.zero.prob = TRUE,
                        result.format = "SCE")
sim.data.sc1 <- sim.data.sc[[1]]
class(sim.data.sc1)
head(counts(sim.data.sc1)[, seq_len(5)])
colData(sim.data.sc1)
rowData(sim.data.sc1)
```

Owner

  • Name: Ghent University - Center for Statistics
  • Login: CenterForStatistics-UGent
  • Kind: organization
  • Email: Joris.Meys@UGent.be
  • Location: Ghent, Belgium

Repositories related to statistical research at Ghent University.

GitHub Events

Total
  • Issue comment event: 4
  • Push event: 2
Last Year
  • Issue comment event: 4
  • Push event: 2

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 124
  • Total Committers: 4
  • Avg Commits per committer: 31.0
  • Development Distribution Score (DDS): 0.145
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
shawinke s****l@u****e 106
AlemuTakele a****k@h****m 13
AlemuTakele a****k@g****m 4
Katrin Leinweber 9****r 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 17
  • Total pull requests: 6
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 5 days
  • Total issue authors: 11
  • Total pull request authors: 2
  • Average comments per issue: 1.94
  • Average comments per pull request: 0.17
  • Merged pull requests: 5
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • sthawinke (5)
  • jiananwehi (2)
  • annajbott (2)
  • duohongrui (1)
  • Felitsiya (1)
  • GD-Wong (1)
  • AlemuTA (1)
  • Zanvine-gitcode (1)
  • jianhaizhang (1)
  • caiquanyou (1)
  • koenvandenberge (1)
Pull Request Authors
  • sthawinke (5)
  • katrinleinweber (1)
Top Labels
Issue Labels
enhancement (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • bioconductor 10,580 total
  • Total dependent packages: 2
  • Total dependent repositories: 0
  • Total versions: 5
  • Total maintainers: 1
bioconductor.org: SPsimSeq

Semi-parametric simulation tool for bulk and single-cell RNA sequencing data

  • Versions: 5
  • Dependent Packages: 2
  • Dependent Repositories: 0
  • Downloads: 10,580 Total
Rankings
Dependent repos count: 0.0%
Stargazers count: 8.5%
Forks count: 15.3%
Dependent packages count: 19.9%
Average: 24.3%
Downloads: 77.7%
Maintainers (1)
Last synced: 11 months ago