Skip to content

Use custom cellmatch

Shao, Xin edited this page Jan 8, 2023 · 3 revisions

cellmatch is the system data.frame containing the known markers of human and mouse.

  • To use your own marker data.frame, please refer to demo_marker to build a new one.
demo_marker()
#>   species tissue                cancer   condition   subtype1 subtype2
#> 1   Human  Liver                Normal Normal cell         NA     CD4+
#> 2   Human  Liver                Normal Normal cell         NA     CD8+
#> 3   Human  Liver Hepatocellular Cancer Cancer cell         NA       NA
#> 4   Human  Liver Hepatocellular Cancer Cancer cell Regulatory       NA
#>    subtype3 celltype  gene               resource     pmid
#> 1        NA   T Cell   CD4             Experiment 27781378
#> 2        NA   T Cell  CD8A             Experiment 27781378
#> 3 Exhausted   T Cell ABCG1 Single-cell sequencing 28622514
#> 4        NA   T Cell  ACP5 Single-cell sequencing 28622514

You can first create a custom_marker data.frame and then use it in findmarkergene()

custom_marker <- data.frame(species = c("Mouse", "Mouse", "Mouse", "Mouse"),
                            tissue = c("Liver", "Liver", "Liver", "Liver"),
                            cancer= c("Normal", "Normal", "Normal", "Normal"),
                            condition = c("Normal cell", "Normal cell", "Normal cell", "Normal cell"),
                            subtype1 = c("NA", "NA", "NA", "NA"),
                            subtype2 = c("NA", "NA", "NA", "NA"),
                            subtype3 = c("Periportal", "Periportal", "Pericentral", "Pericentral"),
                            celltype = c("Hepatocyte", "Hepatocyte", "Hepatocyte", "Hepatocyte"),
                            gene = c("Cyp2f2", "Alb", "Glul", "Cyp2e1"),
                            resource = c("Experiment", "Experiment", "Experiment", "Experiment"),
                            pmid = c("28166538", "28166538", "28166538", "28166538"), stringsAsFactors = FALSE
obj <- findmarkergene(object = obj, species = "Mouse", marker = custom_marker, tissue = "Liver")