build_sce: Build the SCE object from the counts matrix

View source: R/build_sce.R

build_sceR Documentation

Build the SCE object from the counts matrix

Description

Build the SCE object from the counts matrix

Usage

build_sce(counts, include_unspliced = TRUE, round_counts = TRUE)

Arguments

counts

Counts matrix with rownames corresponding to gene names and colnames corresponding to cell barcodes. Can be a counts matrix with intron counts specified by -I or an alevin-fry "USA" matrix, with intron counts marked by "-U" and ambiguous counts "-A".

include_unspliced

Whether or not to include the unspliced reads in the counts matrix. If TRUE, the main "counts" assay will contain unspliced reads and spliced reads and an additional "spliced" assay will contain spliced reads only. If TRUE, requires that data has been aligned to a reference containing spliced and unspliced reads. Default is TRUE.

round_counts

Logical indicating in the count matrix should be rounded to integers on import. Default is TRUE.

Value

SingleCellExperiment object. If 'include_unspliced' is TRUE (default), the counts assay will contain both spliced and unspliced counts and the spliced assay will contain the counts for just the spliced cDNA. If 'include_unspliced' is FALSE, the counts assay will contain spliced cDNA counts only.

Examples

## Not run: 

# build a SCE object with only spliced cDNA as the main counts assay
build_sce(counts)

# build a SCE object with unspliced cDNA as the main counts assay and spliced
# counts as a second assay
build_sce(counts,
  include_unspliced = TRUE
)

## End(Not run)

AlexsLemonade/scpcaTools documentation built on July 12, 2024, 8:34 a.m.