boxplot_genedata: Fast way to draw boxplot for gene expression

Description Usage Arguments Details Author(s) See Also Examples

View source: R/BI_boxplot_genedata.R

Description

boxplot_genedata provide fast way to draw boxplot for gene expression based on gene expression matrix and design object

Usage

1
2
3
4
5
6
boxplot_genedata(select.genes, design, expr.matrix, convert = T,
  type = c("facet", "normal")[1], contrast = "N.status",
  contrast.list = c("N0", "Np"), genes.levels = NULL, palette = NULL,
  point.alpha = 0.5, box.alpha = 1, method = "wilcox.test",
  x.title = NULL, y.title = NULL, legend.position = c(0.9, 0.9),
  cut = F, ncut = 2, width = 12, height = 10, names = "love")

Arguments

select.genes

the genes you want to plot

design

the design object(data of clinical features)

expr.matrix

expression matrix of genes

convert

Whether to convert Ensembl id as symbols.Default is convert = T.Note that if you use common names as genes(like miRNAs names),please set convert = F.

type

the style of boxplot.One of "facet" and "normal".

contrast

the colnames of contrast value.Like "N.status".

contrast.list

the components of contrast.Like c("N0","Np")

genes.levels

the level of genes.Default is NULL,and it's recommanded that you set a self-defined levels for better visualization.

palette

the color of genes ploted.Default is NULL.

point.alpha

the color density of point

box.alpha

the color density of box

method

the method of P value for comparision.Default is "wilcox.test".See also method of compare_means function.

x.title

the names of x axis of plot

y.title

the names of y axis of plot

cut

whether to cut plot.If the number of genes is very much,it is recommanded to set cut = T for better visualization.

ncut

the number of cut strategy.Only available when cut = T.Default is 2.

width

the width of plot

height

the height of plot

names

part name of the saved plot

Details

the names of genes shold be Ensembl id.

Author(s)

Weibin Huang<654751191@qq.com>

See Also

compare_means

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
library(lucky)
data("rna.tpm",package = "lucky")
data("rna.design",package = "lucky")
p <- boxplot_genedata(select.genes = c("ENSG00000004478",
                                       "ENSG00000000457"),
                      design = rna.design,
                      expr.matrix = log2(rna.tpm + 1),
                      contrast = "condition",
                      contrast.list = c("normal","tumor"),
                      genes.levels = NULL,
                      palette=NULL,
                      point.alpha = 0.5,
                      box.alpha = 1,
                      method = "wilcox.test",
                      x.title="Genes",
                      y.title="The Expression of Genes(log TPM)",
                      cut = F,
                      width = 12,height = 10,
                      names = "love")
## See plot of genes expression
print(p$plot)

## See meta data of genes expression
View(p$metadata)

shijianasdf/BasicBioinformaticsAnalysisFromZhongShan documentation built on Jan. 3, 2020, 10:08 p.m.