generate_tree {ctgGEM} | R Documentation

## Function to Generate Cell Trees

### Description

This function builds a cell hierarchy tree of a chosen supported type with a given data set, contained in a ctgGEMset object. Different tree types require data from corresponding slots of the ctgGEMset object. See vignette for examples, usage details, and instructions on building a ctgGEMset object.

### Usage

    generate_tree(dataSet, treeType, outputDir = NULL)

### Arguments

`dataSet` | the ctgGEMset object for creating the cell tree
`treeType` | the type of tree generated
`outputDir` | the directory where output should be saved, defaults to the temporary location returned by `tempdir()`

### Value

An updated ctgGEMset object. The generated tree is placed in `@treeList[treeType]` slot, and can be accessed via `treeList(dataSet)$treeType`. The function also creates a directory named "treeType-Output" and writes the plot(s) of the generated tree(s) and its SIF file to that directory.

### Examples

    # load HSMMSingleCell package
    library(HSMMSingleCell)

    # load the data
    data(HSMM_expr_matrix)
    data(HSMM_sample_sheet)
    data(HSMM_gene_annotation)

    # construct a ctgGEMset
    dataSet <- ctgGEMset(exprsData = HSMM_expr_matrix,
                            phenoData = HSMM_sample_sheet,
                            featureData = HSMM_gene_annotation)

    TSCANinfo(dataSet) <- "ENSG00000000003.10"

    # choose output directory
    od <- getwd()
    # run generate_tree()
    dataSet <- generate_tree(dataSet = dataSet, treeType = "TSCAN",
                             outputDir = od)

[Package ctgGEM version 0.99.3 Index]