checkColormapCompatibility: Check compatibility between ExperimentColorMap and...

Description Usage Arguments Value Author(s) Examples

View source: R/ExperimentColorMap.R

Description

This function compares a pair of ExperimentColorMap and SingleCellExperiment objects, and examines whether all of the assays, colData, and rowData defined in the ExperimentColorMap object exist in the SingleCellExperiment object.

Usage

1

Arguments

ecm

An ExperimentColorMap.

se

A SingleCellExperiment.

Value

A character vector of incompability error messages, if any.

Author(s)

Kevin Rue-Albrecht

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Example colormaps ----

count_colors <- function(n){
  c("black","brown","red","orange","yellow")
}

qc_color_fun <- function(n){
  qc_colors <- c("forestgreen", "firebrick1")
  names(qc_colors) <- c("Y", "N")
  return(qc_colors)
}

ecm <- ExperimentColorMap(
    assays = list(
        tophat_counts = count_colors
    ),
    colData = list(
        passes_qc_checks_s = qc_color_fun
    )
)

# Example SingleCellExperiment ----

library(scRNAseq)
sce <- ReprocessedAllenData(assays="tophat_counts")

# Test for compatibility ----

checkColormapCompatibility(ecm, sce)

iSEE documentation built on Feb. 3, 2021, 2:01 a.m.