Skip to contents

Identical to ExploreDatasetSE_CountQC plus a sgRNA → gene mapping parsed from the SE feature IDs, which are assumed to follow the GENE_<n>_<SEQUENCE> convention.

Value

An R6 class generator; $new() returns an ExploreDatasetSE_CrisprCountQC object.

Details

Inherits .prep() from ExploreDatasetSE_CountQC unchanged.

Super classes

ExploreDataset -> ExploreDatasetSE -> ExploreDatasetSE_CountQC -> ExploreDatasetSE_CrisprCountQC

Methods

Inherited methods


ExploreDatasetSE_CrisprCountQC$clone()

The objects of this class are cloneable with this method.

Usage

ExploreDatasetSE_CrisprCountQC$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

library(SummarizedExperiment)
# Guide counts: 4 guides for each of 10 genes, named GENE_<n>_<SEQUENCE>
set.seed(1)
guides <- sprintf("GENE%d_%d_ACGTACGTACGT", rep(1:10, each = 4), rep(1:4, 10))
counts <- matrix(rpois(40 * 4, 50), nrow = 40, dimnames = list(guides, paste0("S", 1:4)))
samples <- S4Vectors::DataFrame(
  `Condition [Factor]` = rep(c("ctrl", "treated"), each = 2),
  row.names = colnames(counts),
  check.names = FALSE
)
se <- SummarizedExperiment(assays = list(counts = counts), colData = samples)
eds <- ExploreDatasetSE_CrisprCountQC$new(se)
eds
#> <ExploreDatasetSE_CrisprCountQC  (se)>
#>   data_type:        CrisprCountQC
#>   feature_id_kind:  guide
#>   organism:         NA
#>   ref_build:        NA
#>   samples x features: 4 x 40
#>   factors (1):
#>     Condition  (primary): ctrl, treated
#>   contrasts (0): 
#>   primary_contrast: NA
#>   assays:           counts, vst
#>   enrichment:       (none)
head(eds$sgrna_to_gene())
#> GENE1_1_ACGTACGTACGT GENE1_2_ACGTACGTACGT GENE1_3_ACGTACGTACGT 
#>              "GENE1"              "GENE1"              "GENE1" 
#> GENE1_4_ACGTACGTACGT GENE2_1_ACGTACGTACGT GENE2_2_ACGTACGTACGT 
#>              "GENE1"              "GENE2"              "GENE2"