readHDF5Ztree: readHDF5Ztree

View source: R/utils.R

readHDF5ZtreeR Documentation

readHDF5Ztree

Description

Read the Ztree (scipy matrix representarion of a hierarchical clustering) contained in a 10X single-cell CNV HDF5 file and return a valid R hclust object representing the same tree.

More info on the Ztree matrix: https://joernhees.de/blog/2015/08/26/scipy-hierarchical-clustering-and-dendrogram-tutorial/

Usage

readHDF5Ztree(hdf5.file)

Arguments

hdf5.file

(H5IdComponent object) The result of opening an HDF5 file with rhdf5::H5Fopen(data.file). The file must contain a "tree" element with Ztree. For example, HDF5 files for CNV data produced by 10X CellRanger.

Value

A valid hclust object (standard R hierarchical clustering results)

Examples


not.run <- TRUE #We have no valid hdf5 file small enough to fit in a package
#Not Run
#data.file <- "path to a single-cell CNV data file"
#open.file <- rhdf5::H5Fopen(data.file)
#hc.tree <- readHDF5Ztree(open.file)


bernatgel/CopyNumberPlots documentation built on Sept. 22, 2023, 1:53 a.m.