Calculate reporter score
get_reporter_score(
ko_stat,
type = c("pathway", "module")[1],
feature = "ko",
threads = 1,
modulelist = NULL,
perm = 4999,
verbose = TRUE,
p.adjust.method2 = "BH",
min_exist_KO = 3,
max_exist_KO = 600
)
ko_stat result from pvalue2zs
'pathway' or 'module' for default KOlist for microbiome, 'CC', 'MF', 'BP', 'ALL' for default GOlist for homo sapiens. And org in listed in 'https://www.genome.jp/kegg/catalog/org_list.html' such as 'hsa' (if your kodf is come from a specific organism, you should specify type here).
one of 'ko', 'gene', 'compound'
default 1
NULL or customized modulelist dataframe, must contain 'id','K_num','KOs','Description' columns. Take the `KOlist` as example, use custom_modulelist
.
permutation number, default: 4999.
logical
p.adjust.method for the correction of ReporterScore, see p.adjust
min exist KO number in a pathway (default, 3, when a pathway contains KOs less than 3, there will be no RS)
max exist KO number in a pathway (default, 600, when a pathway contains KOs more than 600, there will be no RS)
reporter_res data.frame
Other GRSA:
combine_rs_res()
,
ko.test()
,
pvalue2zs()
,
reporter_score()
# \donttest{
data("KO_abundance_test")
ko_pvalue <- ko.test(KO_abundance, "Group", metadata)
#> =================================Checking group=================================
#> 30 samples are matched for next step.
#> ===========================Removing all-zero rows: 0============================
#> ==============================Calculating each KO===============================
#> ===========================Using method: wilcox.test============================
#> 1000 features done.
#> 2000 features done.
#> 3000 features done.
#> 4000 features done.
#>
#> Compared groups: WT, OE
#> Total KO number: 4535
#> Compare method: wilcox.test
#> Time use: 3.104
ko_stat <- pvalue2zs(ko_pvalue, mode = "directed")
reporter_s1 <- get_reporter_score(ko_stat, perm = 499)
#> ================================Use feature: ko=================================
#> ===============================Checking rownames================================
#> Some of your ko_stat are not KO id, check the format! (e.g. K00001)
#> 52.7% of your kos in the modulelist!
#> ==================================load KOlist===================================
#> ================KOlist download time: 2023-07-28 06:07:08.466916================
#> If you want to update KOlist, use `update_KO_file()`
#> ============================Calculating each pathway============================
#> 100 pathways done.
#> 400 pathways done.
#> ID number: 481
#> Time use: 1.742
# }