View source: R/apply_threshold.R
apply_threshold | R Documentation |
Filters markers or genes/transcripts based on a threshold applied to their GWAS or DE score, and log2(fold-change) (if applicable). For a set of candidate genes, simply returns the list. Note that markers or genes with a missing score or log2(fold-change) will be removed from the dataset.
apply_threshold(x, score_thr = 0, log2fc_thr = 0) ## S3 method for class 'GWAS_data' apply_threshold(x, score_thr = 0, log2fc_thr = 0) ## S3 method for class 'DE_data' apply_threshold(x, score_thr = 0, log2fc_thr = 0) ## S3 method for class 'CAN_data' apply_threshold(x, score_thr = 0, log2fc_thr = 0) ## Default S3 method: apply_threshold(x, score_thr = 0, log2fc_thr = 0)
x |
Either a |
score_thr |
Numeric, threshold to use on markers' or genes/transcripts' score.
Only markers or genes with a score equal to or higher than this threshold
will be retained. Default value is 0. Ignored for |
log2fc_thr |
Numeric, threshold to use on the absolute value of genes/
transcripts' log2(fold-change). Only genes/transcripts with an absolute
log2(fold-change) equal to or higher than this threshold will be retained.
Ignored for |
A filtered tibble (of class GWAS_data_thr
, DE_data_thr
or
CAN_data_thr
).
x <- get_example_data() ## For GWAS results apply_threshold(GWAS_data(x[["GWAS"]]), score_thr = 4) ## For DE results - in second line, no threshold is applied ## on the log2(fold-change) apply_threshold(DE_data(x[["DE"]]), score_thr = -log10(0.05), log2fc_thr = 1) apply_threshold(DE_data(x[["DE"]]), score_thr = -log10(0.05), log2fc_thr = 0) ## No effect on the Candidate genes apply_threshold(CAN_data(x[["CAN"]]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.