HIPPO is under review for Bioconductor and CRAN submission. You can download the developer version as below. Please allow up to 5 minutes to completely compile the vignette.
The data set is available in the following link, where the detailed explanation is available here. Note that the file is very large (3.3GB). We use a subset of Zheng 2017 data set saved as a toydata within this package. Also, we load a reference data that matches ENSG ID to HGNC gene names.
Alternatively, you can start from a matrix object.
This plot shows the zero inflation compared to the expected Poisson line. If most genes don’t align with the black line, it shows that there is cell heterogeneity driving the zero inflation.
HIPPO assumes that the count matrix is placed in toydata@assays@data$counts. Some objects that we found online have the count matrix in toydata@assays$data$counts. In this case, HIPPO will throw an error because it cannot found a count matrix. In this case, you have to create another SingleCellExperiment object to assign the count matrix in the correct slot.
Next, you can run hippo function to do the pre-processing that simutlaneously conducts feature selection and hierarchcial clustering. There are three arguments that help you decide the stopping criterion of clustering procedure.
K is the maximum number of clusters that you want. HIPPO will return the clustering results for all k = 2, 3, …, K, so you can overestimate the number of potential clusters. The default is 10, but users are highly recommended to adjust this.
z_threshold is the feature selection criterion. For each round of hierarchical clustering, hippo will find outlier genes where the z-value of significance is greater than the threshold. For example, if you would like to select genes with p-values less than 0.05, z_threshold would be 1.96. The default threshold is 2, but users can use their discretion to change this value.
outlier_proportion is the number of outlier genes to allow. The default is 0.01 (1%) which means the clustering procedure will automatically stop if there are less than 1% of genes remain as important features. With the example data set, the default choice has empirically worked well.
We offer two dimension reduction methods: umap and tsne. And we offer two separate visualization functions.
This function shows how the zero-inflation decreases as HIPPO proceeds in the clustering. This function has arguments called switch_to_hgnc and ref. These aim to provide the users an option to change the gene names from ENSG IDs to HGNC symbols for ease of understanding. Many SingleCellExperiment objects have such data embedded in rowData(toydata). Users can create a data frame with ensg and hgnc columns for the genes, and HIPPO will automatically switch the row names of the count matrix from ENSG IDs to HGNC symbols. The default is set to FALSE, assuming that the row names are already HGNC symbols.
We also offer a differential expression analysis tool.
This function also has an option to switch the gene names to HGNC symbols. top.n argument lets users choose how many top genes to show in the box plot. The default is 5.
The labels of boxplots are aligned with the t-SNE or UMAP plots above. When K is equal to 2, the color codes match with the cell groups as separated in the dimension reduction plot.
Each round of differential expression test results are also saved in the list of data frames.
genes meandiff sd z 21 ENSG00000087086 16.087318 0.9591965 16.771661 100 ENSG00000101439 8.384615 0.5678778 14.764823 32 ENSG00000011600 5.038462 0.4402124 11.445523 97 ENSG00000196126 4.308732 0.5546155 7.768864 52 ENSG00000204482 2.253638 0.2991452 7.533593 87 ENSG00000158869 2.022869 0.2839227 7.124717
R version 4.0.0 (2020-04-24) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 18.04.4 LTS Matrix products: default BLAS: /home/biocbuild/bbs-3.11-bioc/R/lib/libRblas.so LAPACK: /home/biocbuild/bbs-3.11-bioc/R/lib/libRlapack.so locale:  LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C  LC_TIME=en_US.UTF-8 LC_COLLATE=C  LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8  LC_PAPER=en_US.UTF-8 LC_NAME=C  LC_ADDRESS=C LC_TELEPHONE=C  LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages:  parallel stats4 stats graphics grDevices utils datasets  methods base other attached packages:  SingleCellExperiment_1.10.0 SummarizedExperiment_1.18.0  DelayedArray_0.14.0 matrixStats_0.56.0  Biobase_2.48.0 GenomicRanges_1.40.0  GenomeInfoDb_1.24.0 IRanges_2.22.0  S4Vectors_0.26.0 BiocGenerics_0.34.0  HIPPO_1.0.0 loaded via a namespace (and not attached):  reticulate_1.15 tidyselect_1.0.0 xfun_0.13  purrr_0.3.4 reshape2_1.4.4 lattice_0.20-41  colorspace_1.4-1 vctrs_0.2.4 htmltools_0.4.0  yaml_2.2.1 rlang_0.4.5 pillar_1.4.3  glue_1.4.0 GenomeInfoDbData_1.2.3 lifecycle_0.2.0  plyr_1.8.6 umap_0.2.5.0 stringr_1.4.0  zlibbioc_1.34.0 munsell_0.5.0 gtable_0.3.0  evaluate_0.14 labeling_0.3 knitr_1.28  irlba_2.3.3 Rcpp_126.96.36.199 openssl_1.4.1  scales_1.1.0 jsonlite_1.6.1 XVector_0.28.0  RSpectra_0.16-0 farver_2.0.3 gridExtra_2.3  askpass_1.1 ggplot2_3.3.0 digest_0.6.25  Rtsne_0.15 stringi_1.4.6 dplyr_0.8.5  ggrepel_0.8.2 grid_4.0.0 tools_4.0.0  bitops_1.0-6 magrittr_1.5 RCurl_1.98-1.2  tibble_3.0.1 crayon_1.3.4 pkgconfig_2.0.3  ellipsis_0.3.0 Matrix_1.2-18 assertthat_0.2.1  rmarkdown_2.1 R6_2.4.1 compiler_4.0.0