reporter_score | R Documentation |
One step to get the reporter score of your KO abundance table.
reporter_score(
kodf,
group,
metadata = NULL,
method = "wilcox.test",
pattern = NULL,
p.adjust.method1 = "none",
mode = c("directed", "mixed")[1],
verbose = TRUE,
feature = "ko",
type = c("pathway", "module")[1],
p.adjust.method2 = "BH",
modulelist = NULL,
threads = 1,
perm = 4999,
min_exist_KO = 3,
max_exist_KO = 600
)
kodf |
KO_abundance table, rowname are feature ids (e.g. K00001 if feature="ko"; PEX11A if feature="gene"; C00024 if feature="compound"), colnames are samples. |
group |
The comparison groups (at least two categories) in your data, one column name of metadata when metadata exist or a vector whose length equal to columns number of kodf. And you can use factor levels to change order. |
metadata |
sample information data.frame contains group |
method |
the type of test. Default is 'wilcox.test'. Allowed values include:
|
pattern |
a named vector matching the group, e.g. c('G1'=1,'G2'=3,'G3'=2), use the correlation analysis with specific pattern to calculate p-value. |
p.adjust.method1 |
p.adjust.method for 'ko.test', see |
mode |
'mixed' or 'directed' (default, only for two groups differential analysis or multi-groups correlation analysis.), see details in |
verbose |
logical |
feature |
one of 'ko', 'gene', 'compound' |
type |
'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). |
p.adjust.method2 |
p.adjust.method for the correction of ReporterScore, see |
modulelist |
NULL or customized modulelist dataframe, must contain 'id','K_num','KOs','Description' columns. Take the 'KOlist' as example, use |
threads |
default 1 |
perm |
permutation number, default: 4999. |
min_exist_KO |
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 |
max exist KO number in a pathway (default, 600, when a pathway contains KOs more than 600, there will be no RS) |
reporter_score object:
kodf |
your input KO_abundance table |
ko_stat |
ko statistics result contains p.value and z_score |
reporter_s |
the reporter score in each pathway |
modulelist |
default KOlist or customized modulelist dataframe |
group |
The comparison groups in your data |
metadata |
sample information dataframe contains group |
for the 'reporter_s' in result, whose columns represent:
ID |
pathway id |
Description |
pathway description |
K_num |
total number of KOs/genes in the pathway |
Exist_K_num |
number of KOs/genes in your inputdata that exist in the pathway |
Significant_K_num |
number of kos/genes in your inputdata that are significant in the pathway |
Z_score |
|
BG_Mean |
Background mean, |
BG_Sd |
Background standard deviation, |
ReporterScore |
ReporterScore of the pathway, |
p.value |
p.value of the ReporterScore |
p.adjust |
adjusted p.value by p.adjust.method2 |
Other GRSA:
combine_rs_res()
,
get_reporter_score()
,
ko.test()
,
pvalue2zs()
message("The following example require some time to run:")
data("KO_abundance_test")
reporter_score_res <- reporter_score(KO_abundance, "Group", metadata,
mode = "directed", perm = 499
)
head(reporter_score_res$reporter_s)
reporter_score_res2 <- reporter_score(KO_abundance, "Group2", metadata,
mode = "mixed",
method = "kruskal.test", p.adjust.method1 = "none", perm = 499
)
reporter_score_res3 <- reporter_score(KO_abundance, "Group2", metadata,
mode = "directed",
method = "pearson", pattern = c("G1" = 1, "G2" = 3, "G3" = 2), perm = 499
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.