sp_pcoa: Generating pcoa plot

Description Usage Arguments Value Examples

View source: R/sp_pcoa.R

Description

Generating pcoa plot

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
sp_pcoa(
  data,
  grp_file,
  shape = "c_t_c_t0304",
  shape_order = NULL,
  color = "",
  color_order = NULL,
  color_v = NULL,
  title = "",
  size = "ct___",
  label = FALSE,
  label_font_size = NULL,
  debug = FALSE,
  file = "data",
  ...
)

Arguments

data

Data file With header line, the first column is the rowname, tab seperated. Each row represents variable (normally genes), each column represents samples.

grp_file

Sample group file with first column as sample names, other columns as sample attributes. Below, color, size, shape variable should be existed in this file. If not supplied, each sample will be treated as one group. And a variable named 'group' can be used to set as color or shape variable.

shape

The variable for point shape.

shape_order

The order for shape variable. Default alphabetical order, accept a string like "'K562','hESC','GM12878','HUVEC','NHEK','IMR90','HMEC'".

color

The variable for group information. Necessary, this variable will be used as group information and color variable as also.

color_order

The order for color variable. Default alphabetical order, accept a string like "'K562','hESC','GM12878','HUVEC','NHEK','IMR90','HMEC'".

color_v

Manually specified colors. Default system default. Accept string in format like '"green", "red"' (both types of quotes needed).

title

Title of picture.

size

The variable for point size. Optional, such as a number or a variable like count, normally should be number column.

label

Label points. Default no-label (FALSE), accept TRUE.

label_font_size

Label font size. Default system default. Accept numbers less than 5 to shrink fonts.

...

Value

A ggplot2 object

Examples

1
2
3
4
5
## Not run:
pcoa_data = "pcoa.data"
group_pcoa_data = "group_pcoa.data"
sp_pcoa(data=pcoa_data,grp_file = group_pcoa_data, color = "genotype")
## End(Not run)

Tong-Chen/YSX documentation built on Jan. 25, 2021, 2:49 a.m.