plotProfile¶

This tool creates a profile plot for scores over sets of genomic regions. Typically, these regions are genes, but any other regions defined in BED will work. A matrix generated by computeMatrix is required.

usage: plotProfile [--matrixFile MATRIXFILE] --outFileName OUTFILENAME
[--outFileNameData OUTFILENAMEDATA]
[--outFileSortedRegions FILE] [--kmeans KMEANS]
[--hclust HCLUST] [--help] [--version]
[--averageType {mean,median,min,max,std,sum}]
[--plotHeight PLOTHEIGHT] [--plotWidth PLOTWIDTH]
[--plotType {lines,fill,se,std,overlapped_lines,heatmap}]
[--colors COLORS [COLORS ...]]
[--numPlotsPerRow NUMPLOTSPERROW] [--startLabel STARTLABEL]
[--endLabel ENDLABEL] [--refPointLabel REFPOINTLABEL]
[--regionsLabel REGIONSLABEL [REGIONSLABEL ...]]
[--samplesLabel SAMPLESLABEL [SAMPLESLABEL ...]]
[--plotTitle PLOTTITLE] [--yAxisLabel YAXISLABEL]
[--yMin YMIN] [--yMax YMAX]
[--legendLocation {best,upper-right,upper-left,upper-center,lower-left,lower-right,lower-center,center,center-left,center-right,none}]
[--perGroup] [--plotFileFormat] [--verbose]

Required arguments
 --matrixFile, -m Matrix file from the computeMatrix tool. --outFileName, -out File name to save the image to. The file ending will be used to determine the image format. The available options are: “png”, “eps”, “pdf” and “svg”, e.g., MyHeatmap.png.
Output options
 --outFileNameData File name to save the data underlying data for the average profile, e.g. myProfile.tab. --outFileSortedRegions File name into which the regions are saved after skipping zeros or min/max threshold values. The order of the regions in the file follows the sorting order selected. This is useful, for example, to generate other heatmaps while keeping the sorting of the first heatmap. Example: Heatmap1sortedRegions.bed
Clustering arguments
 --kmeans Number of clusters to compute. When this option is set, the matrix is split into clusters using the k-means algorithm. Only works for data that is not grouped, otherwise only the first group will be clustered. If more specific clustering methods are required, then save the underlying matrix and run the clustering using other software. The plotting of the clustering may fail with an error if a cluster has very few members compared to the total number or regions. --hclust Number of clusters to compute. When this option is set, then the matrix is split into clusters using the hierarchical clustering algorithm, using “ward linkage”. Only works for data that is not grouped, otherwise only the first group will be clustered. –hclust could be very slow if you have >1000 regions. In those cases, you might prefer –kmeans or if more clustering methods are required you can save the underlying matrix and run the clustering using other software. The plotting of the clustering may fail with an error if a cluster has very few members compared to the total number of regions.
Optional arguments
 --version show program’s version number and exit --averageType=mean The type of statistic that should be used for the profile. The options are: “mean”, “median”, “min”, “max”, “sum” and “std”. Possible choices: mean, median, min, max, std, sum --plotHeight=7 Plot height in cm. --plotWidth=11 Plot width in cm. The minimum value is 1 cm. --plotType=lines “lines” will plot the profile line based on the average type selected. “fill” fills the region between zero and the profile curve. The fill in color is semi transparent to distinguish different profiles. “se” and “std” color the region between the profile and the standard error or standard deviation of the data. As in the case of fill, a semi-transparent color is used. “overlapped_lines” plots each region’s value, one on top of the other. “heatmap” plots a summary heatmap. Possible choices: lines, fill, se, std, overlapped_lines, heatmap --colors List of colors to use for the plotted lines (N.B., not applicable to ‘–plotType overlapped_lines’). Color names and html hex strings (e.g., #eeff22) are accepted. The color names should be space separated. For example, –colors red blue green --numPlotsPerRow=8 Number of plots per row --startLabel=TSS [only for scale-regions mode] Label shown in the plot for the start of the region. Default is TSS (transcription start site), but could be changed to anything, e.g. “peak start”. Same for the –endLabel option. See below. --endLabel=TES [only for scale-regions mode] Label shown in the plot for the region end. Default is TES (transcription end site). --refPointLabel=TSS [only for reference-point mode] Label shown in the plot for the reference-point. Default is the same as the reference point selected (e.g. TSS), but could be anything, e.g. “peak start”. --regionsLabel, -z Labels for the regions plotted in the heatmap. If more than one region is being plotted, a list of labels separated by spaces is required. If a label itself contains a space, then quotes are needed. For example, –regionsLabel label_1, “label 2”. --samplesLabel Labels for the samples plotted. The default is to use the file name of the sample. The sample labels should be separated by spaces and quoted if a label itselfcontains a space E.g. –samplesLabel label-1 “label 2” --plotTitle=, -T= Title of the plot, to be printed on top of the generated image. Leave blank for no title. --yAxisLabel=, -y= Y-axis label for the top panel. --yMin Minimum value for the Y-axis. --yMax Maximum value for the Y-axis. --legendLocation=best Location for the legend in the summary plot. Note that “none” does not work for the profiler. Possible choices: best, upper-right, upper-left, upper-center, lower-left, lower-right, lower-center, center, center-left, center-right, none --perGroup=False The default is to plot all groups of regions by sample. Using this option instead plots all samples by group of regions. Note that this is only useful if you have multiple groups of regions. by sample rather than group. --plotFileFormat Image format type. If given, this option overrides the image format based on the plotFile ending. The available options are: “png”, “eps”, “pdf” and “svg” Possible choices: png, pdf, svg, eps --verbose=False If set, warning messages and additional information are given.

An example usage is: plotProfile -m <matrix file>

Details¶

Like plotHeatmap, plotProfile simply takes the compressed matrix produced by computeMatrix and turns it into summary plots.

In addition to a large range of parameters for optimizing the visualization, you can also export the values underlying the profiles as tables.

 optional output type command computeMatrix plotHeatmap plotProfile values underlying the heatmap --outFileNameMatrix yes yes no values underlying the profile --outFileNameData no yes yes sorted and/or filtered regions --outFileSortedRegions yes yes yes

Tip

For more details on the optional output, see the examples for computeMatrix.

Usage example¶

The following example plots the signal profile over hg19 transcripts for our test ENCODE datasets. Note that the matrix contains multiple groups of regions (in this case, one for each present chromosome).

$plotProfile -m matrix_two_groups.gz \ -out ExampleProfile1.png \ --plotTitle "Test data profile"  plotProfile has many options, including the ability to change the type of lines plotted and to plot by group rather than sample. Here’s the same data set, but plotted with a different set of parameters. $ plotProfile -m matrix_two_groups.gz \
-out ExampleProfile2.png \
--plotType=fill \ # add color between the x axis and the lines
--perGroup \ # make one image per BED file instead of per bigWig file
--colors red orange yellow green blue purple \
--plotTitle "Test data profile"