bcbioSingleCell is an S4 class that extends SingleCellExperiment, and is designed to store a bcbio single-cell RNA-seq analysis. This class contains read counts saved as a sparse matrix (sparseMatrix), sample metadata, and cell quality control metrics.

bcbioSingleCell(
  uploadDir,
  sampleMetadataFile = NULL,
  organism = NULL,
  ensemblRelease = NULL,
  genomeBuild = NULL,
  gffFile = NULL,
  transgeneNames = NULL,
  interestingGroups = "sampleName",
  BPPARAM = BiocParallel::bpparam()
)

Arguments

uploadDir

character(1). Final upload directory path.

sampleMetadataFile

character(1). Sample metadata file path. CSV or TSV is preferred, but Excel worksheets are also supported. Check the documentation for conventions and required columns.

organism

character(1). Full Latin organism name (e.g. "Homo sapiens").

ensemblRelease

integer(1). Ensembl release version (e.g. 90). We recommend setting this value if possible, for improved reproducibility. When left unset, the latest release available via AnnotationHub/ensembldb is used. Note that the latest version available can vary, depending on the versions of AnnotationHub and ensembldb in use.

genomeBuild

character(1). Ensembl genome build assembly name (e.g. "GRCh38"). If set NULL, defaults to the most recent build available. Note: don't pass in UCSC build IDs (e.g. "hg38").

gffFile

character(1). GFF/GTF (General Feature Format) file. Generally, we recommend using GTF (GFFv2) instead of GFFv3.

transgeneNames

character. Vector indicating which assay rows denote transgenes (e.g. EGFP, TDTOMATO).

interestingGroups

character. Groups of interest to use for visualization. Corresponds to factors describing the columns of the object.

BPPARAM

An optional BiocParallelParam instance determining the parallel back-end to be used during evaluation, or a list of BiocParallelParam instances, to be applied in sequence for nested calls to BiocParallel functions.

Value

bcbioSingleCell.

Note

Updated 2021-02-22.

Remote data

When working in RStudio, we recommend connecting to the bcbio-nextgen run directory as a remote connection over sshfs.

See also

Author

Michael Steinbaugh

Examples

