check_ewce_genelist_inputs {EWCE} | R Documentation |
check_ewce_genelist_inputs
Is used to check that hits and bg gene
lists passed to EWCE are setup correctly. Checks they are the
appropriate length.
Checks all hits genes are in bg. Checks the species match and if not
reduces to 1:1 orthologs.
check_ewce_genelist_inputs( sct_data, hits, bg, genelistSpecies, sctSpecies, geneSizeControl = FALSE )
sct_data |
List generated using |
hits |
Array of MGI/HGNC gene symbols containing the target gene list. |
bg |
Array of MGI/HGNC gene symbols containing the background gene list. |
genelistSpecies |
Either 'mouse' or 'human' depending on whether MGI or HGNC symbols are used for gene lists |
sctSpecies |
Either 'mouse' or 'human' depending on whether MGI or HGNC symbols are used for the single cell dataset |
geneSizeControl |
Will genelists sampled control for GC content and transcript length? Boolean. |
A list containing
hits
: Array of MGI/HGNC gene symbols containing the target
gene list.
bg
: Array of MGI/HGNC gene symbols containing the background
gene list.
library(ewceData) # Called from "bootstrap_enrichment_test()" and "generate_bootstrap_plots()" ctd <- ctd() example_genelist <- example_genelist() mouse_to_human_homologs <- mouse_to_human_homologs() m2h <- unique(mouse_to_human_homologs[, c("HGNC.symbol", "MGI.symbol")]) mouse.hits <- unique(m2h[m2h$HGNC.symbol %in% example_genelist, "MGI.symbol"]) #subset mouse.bg for speed but ensure it still contains the hits mouse.bg <- unique(c(m2h$MGI.symbol[1:100],mouse.hits)) checkedLists <- check_ewce_genelist_inputs( sct_data = ctd, hits = mouse.hits, bg = mouse.bg, genelistSpecies = "mouse", sctSpecies = "mouse" )