R package for bcbio single-cell RNA-seq analysis.

Installation

Bioconductor method

We recommend installing the package with BiocManager.

if (!require("BiocManager")) {
    install.packages("BiocManager")
}
BiocManager::install("remotes")
BiocManager::install("hbc/bcbioSingleCell")

For R < 3.5, BiocManager is not supported. Use BiocInstaller::biocLite() instead of BiocManager::install(). This requires sourcing the legacy Bioconductor biocLite.R script.

# try http:// if https:// URLs are not supported
source("https://bioconductor.org/biocLite.R")

Load bcbio single-cell RNA-seq data

library(bcbioSingleCell)
bcb <- bcbioSingleCell(
    uploadDir = "indrops/final",
    interestingGroups = c("genotype", "treatment"),
    sampleMetadataFile = "sample_metadata.csv",
    organism = "Homo sapiens",
    ensemblRelease = 90L
)
saveData(bcb, dir = ".")

This will return a bcbioSingleCell object, which is an extension of the Bioconductor SingleCellExperiment container class. Consult the bcbioSingleCell() constructor function documentation for detailed information on the supported parameters:

help(topic = "bcbioSingleCell", package = "bcbioSingleCell")

Sample metadata examples

FASTQ files with samples multiplexed by index barcode

This is our current recommended method for analyzing an inDrops dataset. The sample index barcodes are multiplexed per FASTQ set. For Illumina sequencing data, the raw binary base call (BCL) data must be converted into FASTQs (split into R1-R4 files) using bcl2fastq.

The inDrops library version is automatically detected by bcbio, but ensure that the sample index sequences provided match the library version when attempting to create a bcbioSingleCell object. A current list of inDrops v3 index barcodes is available from seqcloud.

Consult the bcbio documentation for more information on how to configure an inDrops run prior to loading into R with the bcbioSingleCell() function.

description index sequence sampleName aggregate
indrops1 17 GGAGGTAA sample1 indrops
indrops1 18 CATAACTG sample2 indrops
indrops2 12 GCGTAAGA sample3 indrops
indrops2 13 CTATTAAG sample4 indrops
indrops2 14 AAGGCTAT sample5 indrops
indrops2 15 GAGCCTTA sample6 indrops
indrops2 16 TTATGCGA sample7 indrops

FASTQ files demultiplexed per sample

This is our current method for handling 10X Genomics Cell Ranger output (using readCellRanger()) and Illumina SureCell sample data.

description genotype
sample1 wildtype
sample2 knockout
sample3 wildtype
sample4 knockout

References

The papers and software cited in our workflows are available as a shared library on Paperpile.