uploadDir <- system.file("extdata/indrops", package = "bcbioSingleCell") x <- bcbioSingleCell(uploadDir)
#>
#> ๐Ÿงช => bcbioSingleCell
#> โ†’ Importing bcbio-nextgen single-cell RNA-seq run
#> projectDir: 2018-01-01_bcbio
#> โ„น 1 sample detected:
#> โ— multiplexed_AAAAAAAA
#> โ†’ Importing project-summary.yaml at /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpW55KDq/temp_libpatha29b1db85ba9/bcbioSingleCell/extdata/indrops/2018-01-01_bcbio using yaml::`yaml.load_file()`.
#> ! Data versions are missing.
#> โ†’ Importing programs.txt at /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpW55KDq/temp_libpatha29b1db85ba9/bcbioSingleCell/extdata/indrops/2018-01-01_bcbio using vroom::`vroom()`.
#> โ†’ Importing bcbio-nextgen.log at /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpW55KDq/temp_libpatha29b1db85ba9/bcbioSingleCell/extdata/indrops/2018-01-01_bcbio using vroom::`vroom_lines()`.
#> ! bcbio-nextgen.log file is empty.
#> โ†’ Importing bcbio-nextgen-commands.log at /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpW55KDq/temp_libpatha29b1db85ba9/bcbioSingleCell/extdata/indrops/2018-01-01_bcbio using vroom::`vroom_lines()`.
#> โ„น 1000 reads per cellular barcode cutoff detected.
#> Counts will imported as genes.
#> UMI type: harvard-indrop-v3
#> ๐Ÿงช ==> Sample metadata
#> ๐Ÿงช ==> Counts
#> โ†’ Importing counts.
#> โ†’ Importing multiplexed-AAAAAAAA.mtx.rownames at /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpW55KDq/temp_libpatha29b1db85ba9/bcbioSingleCell/extdata/indrops/multiplexed-AAAAAAAA using vroom::`vroom_lines()`.
#> โ†’ Importing multiplexed-AAAAAAAA.mtx.colnames at /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpW55KDq/temp_libpatha29b1db85ba9/bcbioSingleCell/extdata/indrops/multiplexed-AAAAAAAA using vroom::`vroom_lines()`.
#> โ†’ Importing multiplexed-AAAAAAAA.mtx at /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpW55KDq/temp_libpatha29b1db85ba9/bcbioSingleCell/extdata/indrops/multiplexed-AAAAAAAA using Matrix::`readMM()`.
#> โ†’ Importing sidecar multiplexed-AAAAAAAA.mtx.rownames at /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpW55KDq/temp_libpatha29b1db85ba9/bcbioSingleCell/extdata/indrops/multiplexed-AAAAAAAA.
#> โ†’ Importing multiplexed-AAAAAAAA.mtx.rownames at /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpW55KDq/temp_libpatha29b1db85ba9/bcbioSingleCell/extdata/indrops/multiplexed-AAAAAAAA using vroom::`vroom_lines()`.
#> โ†’ Importing sidecar multiplexed-AAAAAAAA.mtx.colnames at /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpW55KDq/temp_libpatha29b1db85ba9/bcbioSingleCell/extdata/indrops/multiplexed-AAAAAAAA.
#> โ†’ Importing multiplexed-AAAAAAAA.mtx.colnames at /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpW55KDq/temp_libpatha29b1db85ba9/bcbioSingleCell/extdata/indrops/multiplexed-AAAAAAAA using vroom::`vroom_lines()`.
#> โ†’ Imported multiplexed-AAAAAAAA.
#> ๐Ÿงช ==> Feature metadata
#> bcbio GTF file: #> /n/app/bcbio/dev/genomes/Hsapiens/hg38/rnaseq/ref-transcripts.gtf
#> ! bcbio GTF file is not accessible.
#> ! Slotting empty ranges into `rowRanges()`.
#> ๐Ÿงช ==> Column data
#> ! `sampleMetadataFile` is recommended for multiplexed samples (e.g. harvard-indrop-v3).
#> ๐Ÿงช ==> Metadata
#> โ†’ Importing unfiltered cellular barcode distributions.
#> โ†’ Importing multiplexed-AAAAAAAA-barcodes.tsv at /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpW55KDq/temp_libpatha29b1db85ba9/bcbioSingleCell/extdata/indrops/multiplexed-AAAAAAAA using vroom::`vroom()`.
#> โ†’ Calculating 100 sample metrics.
#> ! Calculating metrics without biotype information. #> `rowRanges()` required to calculate: `nCoding, nMito, mitoRatio`.
#> โœ” bcbio single-cell RNA-seq run imported successfully.
print(x)
#> bcbioSingleCell 0.4.16 #> uploadDir: /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpW55KDq/temp_libpatha29b1db85ba9/bcbioSingleCell/extdata/indrops #> dates(2): [bcbio] 2018-01-01; [R] 2021-03-12 #> level: genes #> interestingGroups: sampleName #> filtered: FALSE #> class: SingleCellExperiment #> dim: 50 100 #> metadata(27): allSamples bcbioCommandsLog ... wd yaml #> assays(1): counts #> rownames(50): ENSG00000071082 ENSG00000100316 ... ENSG00000269028 #> ENSG00000282105 #> rowData names(0): #> colnames(100): AAACACTA_CTTCGATT AAACTACA_CCACATTA ... #> TGGGAATT_ATATAGGA TGTTATCA_ACGCAGAG #> colData names(9): log10FeaturesPerCount mitoRatio ... sampleId #> sampleName #> reducedDimNames(0): #> altExpNames(0):
x <- bcbioSingleCell( uploadDir = uploadDir, sampleMetadataFile = file.path(uploadDir, "metadata.csv") )
#>
#> ๐Ÿงช => bcbioSingleCell
#> โ†’ Importing bcbio-nextgen single-cell RNA-seq run
#> projectDir: 2018-01-01_bcbio
#> โ„น 1 sample detected:
#> โ— multiplexed_AAAAAAAA
#> โ†’ Importing project-summary.yaml at /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpW55KDq/temp_libpatha29b1db85ba9/bcbioSingleCell/extdata/indrops/2018-01-01_bcbio using yaml::`yaml.load_file()`.
#> ! Data versions are missing.
#> โ†’ Importing programs.txt at /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpW55KDq/temp_libpatha29b1db85ba9/bcbioSingleCell/extdata/indrops/2018-01-01_bcbio using vroom::`vroom()`.
#> โ†’ Importing bcbio-nextgen.log at /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpW55KDq/temp_libpatha29b1db85ba9/bcbioSingleCell/extdata/indrops/2018-01-01_bcbio using vroom::`vroom_lines()`.
#> ! bcbio-nextgen.log file is empty.
#> โ†’ Importing bcbio-nextgen-commands.log at /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpW55KDq/temp_libpatha29b1db85ba9/bcbioSingleCell/extdata/indrops/2018-01-01_bcbio using vroom::`vroom_lines()`.
#> โ„น 1000 reads per cellular barcode cutoff detected.
#> Counts will imported as genes.
#> UMI type: harvard-indrop-v3
#> ๐Ÿงช ==> Sample metadata
#> โ†’ Importing metadata.csv at /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpW55KDq/temp_libpatha29b1db85ba9/bcbioSingleCell/extdata/indrops using vroom::`vroom()`.
#> โ„น Multiplexed samples detected.
#> ๐Ÿงช ==> Counts
#> โ†’ Importing counts.
#> โ†’ Importing multiplexed-AAAAAAAA.mtx.rownames at /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpW55KDq/temp_libpatha29b1db85ba9/bcbioSingleCell/extdata/indrops/multiplexed-AAAAAAAA using vroom::`vroom_lines()`.
#> โ†’ Importing multiplexed-AAAAAAAA.mtx.colnames at /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpW55KDq/temp_libpatha29b1db85ba9/bcbioSingleCell/extdata/indrops/multiplexed-AAAAAAAA using vroom::`vroom_lines()`.
#> โ†’ Importing multiplexed-AAAAAAAA.mtx at /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpW55KDq/temp_libpatha29b1db85ba9/bcbioSingleCell/extdata/indrops/multiplexed-AAAAAAAA using Matrix::`readMM()`.
#> โ†’ Importing sidecar multiplexed-AAAAAAAA.mtx.rownames at /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpW55KDq/temp_libpatha29b1db85ba9/bcbioSingleCell/extdata/indrops/multiplexed-AAAAAAAA.
#> โ†’ Importing multiplexed-AAAAAAAA.mtx.rownames at /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpW55KDq/temp_libpatha29b1db85ba9/bcbioSingleCell/extdata/indrops/multiplexed-AAAAAAAA using vroom::`vroom_lines()`.
#> โ†’ Importing sidecar multiplexed-AAAAAAAA.mtx.colnames at /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpW55KDq/temp_libpatha29b1db85ba9/bcbioSingleCell/extdata/indrops/multiplexed-AAAAAAAA.
#> โ†’ Importing multiplexed-AAAAAAAA.mtx.colnames at /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpW55KDq/temp_libpatha29b1db85ba9/bcbioSingleCell/extdata/indrops/multiplexed-AAAAAAAA using vroom::`vroom_lines()`.
#> โ†’ Imported multiplexed-AAAAAAAA.
#> ๐Ÿงช ==> Feature metadata
#> bcbio GTF file: #> /n/app/bcbio/dev/genomes/Hsapiens/hg38/rnaseq/ref-transcripts.gtf
#> ! bcbio GTF file is not accessible.
#> ! Slotting empty ranges into `rowRanges()`.
#> ๐Ÿงช ==> Column data
#> ๐Ÿงช ==> Metadata
#> โ†’ Importing unfiltered cellular barcode distributions.
#> โ†’ Importing multiplexed-AAAAAAAA-barcodes.tsv at /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpW55KDq/temp_libpatha29b1db85ba9/bcbioSingleCell/extdata/indrops/multiplexed-AAAAAAAA using vroom::`vroom()`.
#> โ†’ Calculating 100 sample metrics.
#> ! Calculating metrics without biotype information. #> `rowRanges()` required to calculate: `nCoding, nMito, mitoRatio`.
#> โœ” bcbio single-cell RNA-seq run imported successfully.
print(x)
#> bcbioSingleCell 0.4.16 #> uploadDir: /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpW55KDq/temp_libpatha29b1db85ba9/bcbioSingleCell/extdata/indrops #> dates(2): [bcbio] 2018-01-01; [R] 2021-03-12 #> level: genes #> sampleMetadataFile: /private/var/folders/l1/8y8sjzmn15v49jgrqglghcfr0000gn/T/RtmpW55KDq/temp_libpatha29b1db85ba9/bcbioSingleCell/extdata/indrops/metadata.csv #> interestingGroups: sampleName #> filtered: FALSE #> class: SingleCellExperiment #> dim: 50 100 #> metadata(27): allSamples bcbioCommandsLog ... wd yaml #> assays(1): counts #> rownames(50): ENSG00000071082 ENSG00000100316 ... ENSG00000269028 #> ENSG00000282105 #> rowData names(0): #> colnames(100): AAACACTA_CTTCGATT AAACTACA_CCACATTA ... #> TGGGAATT_ATATAGGA TGTTATCA_ACGCAGAG #> colData names(15): aggregate description ... sampleName sequence #> reducedDimNames(0): #> altExpNames(0):