Get negative control genes from each batch of the data

findNCGs(spe, n_assay = 2, batch_name = "SlideName", top_n = 200)

Arguments

spe

A Spatial Experiment object.

n_assay

Integer to indicate the nth count table in the assay(spe) to be used.

batch_name

Column name indicating batches.

top_n

Integer indicate how many genes to be included as negative control genes.

Value

A Spatial Experiment object, conatining negative control genes in the metadata.

Examples

data("dkd_spe_subset")

spe <- findNCGs(dkd_spe_subset, top_n = 100)
#> New names:
#>  `cv` -> `cv...1`
#>  `cv` -> `cv...2`
#>  `cv` -> `cv...3`
#>  `cv` -> `cv...4`
#>  `cv` -> `cv...5`
#>  `cv` -> `cv...6`
#>  `cv` -> `cv...7`
S4Vectors::metadata(spe)$NCGs
#>   [1] "CHTF8"     "MED13"     "PNRC2"     "SRSF2"     "NFAT5"     "RPS26"    
#>   [7] "HMGN1"     "SRRM1"     "SIGMAR1"   "ZBTB10"    "RNASEH2C"  "ADIPOR2"  
#>  [13] "SEC31A"    "POLI"      "KIR3DL1"   "CDC37"     "SRP68"     "PRPF6"    
#>  [19] "DAZAP1"    "NELFCD"    "PNN"       "PPP2R2A"   "SEC24A"    "C1orf50"  
#>  [25] "RING1"     "ZNF444"    "SEC61B"    "SDAD1"     "SF3B3"     "ASXL2"    
#>  [31] "MYO5B"     "SNF8"      "TBC1D3C"   "HARS1"     "RRN3"      "PURB"     
#>  [37] "STK25"     "PPIAL4F"   "KDM6A"     "FAM160A2"  "DLAT"      "ADD3"     
#>  [43] "C1orf174"  "B4GALT3"   "FAM204A"   "STX12"     "UBE2G1"    "COQ10B"   
#>  [49] "ZNF146"    "ANP32A"    "ATP10A"    "ATP8B4"    "C9orf16"   "COX6B1"   
#>  [55] "COX7A1"    "CPEB1"     "FUZ"       "ITIH5"     "JUNB"      "MZT2B"    
#>  [61] "SLC27A3"   "URM1"      "PBX4"      "KIAA2013"  "UPK3B"     "MAVS"     
#>  [67] "EVPL"      "DOCK1"     "ZNF747"    "PHF3"      "ARF5"      "LIPT2"    
#>  [73] "VHL"       "RAN"       "KIAA2026"  "FAM111A"   "LAMTOR1"   "PLEKHM1"  
#>  [79] "EEF1AKMT2" "PSMB6"     "CYB5B"     "ASCC3"     "MTMR12"    "ZMIZ2"    
#>  [85] "ZNF672"    "C12orf65"  "TMEM9"     "UBXN4"     "ZFYVE16"   "SLC38A10" 
#>  [91] "NRSN2"     "RABEP2"    "CLIC1"     "NOMO3"     "APH1A"     "PPP3CB"   
#>  [97] "PYGM"      "PHIP"      "TMEM184B"  "ERLEC1"