importResults: Import some 'too-many-cells make-tree' outputs into a data...

Description Usage Arguments Value Examples

View source: R/TooManyCellsR.R

Description

This function will import some of the files resulting from a 'too-many-cells make-tree' run into R as data frames. Does not include cluster list. Look at the main tooManyCells function for the cluster list.

Usage

1
importResults(dir = "out")

Arguments

dir

The output directory of a 'too-many-cells' run.

Value

A list of each output. Reads the following files, see https://gregoryschwartz.github.io/too-many-cells/ for more details: "dendrogram.svg", "clumpiness.pdf", "projection.pdf", "label_projection.pdf", "clumpiness.csv", "cluster_info.csv", "node_info.csv", and "cluster_diversity.csv".

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
input <- system.file("extdata", "mat.csv", package="TooManyCellsR")
inputLabels <- system.file("extdata", "labels.csv", package="TooManyCellsR")
df = read.csv(input, row.names = 1, header = TRUE)
mat = Matrix::Matrix(as.matrix(df), sparse = TRUE)
labelsDf = read.csv(inputLabels, header = TRUE)
# Here we draw this small toy example with no filter or normalization, and
# decrease the size of the branches and increase the size of the leaf nodes.
# With non-toy real world single cell data, these options should not be
# necessary.
## Not run: 
tooManyCells( mat, labels = labelsDf
            , args = c( "make-tree"
                      , "--no-filter"
                      , "--normalization", "NoneNorm"
                      , "--draw-max-node-size", "40"
                      , "--draw-max-leaf-node-size", "70"
                      )
            )
res = importResults("out")
plot(res$treePlot, axes = FALSE)

## End(Not run)

GregorySchwartz/tooManyCellsR documentation built on March 3, 2020, 3:31 p.m.