two_genomes_plot: Creation of non-circular two genomes plots

Description Usage Arguments Author(s) Examples

Description

The function to create two genomes plots for comparison of data across two genomes.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
two_genomes_plot(data.chr1="", data.chr2="", data.2geno.plot="",
                theme_sty="theme1", font_size=16,
                xtitle="Genomic position 1", ytitle="Genomic position 2",
                title_font_face="plain", xlabel=1, ylabel=1, lgd_pos=1,
                lgd_title_size=12, lgd_title_font_face="plain", lgd_text_size=10,
                lgd_text_font_face="plain", plot_type="point_gradual", sel_gral_col=1,
                gral_col_tp="blue.white.red", gral_2cols_ct=c("#0016DB", "#FFFF00"),
                gral_3cols_ct=c("#0016DB", "#FFFFFF", "#FFFF00"),
                col_type=1, color_cus="#FF0000", color_mulgp="a:red;b:blue;c:cyan",
                col_transpt=1, symbol_point=16, symbol_point_type=1, point_size=0.8,
                point_size_type=1, line_size=0.2, vertical=2, vertical_col="#000000",
                vertical_size=0.2, vertical_type="solid", horizontal=2,
                horizontal_col="#000000", horizontal_size=0.2, horizontal_type="solid",
                add_border=2, border_col="#000000", linetype="solid", col_lgd=2,
                col_lgd_name="color", col_lgd_mdy_label=2, col_lgd_label="a,b,c",
                size_lgd=2, size_lgd_name="size", size_lgd_mdy_label=2, size_lgd_label="a,b,c",
                shape_lgd=2, shape_lgd_name="symbol", shape_lgd_mdy_label=2,
                shape_lgd_label="a,b,c")

Arguments

data.chr1

The dataset to define the genome aligned along the horizontal axis.

data.chr2

The dataset to define the genome aligned along the vertical axis.

data.2geno.plot

The main dataset used to create the two genomes plot.

theme_sty

Choose one figure theme from the following list: "theme1", "theme2", "theme3", "theme4", "theme5", "theme6", "theme7", "theme8", "theme9", "theme10", "theme11", "theme12", "theme13", "theme14", "theme15", "theme16", "theme17" and "theme18".

font_size

An integer number to set the font size.

xtitle

X axis title.

ytitle

Y axis title.

title_font_face

Font face of figure title, for example "plain", "italic", "bold" or "bold.italic".

xlabel

Show or hide tick labels on the X-axis. "1" to show, "2" to "hide".

ylabel

Show or hide tick labels on the Y-axis. "1" to show, "2" to "hide".

lgd_pos

The position to place the legend. "1" for "right", "2" for "bottom".

lgd_title_size

An integer number to set the font size of legend title.

lgd_title_font_face

The font face of legend title, for example "plain", "italic", "bold" or "bold.italic".

lgd_text_size

An integer number to set the font size of legend tick label.

lgd_text_font_face

The font face of legend tick label, for example "plain", "italic", "bold" or "bold.italic".

plot_type

Acceptable plot type can be "point_gradual", "point_discrete", "segment" , "rect_gradual" and "rect_discrete".

sel_gral_col

Data color for plot_type 'point_gradual' or 'rect_gradual'. By default, this parameter was set as "1" and predefined color would be used. If this parameter was set as "2", "low-high" gradient color would be used. If this parameter was set as "3", "low-mid-high" gradient color would be used.

gral_col_tp

If sel_gral_col was set as "1", choose one data color from the following list: "blue.white.red", "green.black.red", "green.yellow.red", "purple.yellow.red", "blue.green.red", "blue.yellow.green", "cyan.white.deeppink1".

gral_2cols_ct

If sel_gral_col was set as "2", please provide two color values representing the low and the high color, for example "#0016DB" and "#FFFF00".

gral_3cols_ct

If sel_gral_col was set as "3", please provide three color values representing the low, the mid and the high color, for example "#0016DB", "#FFFFFF" and "#FFFF00".

col_type

Data color for plot_type 'point_discrete', 'segment' or 'rect_discrete'. By default, this parameter was set as "1" and random assigned color would be used. To customize a single color for the data, set this parameter as "2". To assign different colors for differing data groups, set this parameter as "2" and provide a "color" column in the input data to indicate different data groups. Color for data groups without assigned color would be set as "NA". Hex color codes as "#FF0000" are also supported. See example data for more details. "1" means "random", "2" means "one custom color" and "3" means "custom for data with multi-group".

color_cus

If "col_type" was set as "2", a specific color should be specified using this parameter, for example "#FF0000".

color_mulgp

If col_type was set as "3"", users should provide a character string like "a:red;b:blue;c:cyan" to assign colors to each group .

col_transpt

A decimal number in [0, 1] to adjust the color transparency. The higher the value, the deeper the color.

