This function finds the gene markers for a given cluster.

selectMarkersRF(df, cluster_index, cluster_i, n_genes = 2,
  n_trees = NCOL(df) * 2, reduced_form = TRUE)

Arguments

df

A dataframe represents the single cell data matrix, with the genes as the features and cells as the rows. NAs are not allowed

cluster_index

A one column dataframe that contains the cluster labels assigned to each cell.

cluster_i

The cluster which we wish to extract the markers for

n_genes

The number of genes used in each decision tree

n_trees

The number of trees one wishes to construct for each cluster, default is the n_genes times the number of features in the data matrix

reduced_form

Indicates whether or not the output should be in its reduced form. The full form contains the recall, percision and 1/error rate at each iteration. Whereas the reduced form only contains the final recall, percision, and 1/error rate

Value

The dataframe with the list of markers

Examples

### Suppose you want to extract the markers for cluster 0 df <- t(pbmc@scale.data) labels <- data.frame(as.numeric(pbmc@meta.data$res.1)) markers<-selectMarkersRF(df, cluster_index = labels, cluster_i = 0)
#> [1] "retFrame constructed" #> [1] "grouping worked properly" #> [1] "ordering worked properly"