impGenes {FateID} | R Documentation |
Extract genes with high importance values for random forest classification
Description
This function extracts all genes with an importance value for classifying cells into a given target cluster exceeding a given threshold for at least one of the random forest iterationns.
Usage
impGenes(fb, tn, ithr = 0.02, zthr = 2)
Arguments
fb |
fateBias object returned by the function |
tn |
name of a target cluster, i. e. concatenation of a |
ithr |
positive real number. Threshold for the required importance measure (mean decrease in accuracy of classification upon removal, see randomForest) to include a gene into the output as important feature for classying cells in |
zthr |
positive real number. Threshold for the required z-score of the importance measure (importance divided by the standard deviation of importance) to include a gene into the output as important feature for classying cells in |
Value
The function returns a list of two elements.
d |
a data frame with mean importance values for all genes surviving the filtering by |
d |
a data frame with the standard deviation of importance values for all genes surviving the filtering by |
The function produces a heatmap of d
with hierarchical clustering of the rows using the function pheatmap
from the pheatmap package.
Examples
x <- intestine$x
y <- intestine$y
tar <- c(6,9,13)
fb <- fateBias(x,y,tar,z=NULL,minnr=5,minnrh=10,nbfactor=5,use.dist=FALSE,seed=NULL,nbtree=NULL)
k <- impGenes(fb,"t6",ithr=.02,zthr=2)