Gene sets compared against CorGI in the manuscript
get_compared_gene_sets(batch1_top_genes, batch1_name = "Batch1", batch2_top_genes, batch2_name = "Batch2", desired_size, marker_genes = c())
batch1_top_genes | ordered list of genes (e.g., most highly variable to least) |
---|---|
batch1_name | name of batch1 (e.g., if |
batch2_top_genes | see |
batch2_name | see |
desired_size | how big the output gene_sets should be |
marker_genes | genes that are included in every gene set of the output. Defaults to the empty set, i.e., no markers provided. |
a list of gene sets, where each item is a gene set of size desired_size
. The list is ordered as follows:
batch1_top_genes[1:desired_size]
batch2_top_genes[1:desired_size]
union(batch1_top_genes[1:x], batch2_top_genes[1:y])
where x
and y
satisfies |x-y| <= 1
intersect(batch1_top_genes[1:x],batch2_top_genes[1:y])
where x
and y
satisfies |x-y| <= 1
If marker_genes
is nonempty, then all four gene sets above include marker_genes
.
HVG_batch1 <- c(paste0("g",1:4),paste0("g",7:10)) HVG_batch2 <- paste0("g",3:9) marker_genes <- "g0" get_compared_gene_sets(HVG_batch1, "HVG(batch1)", HVG_batch2, "HVG(batch2)", 6, marker_genes)#> $`HVG(batch1)` #> [1] "g1" "g2" "g3" "g4" "g7" "g0" #> #> $`HVG(batch2)` #> [1] "g3" "g4" "g5" "g6" "g7" "g0" #> #> $Union #> [1] "g1" "g2" "g3" "g4" "g5" "g0" #> #> $Intersection #> [1] "g3" "g4" "g7" "g8" "g9" "g0" #>