View source: R/feature_selection.R
feature_select | R Documentation |
Feature selection
feature_select(
x,
y,
method = c("cor", "dif"),
family = c("spearman", "pearson"),
cutoff = NULL,
padjcut = NULL
)
x |
input matrix.Rownames should be features like gene symbols or cgi, colnames be samples |
y |
response variable. Data type can be quantitative, binary and survival. Survival type can be generated through ?survival::Surv |
method |
Binary for method = "dif", quantitative response value for "dif" and "cor". |
family |
For method="cor", useser can choose "spearman" or "pearson" . |
cutoff |
Numeric. Estimate and log2FC cutoff value for correlation analysis and limma dif analysis. |
padjcut |
Numeric. Adjust P value cutoff. |
data("crc_clin")
data("tcga_crc_exp")
mad <- apply(tcga_crc_exp, 1, mad)
tcga_crc_exp <- tcga_crc_exp[mad > 0.5, ]
pd1 <- as.numeric(tcga_crc_exp["PDCD1", ])
group <- ifelse(pd1 > mean(pd1), "high", "low")
pd1_cor <- feature_select(x = tcga_crc_exp, y = pd1, method = "cor", family = "pearson", padjcut = 0.05, cutoff = 0.5)
pd1_dif <- feature_select(x = tcga_crc_exp, y = pd1, method = "dif", padjcut = 0.05, cutoff = 2)
pd1_dif_2 <- feature_select(x = tcga_crc_exp, y = group, method = "dif", padjcut = 0.05, cutoff = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.