PAD | R Documentation |
Unsupervised pan-immune activation/dysfunction (PAD) subtypes of gastric cancer (or other solid tumor) sample based on RNA-Seq/microarray data
PAD(
expr,
PIAM = NULL,
PIDG = NULL,
cluster.method = c("ward.D2", "complete", "randomForest")[1],
rF.para = list(seed = c(2020, 485, 4, 8), ntree = c(300, 300), k = c(2, 2)),
extra.annot = NULL,
plot.title = NULL,
subtype = "PAD.train_20200110",
verbose = T
)
expr |
RNA expression matrix. Samples in col and ENSEMBL genes in row. |
PIAM |
ID of pan-immune activation genes. IF |
PIDG |
ID of pan-immune dysfunction genes. IF |
cluster.method |
One of |
rF.para |
The parameters in |
extra.annot |
Extra top annotation. The same order as colnames of |
plot.title |
The title of heatmap report. |
subtype |
Default subtype methods. Now, only |
verbose |
Whether to show heatmap in the process. |
This function is used for unsupervised classification of raw data,
which is pivotal for the following supervised machine learning. Empirically, the 'ward.D2'
method could be useful and
high-speed for simple gene signatrues (like PAD classifier). Random forest
is a powerful stragety and may act well in larger dataset or complex gene
signatures.
extra.annot = HeatmapAnnotation(
Dataset = id.dataset,
col = list(
Dataset = if(T){
l <- mycolor[1:length(unique(id.dataset))];
names(l) <- unique(id.dataset);
l}
),
annotation_name_gp = gpar(fontsize = 13, fontface = "bold"),
show_legend = T
)
res1 <- PAD(
expr = dm.combat.tumor,
PIAM = piam,
PIDG = pidg,
plot.title = 'PanSTAD',
cluster.method = 'ward.D2',
subtype = 'PAD.train_20200110',
extra.annot = extra.annot,
verbose = T
)
# randomForest: time-consuming in large cohorts
res2 <- PAD(
expr = dm.combat.tumor,
PIAM = piam,
PIDG = pidg,
cluster.method = 'randomForest',
rF.para = list(
seed = c(2020,485,58,152),
ntree = c(1000,1000),
k=c(2,2)
),
subtype = 'PAD.train_20200110',
extra.annot = extra.annot,
plot.title = 'PanSTAD',
verbose = T
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.