Shows the results of the 'haystack' analysis in various ways, sorted by significance. Priority of params is genes > p.value.threshold > n.
show_result_haystack( res.haystack, n =NULL, p.value.threshold =NULL, gene =NULL)## S3 method for class 'haystack'show_result_haystack( res.haystack, n =NULL, p.value.threshold =NULL, gene =NULL)
Arguments
res.haystack: A 'haystack' result object.
n: If defined, the top "n" significant genes will be returned. Default: NA, which shows all results.
p.value.threshold: If defined, genes passing this p-value threshold will be returned.
gene: If defined, the results of this (these) gene(s) will be returned.
Returns
A data.frame with 'haystack' results sorted by log.p.vals.
Details
The output is a data.frame with the following columns: * D_KL the calculated KL divergence. * log.p.vals log10 p.values calculated from randomization. * log.p.adj log10 p.values adjusted by Bonferroni correction.
Examples
# using the toy example of the singleCellHaystack package# running haystackres <- haystack(dat.tsne, dat.expression)# below are variations for showing the results in a table# 1. list top 10 biased genesshow_result_haystack(res.haystack = res, n =10)# 2. list genes with p value below a certain thresholdshow_result_haystack(res.haystack = res, p.value.threshold=1e-10)# 3. list a set of specified genesset <- c("gene_497","gene_386","gene_275")show_result_haystack(res.haystack = res, gene = set)