use geoms form ggplot2 to make some plots
StatEasyPlot uses ggplot2 ggrepel and ggsci to make plots:
line_plot()
lines_plot()
histogram_plot()
oneline_histogram_plot()
sv_count()
The latest development version may have new features, and you can get it from GitHub:
# Use the devtools package
# install.packages("devtools")
devtools::install_github("guoxueyu/StatEasyPlot/StatEasyPlot")
See the [Examples] part to learn more about how to use ggrepel in your project.
The input file of this function has no header and contains two columns, as shown below
Column one(string) | Column two(numeric) |
---|---|
samplename1 | 10 |
samplename2 | 20 |
... | ... |
line_plot <- function(data,ylab_str,ymin,ymax){}
p <- line_plot("path/to/your/input","the ylab title",0,25)
The input file of this function has no header and contains three columns, as shown below
Column one(string) | Column two(numeric) | Column three(string) |
---|---|---|
samplename1 | 10 | type1 |
samplename2 | 20 | type2 |
... | ... | ... |
lines_plot <- function(data,ylab_str,order_type){}
p <- lines_plot("path/to/your/input","the ylab title","type name used for ordering")
The input file of this function has no header and contains two columns, as shown below
Column one(string) | Column two(numeric) |
---|---|
samplename1 | 10 |
samplename2 | 20 |
... | ... |
histogram_plot <-function(data,ylab_str,his_width){}
p <- histogram_plot("path/to/your/input","the ylab title",0.2)
The input file of this function has no header and contains three columns, as shown below
Column one(string) | Column two(numeric) | Column three(string) |
---|---|---|
samplename1 | 10 | type1 |
samplename2 | 20 | type2 |
... | ... | ... |
oneline_histogram_plot <- function(data,ylab_str,line_type,histogram_type,order_type,ymin,ymax){}
p <- oneline_histogram_plot("path/to/your/input","the ylab title","the type name for geom_line()","the type name for geom_histogram()","the type name for ordering",ymin,ymax)
Column one(string) | Column two(numeric) | Column three(string) |
---|---|---|
sample1 | 7942 | DEL |
sample1 | 1511 | DUP |
sample1 | 8862 | INS |
sample1 | 652 | INV |
sample1 | 164 | TRA |
sample1 | 237 | OTHER |
sample2 | 18368 | SUM |
sample2 | 7242 | DEL |
sample2 | 1111 | DUP |
sample2 | 8162 | INS |
sample2 | 612 | INV |
sample2 | 114 | TRA |
sample2 | 217 | OTHER |
sample2 | 11368 | SUM |
sv_count <- function(data,ylab_str){}
p <- sv_count("path/to/your/input","sv number")