Skip to contents

list and count samples with common ontological annotation in two SEs

Usage

common_classes(ont, se1, se2)

Arguments

ont

instance of ontologyIndex ontology

se1

a SummarizedExperiment using `label.ont` in colData to provide ontological tags (from `ont`) for samples

se2

a SummarizedExperiment using `label.ont` in colData to provide ontological tags (from `ont`) for samples

Value

a data.frame with rownames given by the common tags, the class names as column `clname`, and counts of samples bearing the given tags in remaining columns.

Examples

if (requireNamespace("celldex")) {
  imm = celldex::ImmGenData()
  if ("label.ont" %in% names(SummarizedExperiment::colData(imm))) {
    cl = getOnto("cellOnto")
    blu = celldex::BlueprintEncodeData()
    common_classes( cl, imm, blu )
    }
  }
#> Loading required namespace: celldex
#> loading from cache
#>                                               clname imm blu
#> CL:0000235                                macrophage  76  18
#> CL:0000576                                  monocyte  10  16
#> CL:0000787                             memory B cell   2   1
#> CL:0000771                                eosinophil   4   1
#> CL:0000057                                fibroblast  21  20
#> CL:0000775                                neutrophil  23  23
#> CL:0000115                          endothelial cell  20  18
#> CL:0000624           CD4-positive, alpha-beta T cell  41  11
#> CL:0000625           CD8-positive, alpha-beta T cell  17   3
#> CL:0000066                           epithelial cell  25  18
#> CL:0000451                            dendritic cell  45   1
#> CL:0000623                       natural killer cell  35   3
#> CL:0000051                common lymphoid progenitor   6   5
#> CL:0000050   megakaryocyte-erythroid progenitor cell   2   4
#> CL:0000837 hematopoietic multipotent progenitor cell   2   4
#> CL:0000049                 common myeloid progenitor   2  11
#> CL:0000557      granulocyte monocyte progenitor cell   3   3
#> CL:0000037                   hematopoietic stem cell   7   6
#> CL:0000815                         regulatory T cell   6   1