plot_gene: Visualize the expression of a specific gene with regard to...

Description Usage Arguments Value Examples

Description

This function generates a box plot to display the expression of an individual gene with regard to a specified grouping that can be based on any data that exists in the targets file. For example, a plot could be created to view the expression of a gene as a function of different time points or experimental conditions.

Usage

1
2
plot_gene(filename = "gene_plot.pdf", gene_name, groupBy, theme = 1,
  returnData = FALSE)

Arguments

filename

Filename for output plot. Valid extensions are ".pdf" and ".png". File generation can be turned off using set_output_mode("screen"). Output will be written to the /geneplots/ directory.

gene_name

The name of the gene to create boxplot for. Must match a rowname in count data. String.

groupBy

The group from target data that should be used to split data. Must match a rowname in count data. I.E. "Timepoint" or "Infection". String. If only two groups are present in this variable a wilcox test will be performed between the two groups and the p-value will be displayed on the plot as well.

theme

Theme for the layout and color scheme for the plot. Valid selections are integers between 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 long-form table of expression containing sample names, categorical grouping, and sample IDs.

Examples

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

#Plot the CAPS12 gene for each time point.
plot_gene(filename="CAPS12_time_plot.pdf", gene_name="CAPS12",
           groupBy="Time", theme=1, returnData=FALSE)

#Plot the METTL25 gene for each "response" group.  Store the long-form data table.
mettl25_dat <- plot_gene(filename="METTL25_time_plot.pdf", gene_name="METTL25",
                          groupBy="response", theme=2, returnData=TRUE)


## End(Not run)

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