sapphire_plot: Sapphire plot - plotting annotation and progrex index

Description Usage Arguments Details Value See Also Examples

View source: R/plot_zapphire.R

Description

sapphire_plot is able to generate a sapphire plot using the progrex index file (e.g. "REPIX_000000000001.dat") generated by gen_annotation.

Usage

1
2
3
4
sapphire_plot(sap_file = NULL, sap_table = NULL, write = F,
  folderPlot = "plots/", timeline = T, local_cut = T, ann_trace = F,
  ann_trace_ret = F, background_height = NULL, ann_names_L = NULL,
  ann_names_R = NULL, title = "no title")

Arguments

sap_file

Annotated progrex index file. This can be left unused if sap_table is used instead. This input must be the file output of gen_annotation.

sap_table

Annotated progrex index table. As for sap_file it can be left unused if the other input is used. Also in this case the format of the table must be the file output of gen_annotation.

write

A logical indicating whether to write the plot to file.

folderPlot

A character string that defines the folder in which save the plots (write argument must be TRUE).

timeline

A logical indicating whether add a timeline annotation (with the original order) on the bottom of the plot.

local_cut

A logical that, if TRUE plots the local cut annotation function (see gen_annotation).

ann_trace

This argument can be set to logical, an integer or a matrix of integers. If logical, the annotation will be a horizontal thick line that follows a split in half of the original timeline. If only an integer have been inserted the time line will be split in that number of splits. Instead if a matrix have been inserted it will be a plotted as it is on the top of the plot mapping the range of numbers in order to produce a gray scale horizontal annotation.

ann_trace_ret

If TRUE the annotation vector is returned.

background_height

Defines the height on which to put the annotation (integer between 1 and 14).

ann_names_L

Vector of characther strings indicating, from top on the left, the names of the annotation horizontal bars.

ann_names_R

Vector of characther strings indicating, from top on the right, the names of the annotation horizontal bars.

title

Title of the plot

Details

For details, please refer to the main documentation of the original campari software http://campari.sourceforge.net/documentation.html.

Value

If ann_trace_ret is active it will return the annotation trace used for the plot.

See Also

mst_from_trj, gen_progindex, gen_annotation.

Examples

1
2
3
4
5
6
7
adjl <- mst_from_trj(trj = matrix(rnorm(1000), nrow = 100, ncol = 10))
ret<-gen_progindex(adjl = adjl)
gen_annotation(ret_data = ret, local_cut_width = 10)
## Not run: 
zap_ggplot("REPIX_000000000001.dat")

## End(Not run)

CampaR1 documentation built on May 30, 2017, 2:51 a.m.