symbol_point

Symbol used for different points for plot_type "point_gradual" or "point_discrete". Applicable values are integers in [0-25]. Check "http://www.endmemo.com/program/R/pchsymbols.php" for more details. A single integer can be used to set the shape of all points.

symbol_point_type

Symbol used for different points. By default, this parameter was set as "1" and one custom symbol would be used. If the option was set as "2", the uploaded data should include a "shape" column composed of a categorical character vector.

point_size

Numeric value used to set the point size for plot_type "point_gradual" or "point_discrete". A single numeric value can be used to set the size of all points.

point_size_type

Value used for different size of points. By default, this parameter was set as "1" and one custom symbol would be used. If the option was set "2", the uploaded data should include a "size" column composed of a categorical character vector.

line_size

Numeric value used to set the line width for plot_type "segment".

vertical

Create a set of vertical lines across the X-axis to separate different chromosomes. "1" means "show", while "2" means "hide".

vertical_col

Color of the vertical lines, for example "#000000".

vertical_size

Line width of the vertical lines, for example 0.2.

vertical_type

Line type of the vertical lines, for example "solid", "dashed", "dotted", "dotdash", "longdash" or "twodash".

horizontal

Create a set of horizontal lines across the Y-axis to separate different chromosomes. "1" means "show", while "2" means "hide".

horizontal_col

Color of the horizontal lines, for example horizontal_col="#000000".

horizontal_size

Line width of the horizontal lines, for example horizontal_size=0.2.

horizontal_type

Line type of the horizontal lines, for example "solid", "dashed", "dotted", "dotdash", "longdash" or "twodash".

add_border

Add borders to the rect grids, which can be used to separate different cells of the rect from each other. "1" means "add cell borders", while "2" means "not add".

border_col

Borders color. If add_border was set as "1", a specific color should be specified by the users, for example "#000000".

linetype

The line type to be used to plot the data, when plot_type was set as "segment", for example "solid", "dashed", "dotted", "dotdash", "longdash" or "twodash".

col_lgd

Sow (or not) the color legend in the plotting region. "1" means "show", while "2" means "hide".

col_lgd_name

Title of the color legend. Null value will result in an empty title.

col_lgd_mdy_label

Modify (or not) the labels of different colors in the color legend, when col_lgd was set as "1" and plot_type was set as "point_discrete", "segment" or "rect_discrete". "1" means "modify labels", while "2" means "not modify".

col_lgd_label

If col_lgd_mdy_label was set as "1", character vector of arbitrary length is accepted and adjusted automatically to the number of groups, which is separated by commas. For example, "a" or "a,b,c".

size_lgd

Show (or not) the size legend in the plotting region for plot_type "point". "1" means "show", while "2" means "hide".

size_lgd_name

Title of the size legend, when size_lgd was set as "1", for example "size". Null value will result in an empty title.

size_lgd_mdy_label

Modify (or not) the labels of legend in size legend, when size_lgd was set as "1" and plot_type was set as "point_gradual" or "point_discrete". "1" means "modify labels", while "2" means "not modify".

size_lgd_label

If size_lgd_mdy_label was set as "1", character vector of arbitrary length is accepted and adjusted automatically to the number of groups, which is separated by commas. For example, "a" or "a,b,c".

shape_lgd

Show (or not) the shape legend in the plotting region for plot_type "point". "1" means "show", while "2" means "hide".

shape_lgd_name

Title of the shape legend, when shape_lgd was set as "1", for example "symbol". Null value will result in an empty title.

shape_lgd_mdy_label

The labels of legend in shape legend, when shape_lgd was set as "1" and plot_type was set as "point_gradual" or "point_discrete". "1" means "modify labels", while "2" means "not modify".

shape_lgd_label

If shape_lgd_mdy_label was set as "1", character vector of arbitrary length is accepted and adjusted automatically to the number of groups, which is separated by commas. For example, "a" or "a,b,c".

Author(s)

Yiming Yu, Wen Yao

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data.chr1 <- read.table(system.file("examples/two_genome/genome1_data.txt",
                  package="shinyChromosomeR"), header=TRUE, as.is=TRUE, sep="\t")
head(data.chr1)

data.chr2 <- read.table(system.file("examples/two_genome/genome2_data.txt",
                  package="shinyChromosomeR"), header=TRUE, as.is=TRUE, sep="\t")
head(data.chr2)

data.2geno.plot <- read.table(system.file("examples/two_genome/point_gradual.txt",
                        package="shinyChromosomeR"), header=TRUE, as.is=TRUE, sep="\t")
head(data.2geno.plot)

two_genomes_plot(data.chr1=data.chr1, data.chr2=data.chr2, data.2geno.plot=data.2geno.plot,
                plot_type="point_gradual")

venyao/shinyChromosomeR documentation built on June 10, 2019, 11:33 a.m.