plot_poisson_dist: Visualize the poisson distances between samples.

Description Usage Arguments Value See Also Examples

Description

This function computes and plots sample poisson distances in a symmetrical heatmap. This visualization can be used to examine overall similarity between samples and whether or not data are behaving as expected based on the experimental design. Unlike Euclidian distance, poisson distance calculation takes into account variation between sample counts when calculating distances. This view can also be used to identify potential outlying samples.

Usage

1
2
plot_poisson_dist(row_labels, filename = "poisson_distance.pdf",
  theme = 1, returnData = FALSE)

Arguments

row_labels

Row labels for samples. This value should correspond to a column in the target data and will be used to label each row in the heatmap. Viewing the plot in the context of different metadata makes it possible to search for outliers and batch effects, in addition to whether or not the data behave as intended. String.

filename

Output filename in string format. Valid formats are .pdf and .png. File generation can be turned off using set_output_mode("screen"). Output will be written to the /sample_distance/poisson/ directory.

theme

Determines color scheme used for this plot. Valid options are integers, 1-6.

returnData

Boolean. Determines if this visualization should return data used to generate the visualization. Default=FALSE.

Value

If returnData is true, this function will return the sample distance matrix of poisson distance measurements between samples.

See Also

plot_euclid_dist

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 

#Visualize Euclidian distances of all samples using "SampleID" target data as labels.
plot_poisson_dist("SampleID", filename="poisson_distance.pdf", theme=2, returnData=FALSE)

#Visualize Euclidian distances of all samples using "timepoint" target data as labels.
#Store the resulting distance matrix data.
distMatrix <- plot_poisson_dist("timepoint", filename="poisson_distance.pdf",
                                 theme=2, returnData=TRUE)


## End(Not run)

DEVis documentation built on May 2, 2019, 3:18 p.m.