Package 'TOmicsVis'

Title: TOmicsVis An All-in-One Transcriptomic Analysis and Visualization R Package with shinyapp Interface
Description: Transcriptome visualization from sample trait statistics to gene expression analysis. Six categories include "Samples Statistics", "Traits Analysis", "Differential Expression Analysis", "Advanced Analysis", "GO and KEGG Enrichment", "Tables Operations", with complete sample data.
Authors: Benben Miao [aut, cre] , Wei Dong [aut]
Maintainer: Benben Miao <[email protected]>
License: MIT + file LICENSE
Version: 2.1.1
Built: 2024-11-10 04:18:40 UTC
Source: https://github.com/benben-miao/tomicsvis

Help Index


Box plot support two levels and multiple groups with P value.

Description

Box plot support two levels and multiple groups with P value.

Usage

box_plot(
  data,
  test_method = "t.test",
  test_label = "p.format",
  notch = TRUE,
  group_level = "Three_Column",
  add_element = "jitter",
  my_shape = "fill_circle",
  sci_fill_color = "Sci_AAAS",
  sci_fill_alpha = 0.5,
  sci_color_alpha = 1,
  legend_pos = "right",
  legend_dir = "vertical",
  ggTheme = "theme_light"
)

Arguments

data

Dataframe: Length, Width, Weight, and Sex traits dataframe (1st-col: Value, 2nd-col: Traits, 3rd-col: Sex).

test_method

Character: test methods of P value. Default: "t.test", options: "wilcox.test", "t.test", "anova", "kruskal.test".

test_label

Character: test label of P value. Default: "p.format", options: "p.signif", "p.format". c(0, 0.0001, 0.001, 0.01, 0.05, 1).

notch

Logical: Box notch or none. Default: TRUE, options: TRUE, FALSE.

group_level

Character: group levels. Default: "Three_Column", options: "Two_Column", "Three_Column".

add_element

Character: add new plot. Default: "jitter", options: "none", "dotplot", "jitter", "boxplot", "point", "mean", "mean_se", "mean_sd", "mean_ci", "mean_range", "median", "median_iqr", "median_hilow", "median_q1q3", "median_mad", "median_range".

my_shape

Character: box scatter shape. Default: "fill_circle", options: "border_square", "border_circle", "border_triangle", "plus", "times", "border_diamond", "border_triangle_down", "square_times", "plus_times", "diamond_plus", "circle_plus", "di_triangle", "square_plus", "circle_times","square_triangle", "fill_square", "fill_circle", "fill_triangle", "fill_diamond", "large_circle", "small_circle", "fill_border_circle", "fill_border_square", "fill_border_diamond", "fill_border_triangle".

sci_fill_color

Character: ggsci color pallet. Default: "Sci_AAAS", options: "Sci_AAAS", "Sci_NPG", "Sci_Simpsons", "Sci_JAMA", "Sci_GSEA", "Sci_Lancet", "Sci_Futurama", "Sci_JCO", "Sci_NEJM", "Sci_IGV", "Sci_UCSC", "Sci_D3", "Sci_Material".

sci_fill_alpha

Numeric: ggsci fill color alpha. Default: 0.50, min: 0.00, max: 1.00.

sci_color_alpha

Numeric: ggsci border color alpha. Default: 1.00, min: 0.00, max: 1.00.

legend_pos

Character: legend position. Default: "right", options: "none", "left", "right", "bottom", "top".

legend_dir

Character: legend direction. Default: "vertical", options: "horizontal", "vertical".

ggTheme

Character: ggplot2 themes. Default: "theme_light", options: "theme_default", "theme_bw", "theme_gray", "theme_light", "theme_linedraw", "theme_dark", "theme_minimal", "theme_classic", "theme_void"

Value

Plot: box plot support two levels and multiple groups with P value.

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(traits_sex)
head(traits_sex)

# 3. Default parameters
box_plot(traits_sex)

# 4. Set test_label = "p.signif",
box_plot(traits_sex, test_label = "p.signif")

# 5. Set notch = FALSE
box_plot(traits_sex, notch = FALSE)

# 6. Set group_level = "Two_Column"
box_plot(traits_sex, group_level = "Two_Column")

# 7. Set add_element = "point"
box_plot(traits_sex, add_element = "point")

Chord plot for visualizing the relationships of pathways and genes.

Description

Chord plot is used to visualize complex relationships between samples and genes, as well as between pathways and genes.

Usage

chord_plot(
  data,
  multi_colors = "VividColors",
  color_seed = 10,
  color_alpha = 0.3,
  link_visible = TRUE,
  link_dir = -1,
  link_type = "diffHeight",
  sector_scale = "Origin",
  width_circle = 3,
  dist_name = 3,
  label_dir = "Vertical",
  dist_label = 0.3,
  label_scale = 0.8
)

Arguments

data

Dataframe: Shared DEGs of all paired comparisons in all samples expression dataframe of RNA-Seq. (1st-col: Genes, 2nd-col~: Samples).

multi_colors

Character: color palette. Default: "VividColors", options: "VividColors", "RainbowColors".

color_seed

Numeric: rand seed for VividColors. Default: 10.

color_alpha

Numeric: color alpha. Default: 0.50, min: 0.00, max: 1.00.

link_visible

Logical: links visible. Default: TRUE, options: TRUE, FALSE.

link_dir

Numeric: links direction, use with link_type. Default: -1, options: -1, 0, 1, 2.

link_type

Character: links type, use with link_dir. Default: "diffHeight", options: "diffHeight", "arrows".

sector_scale

Character: sector scale method. Default: "Origin", options: "Origin", "Scale".

width_circle

Numeric: outside circle width. Default: 3.0, min: 0.0, max: 10.0.

dist_name

Numeric: the distance of name and circle. Default: 3.0, min: 0.0, max: 10.0.

label_dir

Character: label director. Default: "Vertical", options: "Horizontal", "Vertical".

dist_label

Numeric: the distance of label and circle. Default: 0.3, min: 0.0.

label_scale

Numeric: labels font size sclae. Default: 0.8, min: 0, max: NULL.

Value

Plot: chord plot is used to visualize complex relationships between samples and genes, as well as between pathways and genes.

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(gene_expression2)
head(gene_expression2)

# 3. Default parameters
chord_plot(gene_expression2[1:20,])

Circos heatmap plot for visualizing gene expressing in multiple samples.

Description

Circos heatmap plot for visualizing gene expressing in multiple samples.

Usage

circos_heatmap(
  data,
  low_color = "#0000ff",
  mid_color = "#ffffff",
  high_color = "#ff0000",
  gap_size = 25,
  cluster_run = TRUE,
  cluster_method = "complete",
  distance_method = "euclidean",
  dend_show = "inside",
  dend_height = 0.2,
  track_height = 0.3,
  rowname_show = "outside",
  rowname_size = 0.8
)

Arguments

data

Dataframe: Shared degs of all paired comparisons in all samples expression dataframe of RNA-Seq. (1st-col: Genes, 2nd-col~: Samples).

low_color

Character: min value color (color name or hex value). Default: "#0000ff".

mid_color

Character: middle value color (color name or hex value). Default: "#ffffff".

high_color

Character: high value color (color name or hex value). Default: "#ff0000".

gap_size

Numeric: heatmap gap size. Default: 25, min: 0.

cluster_run

Logical: running cluster algorithm. Default: TRUE, options: TRUE, FALSE.

cluster_method

Character: cluster methods. Default: "complete", options: "ward.D", "ward.D2", "single", "complete", "average", "mcquitty", "median", "centroid".

distance_method

Character: distance methods. Default: "euclidean", options: "euclidean", "maximum", "manhattan", "canberra", "binary", "minkowski".

dend_show

Character: control dendgram display and position. Default: "inside", options: "none", "outside", "inside".

dend_height

Numeric: dendgram height. Default: 0.20, min: 0.00, max: 0.50.

track_height

Numeric: heatmap track height. Default: 0.30, min: 0.00, max: 0.50.

rowname_show

Character: control rownames display and position. Hind first rowname by running rownames(data). Default: "outside", options: "none", "outside", "inside".

rowname_size

Numeric: rowname font size. Default: 0.80, min: 0.10, max: 10.00.

Value

Plot: circos heatmap plot for visualizing gene expressing in multiple samples.

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(gene_expression2)
head(gene_expression2)

# 3. Default parameters
circos_heatmap(gene_expression2[1:50,])

Correlation Heatmap for samples/groups based on Pearson algorithm.

Description

Correlation Heatmap for samples/groups based on Pearson algorithm.

Usage

corr_heatmap(
  data,
  corr_method = "pearson",
  cell_shape = "square",
  fill_type = "full",
  lable_size = 3,
  axis_angle = 45,
  axis_size = 12,
  lable_digits = 3,
  color_low = "blue",
  color_mid = "white",
  color_high = "red",
  outline_color = "white",
  ggTheme = "theme_light"
)

Arguments

data

Dataframe: All genes in all samples expression dataframe of RNA-Seq (1st-col: Genes, 2nd-col~: Samples).

corr_method

Character: correlation method. Default: "pearson", options: "pearson", "spearman", "kendall".

cell_shape

Character: heatmap cell shape. Default: "square", options: "circle", "square".

fill_type

Character: heatmap fill type. Default: "full", options: "upper", "low", "full".

lable_size

Numeric: heatmap label size. Default: 3, min: 0.

axis_angle

Numeric: axis rotate angle. Default: 45, min: 0, max: 360.

axis_size

Numberic: axis font size. Default: 12, min: 0.

lable_digits

Numeric: heatmap label digits. Default: 3, min: 0, max: 3.

color_low

Character: low value color name or hex value. Default: "blue".

color_mid

Character: middle value color name or hex value. Default: "white".

color_high

Character: high value color name or hex value. Default: "red".

outline_color

Character: outline color name or hex value. Default: "white".

ggTheme

Character: ggplot2 theme. Default: "theme_light", options: "theme_default", "theme_bw", "theme_gray", "theme_light", "theme_linedraw", "theme_dark", "theme_minimal", "theme_classic", "theme_void".

Value

Plot: heatmap plot filled with Pearson correlation values and P values.

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset gene_exp
data(gene_expression)
head(gene_expression)

# 3. Default parameters
corr_heatmap(gene_expression)

# 4. Set color_low = "#008800"
corr_heatmap(gene_expression, color_low = "#008800")

# 5. Set cell_shape = "circle"
corr_heatmap(gene_expression, cell_shape = "circle")

Paired comparisons differentially expressed genes (degs) among groups.

Description

Paired comparisons differentially expressed genes (degs) among groups.

Usage

data(degs_lists)

Format

Dataframe: Paired comparisons differentially expressed genes (degs) among groups (1st-col~: degs of paired comparisons).

Author(s)

benben-miao

References

https://github.com/BioSciTools/BioSciToolsDatasets/tree/main/VennPlot/

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Load example data
data(degs_lists)

# 3. View example data
degs_lists

All DEGs of paired comparison CT-vs-LT12 stats dataframe.

Description

All DEGs of paired comparison CT-vs-LT12 stats dataframe.

Usage

data(degs_stats)

Format

Dataframe: All DEGs of paired comparison CT-vs-LT12 stats dataframe (1st-col: Genes, 2nd-col: log2FoldChange, 3rd-col: Pvalue, 4th-col: FDR).

Author(s)

benben-miao

References

https://github.com/BioSciTools/BioSciToolsDatasets/tree/main/VolcanoPlot/

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Load example data
data(degs_stats)

# 3. View example data
degs_stats

All DEGs of paired comparison CT-vs-LT12 stats2 dataframe.

Description

All DEGs of paired comparison CT-vs-LT12 stats2 dataframe.

Usage

data(degs_stats2)

Format

Dataframe: All DEGs of paired comparison CT-vs-LT12 stats2 dataframe (1st-col: Gene, 2nd-col: baseMean, 3rd-col: Log2FoldChange, 4th-col: FDR).

Author(s)

benben-miao

References

https://github.com/BioSciTools/BioSciToolsDatasets/tree/main/MversusA/

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Load example data
data(degs_stats2)

# 3. View example data
degs_stats2

Dendrograms for multiple samples/groups clustering.

Description

Dendrograms for multiple samples/groups clustering.

Usage

dendro_plot(
  data,
  dist_method = "euclidean",
  hc_method = "ward.D2",
  tree_type = "rectangle",
  k_num = 5,
  palette = "npg",
  color_labels_by_k = TRUE,
  horiz = FALSE,
  label_size = 1,
  line_width = 1,
  rect = TRUE,
  rect_fill = TRUE,
  xlab = "Samples",
  ylab = "Height",
  ggTheme = "theme_light"
)

Arguments

data

Dataframe: All genes in all samples expression dataframe of RNA-Seq (1st-col: Genes, 2nd-col~: Samples).

dist_method

Character: distance measure method. Default: "euclidean", options: "euclidean", "maximum", "manhattan", "canberra", "binary" or "minkowski".

hc_method

Character: hierarchical clustering method. Default: "ward.D2", options: "ward.D", "ward.D2", "single", "complete","average" (= UPGMA), "mcquitty" (= WPGMA), "median" (= WPGMC) or "centroid" (= UPGMC).

tree_type

Character: plot tree type. Default: "rectangle", options: "rectangle", "circular", "phylogenic".

k_num

Numeric: the number of groups for cutting the tree. Default: 3.

palette

Character: color palette used for the group. Default: "npg", options: "npg", "aaas", "lancet", "jco", "ucscgb", "uchicago", "simpsons" and "rickandmorty".

color_labels_by_k

Logical: labels colored by group. Default: TRUE, options: TRUE or FALSE.

horiz

Logical: horizontal dendrogram. Default: FALSE, options: TRUE or FALSE.

label_size

Numeric: tree label size. Default: 0.8, min: 0.

line_width

Numeric: branches and rectangle line width. Default: 0.7, min: 0.

rect

Logical: add a rectangle around groups. Default: TRUE, options: TRUE or FALSE.

rect_fill

Logical: fill the rectangle. Default: TRUE, options: TRUE or FALSE.

xlab

Character: title of the xlab. Default: "".

ylab

Character: title of the ylab. Default: "Height".

ggTheme

Character: ggplot2 theme. Default: "theme_light", options: "theme_default", "theme_bw", "theme_gray", "theme_light", "theme_linedraw", "theme_dark", "theme_minimal", "theme_classic", "theme_void".

Value

Plot: dendrogram for multiple samples clustering.

Author(s)

wei dong

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset gene_expression
data(gene_expression)
head(gene_expression)

# 3. Default parameters
dendro_plot(gene_expression)

# 4. Set palette = "aaas"
dendro_plot(gene_expression, palette = "aaas")

# 5. Set tree_type = "circular"
dendro_plot(gene_expression, tree_type = "circular")

Flower plot for stat common and unique gene among multiple sets.

Description

Flower plot for stat common and unique gene among multiple sets.

Usage

flower_plot(
  flower_dat,
  angle = 90,
  a = 1,
  b = 2,
  r = 1,
  ellipse_col_pal = "Spectral",
  circle_col = "white",
  label_text_cex = 1
)

Arguments

flower_dat

Dataframe: Paired comparisons differentially expressed genes (degs) among groups (1st-col~: degs of paired comparisons).

angle

Number: set the angle of rotation in degress. Default: 90.

a

Number: set the radii of the ellipses along the x-axes. Default: 0.5.

b

Number: set the radii of the ellipses along the y-axes. Default: 2.

r

Number: set the radius of the circle. Default: 1.

ellipse_col_pal

Character: set the color palette for filling the ellipse. Default: "Spectral", options: 'Spectral', 'Set1', 'Set2', 'Set3', 'Accent', 'Dark2', 'Paired', 'Pastel1', 'Pastel2'.

circle_col

Character: set the color for filling the circle. Default: "white".

label_text_cex

Number: set the label text cex. Default: 1.

Value

Plot: Flower plot for stat common and unique gene among multiple sets.

Author(s)

wei dong

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(degs_lists)
head(degs_lists)

# 3. Default parameters
flower_plot(degs_lists)

# 4. Set angle = 60
flower_plot(degs_lists, angle = 60)

# 5. Set ellipse_col_pal = "Accent"
flower_plot(degs_lists, ellipse_col_pal = "Accent")

# 6. Set a = 1, b = 2, r = 1
flower_plot(degs_lists, a = 1, b = 2, r = 1, ellipse_col_pal = "Set2")

Gene cluster trend plot for visualizing gene expression trend profile in multiple samples.

Description

Gene cluster trend plot for visualizing gene expression trend profile in multiple samples.

Usage

gene_cluster_trend(
  data,
  thres = 0.25,
  min_std = 0.2,
  palette = "PiYG",
  cluster_num = 4
)

Arguments

data

Dataframe: Shared DEGs of all paired comparisons in all groups expression dataframe of RNA-Seq. (1st-col: Genes, 2nd-col~n-1-col: Groups, n-col: Pathways).

thres

Number: set the threshold for excluding genes. Default: 0.25.

min_std

Number: set the threshold for minimum standard deviation. Default: 0.2.

palette

Character: set the color palette to be used for plotting. Default: "PiYG", options: 'Spectral', 'BrBG', 'PiYG', 'PRGn', 'PuOr', 'RdBu', 'RdGy', 'RdYlBu', 'RdYlGn'.

cluster_num

Number: set the number of clusters. Default: 4.

Value

Plot: Gene cluster trend plot for visualizing gene expression trend profile in multiple samples.

Author(s)

wei dong

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset gene_cluster_data
data(gene_expression3)
head(gene_expression3)

# 3. Default parameters
gene_cluster_trend(gene_expression3[,-7])

# 4. Set palette = "RdBu"
gene_cluster_trend(gene_expression3[,-7], palette = "RdBu")

# 5. Set cluster_num = 6
gene_cluster_trend(gene_expression3[,-7], cluster_num = 6, palette = "Spectral")

All genes in all samples expression dataframe of RNA-Seq.

Description

All genes in all samples expression dataframe of RNA-Seq.

Usage

data(gene_expression)

Format

Dataframe: All genes in all samples expression dataframe of RNA-Seq (1st-col: Genes, 2nd-col~: Samples).

Author(s)

benben-miao

References

https://github.com/BioSciTools/BioSciToolsDatasets/tree/main/CorPlot/

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Load example dataset gene_expression
data(gene_expression)

# 3. View gene_expression
gene_expression

Shared DEGs of all paired comparisons in all samples expression dataframe of RNA-Seq.

Description

Shared DEGs of all paired comparisons in all samples expression dataframe of RNA-Seq.

Usage

data(gene_expression2)

Format

Dataframe: Shared DEGs of all paired comparisons in all samples expression dataframe of RNA-Seq. (1st-col: Genes, 2nd-col~: Samples).

Author(s)

benben-miao

References

https://github.com/BioSciTools/BioSciToolsDatasets/tree/main/CorPlot/

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Load example dataset
data(gene_expression2)

# 3. View gene_expression2
gene_expression2

Shared DEGs of all paired comparisons in all groups expression dataframe of RNA-Seq.

Description

Shared DEGs of all paired comparisons in all groups expression dataframe of RNA-Seq.

Usage

data(gene_expression3)

Format

Dataframe: Shared DEGs of all paired comparisons in all groups expression dataframe of RNA-Seq. (1st-col: Genes, 2nd-col~n-1-col: Groups, n-col: Pathways).

Author(s)

benben-miao

References

https://github.com/BioSciTools/BioSciToolsDatasets/tree/main/CorPlot/

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Load example dataset
data(gene_expression3)

# 3. View gene_expression3
gene_expression3

GO and KEGG annotation of background genes.

Description

GO and KEGG annotation of background genes.

Usage

data(gene_go_kegg)

Format

Dataframe: GO and KEGG annotation of background genes (1st-col: Genes, 2nd-col: biological_process, 3rd-col: cellular_component, 4th-col: molecular_function, 5th-col: kegg_pathway).

Author(s)

benben-miao

References

https://github.com/BioSciTools/BioSciToolsDatasets/tree/main/GOenrichStat/

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Load example data
data(gene_go_kegg)

# 3. View example data
gene_go_kegg

GO and KEGG annotation of background genes.

Description

GO and KEGG annotation of background genes.

Usage

data(gene_go_kegg2)

Format

Dataframe: GO and KEGG annotation of background genes (1st-col: Genes, 2nd-col: biological_process, 3rd-col: cellular_component, 4th-col: molecular_function, 5th-col: kegg_pathway).

Author(s)

benben-miao

References

https://github.com/BioSciTools/BioSciToolsDatasets/tree/main/GOenrichStat/

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Load example data
data(gene_go_kegg2)

# 3. View example data
gene_go_kegg2

Gene ranking dotplot for visualizing differentailly expressed genes.

Description

Gene ranking dotplot for visualizing differentailly expressed genes.

Usage

gene_rank_plot(
  data,
  log2fc = 1,
  palette = "Spectral",
  top_n = 10,
  genes_to_label = NULL,
  label_size = 5,
  base_size = 12,
  title = "Gene ranking dotplot",
  xlab = "Ranking of differentially expressed genes",
  ylab = "Log2FoldChange"
)

Arguments

data

Dataframe: All DEGs of paired comparison CT-vs-LT12 stats dataframe (1st-col: Genes, 2nd-col: log2FoldChange, 3rd-col: Pvalue, 4th-col: FDR).

log2fc

Numeric: log2(FoldChange) cutoff log2(2) = 1. Default: 1.0, min: 0.0, max: null.

palette

Character: color palette used for the point. Default: "spectral", options: 'Spectral', 'BrBG', 'PiYG', 'PRGn', 'PuOr', 'RdBu', 'RdGy', 'RdYlBu', 'RdYlGn'.

top_n

Numeric: number of top differentailly expressed genes. Default: 10, min: 0.

genes_to_label

Character: a vector of selected genes. Default: "NULL".

label_size

Numeric: gene label size. Default: 5, min: 0.

base_size

Numeric: base font size. Default: 12, min: 0.

title

Character: main plot title. Default: "Gene ranking dotplot".

xlab

Character: title of the xlab. Default: "Ranking of differentially expressed genes".

ylab

Character: title of the ylab. Default: "Log2FoldChange".

Value

Plot: Gene ranking dotplot for visualizing differentailly expressed genes.

Author(s)

wei dong

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(degs_stats)
head(degs_stats)

# 3. Default parameters
gene_rank_plot(degs_stats)

# 4. Set top_n = 5
gene_rank_plot(degs_stats, top_n = 5, palette = "PiYG")

# 5. Set genes_to_label = c("SELL","CCR7","KLRG1","IL7R")
gene_rank_plot(degs_stats, genes_to_label = c("SELL","CCR7","KLRG1","IL7R"), palette = "PuOr")

GO enrichment analysis based on GO annotation results (None/Exist Reference Genome).

Description

GO enrichment analysis based on GO annotation results (None/Exist Reference Genome).

Usage

go_enrich(
  go_anno,
  degs_list,
  padjust_method = "fdr",
  pvalue_cutoff = 0.05,
  qvalue_cutoff = 0.05
)

Arguments

go_anno

Dataframe: GO and KEGG annotation of background genes (1st-col: Genes, 2nd-col: biological_process, 3rd-col: cellular_component, 4th-col: molecular_function, 5th-col: kegg_pathway).

degs_list

Dataframe: degs list.

padjust_method

Character: P-value adjust to Q-value. Default: "fdr" (false discovery rate), options: "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none".

pvalue_cutoff

Numeric: P-value cutoff. Recommend: small than 0.05.

qvalue_cutoff

Numeric: Q-value cutoff. Recommend: small than 0.05.

Value

Table: include columns ("ID", "ontology", "Description", "GeneRatio", "BgRatio", "pvalue", "p.adjust", "qvalue", "geneID", "Count").

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(gene_go_kegg)
head(gene_go_kegg)

# 3. Default parameters
res <- go_enrich(gene_go_kegg[,-5], gene_go_kegg[100:200,1])
head(res)

# 4. Set padjust_method = "BH"
res <- go_enrich(gene_go_kegg[,-5], gene_go_kegg[100:200,1], padjust_method = "BH")
head(res)

# 5. Set pvalue_cutoff = 0.10
res <- go_enrich(gene_go_kegg[,-5], gene_go_kegg[100:200,1], pvalue_cutoff = 0.10)
head(res)

GO enrichment analysis and bar plot (None/Exist Reference Genome).

Description

GO enrichment analysis and bar plot (None/Exist Reference Genome).

Usage

go_enrich_bar(
  go_anno,
  degs_list,
  padjust_method = "fdr",
  pvalue_cutoff = 0.05,
  qvalue_cutoff = 0.05,
  sign_by = "p.adjust",
  category_num = 30,
  font_size = 12,
  low_color = "#ff0000aa",
  high_color = "#008800aa",
  ggTheme = "theme_light"
)

Arguments

go_anno

Dataframe: GO and KEGG annotation of background genes (1st-col: Genes, 2nd-col: biological_process, 3rd-col: cellular_component, 4th-col: molecular_function, 5th-col: kegg_pathway).

degs_list

Dataframe: degs list.

padjust_method

Character: P-value adjust to Q-value. Default: "fdr" (false discovery rate), options: "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none".

pvalue_cutoff

Numeric: P-value cutoff. Recommend: small than 0.05.

qvalue_cutoff

Numeric: Q-value cutoff. Recommend: small than 0.05.

sign_by

Character: significant by. Default: "p.adjust", options: "pvalue", "p.adjust", "qvalue".

category_num

Numeric: categories number to display. Default: 30, min: 1, max: NULL.

font_size

Numeric: category font size. Default: 12.

low_color

Character: low value (p-value or q-value) color (color name or hex value).

high_color

Character: high value (p-value or q-value) color (color name or hex value).

ggTheme

Character: ggplot2 themes. Default: "theme_light", options: "theme_default", "theme_bw", "theme_gray", "theme_light", "theme_linedraw", "theme_dark", "theme_minimal", "theme_classic", "theme_void"

Value

Plot: GO enrichment analysis and bar plot (None/Exist Reference Genome).

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(gene_go_kegg)
head(gene_go_kegg)

# 3. Default parameters
go_enrich_bar(gene_go_kegg[,-5], gene_go_kegg[100:200,1])

# 4. Set padjust_method = "BH"
go_enrich_bar(gene_go_kegg[,-5], gene_go_kegg[100:200,1], padjust_method = "BH")

# 5. Set category_num = 10
go_enrich_bar(gene_go_kegg[,-5], gene_go_kegg[100:200,1], category_num = 10)

# 6. Set ggTheme = "theme_bw"
go_enrich_bar(gene_go_kegg[,-5], gene_go_kegg[100:200,1], ggTheme = "theme_bw")

GO enrichment analysis and dot plot (None/Exist Reference Genome).

Description

GO enrichment analysis and dot plot (None/Exist Reference Genome).

Usage

go_enrich_dot(
  go_anno,
  degs_list,
  padjust_method = "fdr",
  pvalue_cutoff = 0.05,
  qvalue_cutoff = 0.05,
  sign_by = "p.adjust",
  category_num = 30,
  font_size = 12,
  low_color = "#ff0000aa",
  high_color = "#008800aa",
  ggTheme = "theme_light"
)

Arguments

go_anno

Dataframe: GO and KEGG annotation of background genes (1st-col: Genes, 2nd-col: biological_process, 3rd-col: cellular_component, 4th-col: molecular_function, 5th-col: kegg_pathway).

degs_list

Dataframe: degs list.

padjust_method

Character: P-value adjust to Q-value. Default: "fdr" (false discovery rate), options: "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none".

pvalue_cutoff

Numeric: P-value cutoff. Recommend: small than 0.05.

qvalue_cutoff

Numeric: Q-value cutoff. Recommend: small than 0.05.

sign_by

Character: significant by. Default: "p.adjust", options: "pvalue", "p.adjust", "qvalue".

category_num

Numeric: categories number to display. Default: 30, min: 1, max: NULL.

font_size

Numeric: category font size. Default: 12.

low_color

Character: low value (p-value or q-value) color (color name or hex value).

high_color

Character: high value (p-value or q-value) color (color name or hex value).

ggTheme

Character: ggplot2 themes. Default: "theme_light", options: "theme_default", "theme_bw", "theme_gray", "theme_light", "theme_linedraw", "theme_dark", "theme_minimal", "theme_classic", "theme_void"

Value

Plot: GO enrichment analysis and dot plot (None/Exist Reference Genome).

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(gene_go_kegg)
head(gene_go_kegg)

# 3. Default parameters
go_enrich_dot(gene_go_kegg[,-5], gene_go_kegg[100:200,1])

# 4. Set padjust_method = "BH"
go_enrich_dot(gene_go_kegg[,-5], gene_go_kegg[100:200,1], padjust_method = "BH")

# 5. Set category_num = 10
go_enrich_dot(gene_go_kegg[,-5], gene_go_kegg[100:200,1], category_num = 10)

# 6. Set ggTheme = "theme_bw"
go_enrich_dot(gene_go_kegg[,-5], gene_go_kegg[100:200,1], ggTheme = "theme_bw")

GO enrichment analysis and net plot (None/Exist Reference Genome).

Description

GO enrichment analysis and net plot (None/Exist Reference Genome).

Usage

go_enrich_net(
  go_anno,
  degs_list,
  padjust_method = "fdr",
  pvalue_cutoff = 0.05,
  qvalue_cutoff = 0.05,
  category_num = 20,
  net_layout = "circle",
  net_circular = TRUE,
  low_color = "#ff0000aa",
  high_color = "#008800aa"
)

Arguments

go_anno

Dataframe: GO and KEGG annotation of background genes (1st-col: Genes, 2nd-col: biological_process, 3rd-col: cellular_component, 4th-col: molecular_function, 5th-col: kegg_pathway).

degs_list

Dataframe: degs list.

padjust_method

Character: P-value adjust to Q-value. Default: "fdr" (false discovery rate), options: "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none".

pvalue_cutoff

Numeric: P-value cutoff. Recommend: small than 0.05.

qvalue_cutoff

Numeric: Q-value cutoff. Recommend: small than 0.05.

category_num

Numeric: categories number to display. Default: 20, min: 1, max: NULL.

net_layout

Character: network layout. Default: "circle", options: 'star', 'circle', 'gem', 'dh', 'graphopt', 'grid', 'mds', 'randomly', 'fr', 'kk', 'drl' or 'lgl'.

net_circular

Logical: network circular. Default: TRUE, options: TRUE, FALSE.

low_color

Character: low value (p-value or q-value) color (color name or hex value).

high_color

Character: high value (p-value or q-value) color (color name or hex value).

Value

PLot: GO enrichment analysis and net plot (None/Exist Reference Genome).

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(gene_go_kegg)
head(gene_go_kegg)

# 3. Default parameters
go_enrich_net(gene_go_kegg[,-5], gene_go_kegg[100:200,1])

GO enrichment analysis and stat plot (None/Exist Reference Genome).

Description

GO enrichment analysis and stat plot (None/Exist Reference Genome).

Usage

go_enrich_stat(
  go_anno,
  degs_list,
  padjust_method = "fdr",
  pvalue_cutoff = 0.05,
  qvalue_cutoff = 0.05,
  max_go_item = 15,
  strip_fill = "#CDCDCD",
  xtext_angle = 45,
  sci_fill_color = "Sci_AAAS",
  sci_fill_alpha = 0.8,
  ggTheme = "theme_light"
)

Arguments

go_anno

Dataframe: GO and KEGG annotation of background genes (1st-col: Genes, 2nd-col: biological_process, 3rd-col: cellular_component, 4th-col: molecular_function, 5th-col: kegg_pathway).

degs_list

Dataframe: degs list.

padjust_method

Character: P-value adjust to Q-value. Default: "fdr" (false discovery rate), options: "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none".

pvalue_cutoff

Numeric: P-value cutoff. Recommend: small than 0.05.

qvalue_cutoff

Numeric: Q-value cutoff. Recommend: small than 0.05.

max_go_item

Numeric: max BP/CC/MF terms. Default: 15, min: 1, max: NULL.

strip_fill

Character: strip fill color (color name or hex value). Default: "#CDCDCD".

xtext_angle

Numeric: x axis texts angle. Default: 45, min: 0, max: 360.

sci_fill_color

Character: ggsci color pallet. Default: "Sci_AAAS", options: "Sci_AAAS", "Sci_NPG", "Sci_Simpsons", "Sci_JAMA", "Sci_GSEA", "Sci_Lancet", "Sci_Futurama", "Sci_JCO", "Sci_NEJM", "Sci_IGV", "Sci_UCSC", "Sci_D3", "Sci_Material".

sci_fill_alpha

Numeric: ggsci fill color alpha. Default: 0.80, min: 0.00, max: 1.00.

ggTheme

Character: ggplot2 themes. Default: "theme_light", options: "theme_default", "theme_bw", "theme_gray", "theme_light", "theme_linedraw", "theme_dark", "theme_minimal", "theme_classic", "theme_void"

Value

Plot: GO enrichment analysis and stat plot (None/Exist Reference Genome).

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(gene_go_kegg)
head(gene_go_kegg)

# 3. Default parameters
go_enrich_stat(gene_go_kegg[,-5], gene_go_kegg[100:200,1])

# 4. Set padjust_method = "BH"
go_enrich_stat(gene_go_kegg[,-5], gene_go_kegg[100:200,1], padjust_method = "BH")

# 5. Set max_go_item = 10
go_enrich_stat(gene_go_kegg[,-5], gene_go_kegg[100:200,1], max_go_item = 10)

# 6. Set strip_fill = "#008888"
go_enrich_stat(gene_go_kegg[,-5], gene_go_kegg[100:200,1], strip_fill = "#008888")

# 7. Set sci_fill_color = "Sci_JAMA"
go_enrich_stat(gene_go_kegg[,-5], gene_go_kegg[100:200,1], sci_fill_color = "Sci_JAMA")

Heatmap cluster for visualizing clustered gene expression data.

Description

Heatmap cluster for visualizing clustered gene expression data.

Usage

heatmap_cluster(
  data,
  dist_method = "euclidean",
  hc_method = "average",
  k_num = 5,
  show_rownames = FALSE,
  palette = "RdBu",
  cluster_pal = "Set1",
  border_color = "#ffffff",
  angle_col = 45,
  label_size = 10,
  base_size = 12,
  line_color = "#0000cd",
  line_alpha = 0.2,
  summary_color = "#0000cd",
  summary_alpha = 0.8
)

Arguments

data

Dataframe: Shared DEGs of all paired comparisons in all samples expression dataframe of RNA-Seq. (1st-col: Genes, 2nd-col~: Samples).

dist_method

Character: distance measure method. Default: "euclidean", options: "euclidean", "maximum", "manhattan", "canberra", "binary" or "minkowski".

hc_method

Character: hierarchical clustering method. Default: "average", options: "ward.D", "ward.D2", "single", "complete","average" (= UPGMA), "mcquitty" (= WPGMA), "median" (= WPGMC) or "centroid" (= UPGMC).

k_num

Numeric: the number of groups for cutting the tree. Default: 5.

show_rownames

Logical: boolean specifying if column names are be shown. Default: FALSE, options: TRUE or FALSE.

palette

Character: color palette used in heatmap. Default: "RdBu", options: 'Spectral', 'BrBG', 'PiYG', 'PRGn', 'PuOr', 'RdBu', 'RdGy', 'RdYlBu', 'RdYlGn'.

cluster_pal

Character: color palette used for the cluster. Default: "Set1", options: 'Set1', 'Set2', 'Set3', 'Accent', 'Dark2', 'Paired', 'Pastel1', 'Pastel2'.

border_color

Character: cell border color (color name or hex value). Default: "#ffffff".

angle_col

Numeric: angle of the column labels. Default: 45.

label_size

Numeric: fontsize for the plot. Default: 10, min: 0.

base_size

Numeric: base font size. Default: 12, min: 0.

line_color

Character: trend lines color. Default: "#0000cd".

line_alpha

Numeric: trend lines alpha. Default: 0.20, min: 0.00, max: 1.00.

summary_color

Charater: summary line color. Default: "#0000cd".

summary_alpha

Numeric: summary line alpha. Default: 0.80, min: 0.00, max: 1.00.

Value

Plot: Heatmap cluster for visualizing clustered gene expression data.

Author(s)

wei dong

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(gene_expression2)
head(gene_expression2)

# 3. Default parameters
heatmap_cluster(gene_expression2)

# 4. Set palette = "PuOr"
heatmap_cluster(gene_expression2, palette = "PuOr")

# 5. Set line_color = "#ff0000", summary_color = "#ff0000"
heatmap_cluster(gene_expression2, line_color = "#ff0000", summary_color = "#ff0000")

Heatmap group for visualizing grouped gene expression data.

Description

Heatmap group for visualizing grouped gene expression data.

Usage

heatmap_group(
  sample_gene,
  group_sample,
  scale_data = "row",
  clust_method = "complete",
  border_show = TRUE,
  border_color = "#ffffff",
  value_show = TRUE,
  value_decimal = 2,
  value_size = 5,
  axis_size = 8,
  cell_height = 10,
  low_color = "#00880055",
  mid_color = "#ffffff",
  high_color = "#ff000055",
  na_color = "#ff8800",
  x_angle = 45
)

Arguments

sample_gene

Dataframe: Shared degs of all paired comparisons in all samples expression dataframe of RNA-Seq. (1st-col: Genes, 2nd-col~: Samples).

group_sample

Dataframe: Samples and groups for gene expression (1st-col: Samples, 2nd-col: Groups).

scale_data

Character: scale data. Default: "row", options: "row", "column", "none".

clust_method

Character: cluster method. Default: "complete", options: "ward.D", "ward.D2", "single", "complete", "average" (= UPGMA), "mcquitty" (= WPGMA), "median" (= WPGMC) or "centroid" (= UPGMC).

border_show

Logical: show border. Default: TRUE, options: TRUE, FALSE.

border_color

Character: cell border color (color value or hex value with alpha). Default: "#ffffff".

value_show

Logical: show value in cell. Default: TRUE, options: TRUE, FALSE.

value_decimal

Numeric: cell value decimal. Default: 2, min: 0, max: 5.

value_size

Numeric: cell value font size. Default: 5, min: 0, max: NULL.

axis_size

Numeric: axis title font size. Default: 8, min: 0, max: NULL.

cell_height

Numeric: cell height for value size and axis size. Default: 10.

low_color

Character: min value color (color value or hex value with alpha). Default: "#00880055".

mid_color

Character: min value color (color value or hex value with alpha). Default: "#ffffff".

high_color

Character: min value color (color value or hex value with alpha). Default: "#ff000055".

na_color

Character: min value color (color value or hex value with alpha). Default: "#ff8800".

x_angle

Numeric: x axis text angle. Default: 45, min: 0, max: 360.

Value

Plot: Heatmap group for visualizing grouped gene expression data.

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(gene_expression2)
head(gene_expression2)

data(samples_groups)
head(samples_groups)

# 3. Default parameters
heatmap_group(gene_expression2[1:50,], samples_groups)

# 4. Set scale_data = "column"
heatmap_group(gene_expression2[1:50,], samples_groups, scale_data = "column")

# 5. Set value_show = FALSE
heatmap_group(gene_expression2[1:50,], samples_groups, value_show = FALSE)

# 6. Set low_color = "#00008888"
heatmap_group(gene_expression2[1:50,], samples_groups, low_color = "#00008888")

KEGG enrichment analysis based on KEGG annotation results (None/Exist Reference Genome).

Description

KEGG enrichment analysis based on KEGG annotation results (None/Exist Reference Genome).

Usage

kegg_enrich(
  kegg_anno,
  degs_list,
  padjust_method = "fdr",
  pvalue_cutoff = 0.05,
  qvalue_cutoff = 0.05
)

Arguments

kegg_anno

Dataframe: GO and KEGG annotation of background genes (1st-col: Genes, 2nd-col: biological_process, 3rd-col: cellular_component, 4th-col: molecular_function, 5th-col: kegg_pathway).

degs_list

Dataframe: degs list.

padjust_method

Character: P-value adjust to Q-value. Default: "fdr" (false discovery rate), options: "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none".

pvalue_cutoff

Numeric: P-value cutoff. Recommend: small than 0.05.

qvalue_cutoff

Numeric: Q-value cutoff. Recommend: small than 0.05.

Value

Table: include columns ("ID", "Description", "GeneRatio", "BgRatio", "pvalue", "p.adjust", "qvalue", "geneID", "Count").

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(gene_go_kegg)
head(gene_go_kegg)

# 3. Default parameters
res <- kegg_enrich(gene_go_kegg[,c(1,5)], gene_go_kegg[100:200,1])
head(res)

# 4. Set padjust_method = "BH"
res <- kegg_enrich(gene_go_kegg[,c(1,5)], gene_go_kegg[100:200,1], padjust_method = "BH")
head(res)

# 5. Set pvalue_cutoff = 0.80
res <- kegg_enrich(gene_go_kegg[,c(1,5)], gene_go_kegg[100:200,1], pvalue_cutoff = 0.80)
head(res)

KEGG enrichment analysis and bar plot (None/Exist Reference Genome).

Description

KEGG enrichment analysis and bar plot (None/Exist Reference Genome).

Usage

kegg_enrich_bar(
  kegg_anno,
  degs_list,
  padjust_method = "fdr",
  pvalue_cutoff = 0.05,
  qvalue_cutoff = 0.05,
  sign_by = "p.adjust",
  category_num = 30,
  font_size = 12,
  low_color = "#ff0000aa",
  high_color = "#008800aa",
  ggTheme = "theme_light"
)

Arguments

kegg_anno

Dataframe: GO and KEGG annotation of background genes (1st-col: Genes, 2nd-col: biological_process, 3rd-col: cellular_component, 4th-col: molecular_function, 5th-col: kegg_pathway).

degs_list

Dataframe: degs list.

padjust_method

Character: P-value adjust to Q-value. Default: "fdr" (false discovery rate), options: "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none".

pvalue_cutoff

Numeric: P-value cutoff. Recommend: small than 0.05.

qvalue_cutoff

Numeric: Q-value cutoff. Recommend: small than 0.05.

sign_by

Character: significant by. Default: "p.adjust", options: "pvalue", "p.adjust", "qvalue".

category_num

Numeric: categories number to display. Default: 30, min: 1, max: NULL.

font_size

Numeric: category font size. Default: 12.

low_color

Character: low value (p-value or q-value) color (color name or hex value).

high_color

Character: high value (p-value or q-value) color (color name or hex value).

ggTheme

Character: ggplot2 themes. Default: "theme_light", options: "theme_default", "theme_bw", "theme_gray", "theme_light", "theme_linedraw", "theme_dark", "theme_minimal", "theme_classic", "theme_void".

Value

Plot: KEGG enrichment analysis and bar plot (None/Exist Reference Genome).

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(gene_go_kegg)
head(gene_go_kegg)

# 3. Default parameters
kegg_enrich_bar(gene_go_kegg[,c(1,5)], gene_go_kegg[100:200,1])

# 4. Set padjust_method = "BH"
kegg_enrich_bar(gene_go_kegg[,c(1,5)], gene_go_kegg[100:200,1], padjust_method = "BH")

# 5. Set category_num = 10
kegg_enrich_bar(gene_go_kegg[,c(1,5)], gene_go_kegg[100:200,1], category_num = 10)

# 6. Set ggTheme = "theme_bw"
kegg_enrich_bar(gene_go_kegg[,c(1,5)], gene_go_kegg[100:200,1], ggTheme = "theme_bw")

KEGG enrichment analysis and dot plot (None/Exist Reference Genome).

Description

KEGG enrichment analysis and dot plot (None/Exist Reference Genome).

Usage

kegg_enrich_dot(
  kegg_anno,
  degs_list,
  padjust_method = "fdr",
  pvalue_cutoff = 0.05,
  qvalue_cutoff = 0.05,
  sign_by = "p.adjust",
  category_num = 30,
  font_size = 12,
  low_color = "#ff0000aa",
  high_color = "#008800aa",
  ggTheme = "theme_light"
)

Arguments

kegg_anno

Dataframe: GO and KEGG annotation of background genes (1st-col: Genes, 2nd-col: biological_process, 3rd-col: cellular_component, 4th-col: molecular_function, 5th-col: kegg_pathway).

degs_list

Dataframe: degs list.

padjust_method

Character: P-value adjust to Q-value. Default: "fdr" (false discovery rate), options: "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none".

pvalue_cutoff

Numeric: P-value cutoff. Recommend: small than 0.05.

qvalue_cutoff

Numeric: Q-value cutoff. Recommend: small than 0.05.

sign_by

Character: significant by. Default: "p.adjust", options: "pvalue", "p.adjust", "qvalue".

category_num

Numeric: categories number to display. Default: 30, min: 1, max: NULL.

font_size

Numeric: category font size. Default: 12.

low_color

Character: low value (p-value or q-value) color (color name or hex value).

high_color

Character: high value (p-value or q-value) color (color name or hex value).

ggTheme

Character: ggplot2 themes. Default: "theme_light", options: "theme_default", "theme_bw", "theme_gray", "theme_light", "theme_linedraw", "theme_dark", "theme_minimal", "theme_classic", "theme_void"

Value

Plot: KEGG enrichment analysis and dot plot (None/Exist Reference Genome).

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(gene_go_kegg)
head(gene_go_kegg)

# 3. Default parameters
kegg_enrich_dot(gene_go_kegg[,c(1,5)], gene_go_kegg[100:200,1])

# 4. Set padjust_method = "BH"
kegg_enrich_dot(gene_go_kegg[,c(1,5)], gene_go_kegg[100:200,1], padjust_method = "BH")

# 5. Set category_num = 10
kegg_enrich_dot(gene_go_kegg[,c(1,5)], gene_go_kegg[100:200,1], category_num = 10)

# 6. Set ggTheme = "theme_bw"
kegg_enrich_dot(gene_go_kegg[,c(1,5)], gene_go_kegg[100:200,1], ggTheme = "theme_bw")

KEGG enrichment analysis and net plot (None/Exist Reference Genome).

Description

KEGG enrichment analysis and net plot (None/Exist Reference Genome).

Usage

kegg_enrich_net(
  kegg_anno,
  degs_list,
  padjust_method = "fdr",
  pvalue_cutoff = 0.05,
  qvalue_cutoff = 0.05,
  category_num = 20,
  net_layout = "circle",
  net_circular = TRUE,
  low_color = "#ff0000aa",
  high_color = "#008800aa"
)

Arguments

kegg_anno

Dataframe: GO and KEGG annotation of background genes (1st-col: Genes, 2nd-col: biological_process, 3rd-col: cellular_component, 4th-col: molecular_function, 5th-col: kegg_pathway).

degs_list

Dataframe: degs list.

padjust_method

Character: P-value adjust to Q-value. Default: "fdr" (false discovery rate), options: "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr", "none".

pvalue_cutoff

Numeric: P-value cutoff. Recommend: small than 0.05.

qvalue_cutoff

Numeric: Q-value cutoff. Recommend: small than 0.05.

category_num

Numeric: categories number to display. Default: 20, min: 1, max: NULL.

net_layout

Character: network layout. Default: "circle", options: 'star', 'circle', 'gem', 'dh', 'graphopt', 'grid', 'mds', 'randomly', 'fr', 'kk', 'drl' or 'lgl'.

net_circular

Logical: network circular. Default: TRUE, options: TRUE, FALSE.

low_color

Character: low value (p-value or q-value) color (color name or hex value).

high_color

Character: high value (p-value or q-value) color (color name or hex value).

Value

Plot: KEGG enrichment analysis and net plot (None/Exist Reference Genome).

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(gene_go_kegg)
head(gene_go_kegg)

# 3. Default parameters
kegg_enrich_net(gene_go_kegg[,c(1,5)], gene_go_kegg[100:200,1])

# 4. Set category_num = 10
kegg_enrich_net(gene_go_kegg[,c(1,5)], gene_go_kegg[100:200,1], category_num = 10)

MversusA plot for visualizing differentially expressed genes.

Description

MversusA plot for visualizing differentially expressed genes.

Usage

ma_plot(
  data,
  foldchange = 1,
  fdr_value = 0.05,
  point_size = 3,
  color_up = "#FF0000",
  color_down = "#008800",
  color_alpha = 0.5,
  top_method = "fc",
  top_num = 20,
  label_size = 8,
  label_box = TRUE,
  title = "CT-vs-LT12",
  xlab = "Log2 mean expression",
  ylab = "Log2 fold change",
  ggTheme = "theme_light"
)

Arguments

data

Dataframe: differentially expressed genes (DEGs) stats 2 (1st-col: Gene, 2nd-col: baseMean, 3rd-col: Log2FoldChange, 4th-col: FDR).

foldchange

Numeric: fold change value. Default: 1.0, min: 0.0, max: null.

fdr_value

Numeric: false discovery rate. Default: 0.05, min: 0.00, max: 1.00.

point_size

Numeric: point size. Default: 1.0, min: 0.0, max: null.

color_up

Character: up-regulated genes color (color name or hex value). Default: "#FF0000".

color_down

Character: down-regulated genes color (color name or hex value). Default: "#008800".

color_alpha

Numeric: point color alpha. Default: 0.50, min: 0.00, max: 1.00.

top_method

Character: top genes select method. Default: "fc" (fold change), options: "padj" (p-adjust), "fc".

top_num

Numeric: top genes number. Default: 20, min: 0, max: null.

label_size

Numeric: label font size. Default: 8.00, min: 0.00, max: null.

label_box

Logical: add box to label. Default: TRUE, options: TRUE, FALSE.

title

Character: plot title. Default: "CT-vs-Trait1".

xlab

Character: x label. Default: "Log2 mean expression".

ylab

Character: y label. Default: "Log2 fold change".

ggTheme

Character: ggplot2 themes. Default: "theme_light", options: "theme_default", "theme_bw", "theme_gray", "theme_light", "theme_linedraw", "theme_dark", "theme_minimal", "theme_classic", "theme_void"

Value

Plot: MversusA plot for visualizing differentially expressed genes.

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(degs_stats2)
head(degs_stats2)

# 3. Default parameters
ma_plot(degs_stats2)

# 4. Set color_up = "#FF8800"
ma_plot(degs_stats2, color_up = "#FF8800")

# 5. Set top_num = 10
ma_plot(degs_stats2, top_num = 10)

Network data from WGCNA tan module top-200 dataframe.

Description

Network data from WGCNA tan module top-200 dataframe.

Usage

data(network_data)

Format

Dataframe: Network data from WGCNA tan module top-200 dataframe (1st-col: Source, 2nd-col: Target).

Author(s)

benben-miao

References

https://github.com/BioSciTools/BioSciToolsDatasets/tree/main/NetworkPlot/

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Load example data
data(network_data)

# 3. View example data
network_data

Network plot for analyzing and visualizing relationship of genes.

Description

Network plot for analyzing and visualizing relationship of genes.

Usage

network_plot(
  data,
  calc_by = "degree",
  degree_value = 0.5,
  normal_color = "#008888cc",
  border_color = "#FFFFFF",
  from_color = "#FF0000cc",
  to_color = "#008800cc",
  normal_shape = "circle",
  spatial_shape = "circle",
  node_size = 25,
  lable_color = "#FFFFFF",
  label_size = 0.5,
  edge_color = "#888888",
  edge_width = 1.5,
  edge_curved = TRUE,
  net_layout = "layout_on_sphere"
)

Arguments

data

Dataframe: Network data from WGCNA tan module top-200 dataframe (1st-col: Source, 2nd-col: Target).

calc_by

Character: calculate relationship by "degree", "node". Default: "degree".

degree_value

Numeric: degree value when calc_by = "degree". Default: 0.05, min: 0.00, max: 1.00.

normal_color

Character: normal relationship nodes color (color name of hex value).

border_color

Character: node border color (color name or hex value).

from_color

Character: the start color of nodes that meet degree_value.

to_color

Character: the end color of nodes that meet degree_value.

normal_shape

Character: normal node shape. Default: "circle", options: "circle", "crectangle", "csquare", "none", "pie", "raster", "rectangle", "sphere", "square", "vrectangle".

spatial_shape

Character: meet degree_value node shape. Default: "csquare", options: "circle", "crectangle", "csquare", "none", "pie", "raster", "rectangle", "sphere", "square", "vrectangle".

node_size

Numeric: node size. Default: 10, min: 0, max: NULL.

lable_color

Character: gene labels color. Default: "#FFFFFF".

label_size

Numeric: node label size. Default: 0.5, min: 0, max: NULL.

edge_color

Character: edges color. Default: "#888888".

edge_width

Numeric: edges width. Default: 1.5.

edge_curved

Logical: curved edges. Default: TRUE, options: TRUE, FALSE.

net_layout

Character: network layout. Default: "layout_on_sphere", options: "layout_as_bipartite", "layout_as_star", "layout_as_tree", "layout_components", "layout_in_circle", "layout_nicely", "layout_on_grid", "layout_on_sphere","layout_randomly","layout_with_dh","layout_with_drl","layout_with_fr","layout_with_gem","layout_with_graphopt","layout_with_kk","layout_with_lgl","layout_with_mds","layout_with_sugiyama".

Value

Plot: network plot for analyzing and visualizing relationship of genes.

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(network_data)
head(network_data)

# 3. Default parameters
network_plot(network_data)

# 4. Set calc_by = "node"
network_plot(network_data, calc_by = "node")

# 5. Set degree_value = 0.1
network_plot(network_data, degree_value = 0.1)

# 6. Set normal_color = "#ff8800cc"
network_plot(network_data, normal_color = "#ff8800cc")

# 7. Set net_layout = "layout_as_tree"
network_plot(network_data, net_layout = "layout_as_tree")

PCA dimensional reduction analysis for RNA-Seq.

Description

PCA dimensional reduction analysis for RNA-Seq.

Usage

pca_analysis(sample_gene, group_sample)

Arguments

sample_gene

Dataframe: All genes in all samples expression dataframe of RNA-Seq (1st-col: Genes, 2nd-col~: Samples).

group_sample

Dataframe: Samples and groups for gene expression (1st-col: Samples, 2nd-col: Groups).

Value

Table: PCA dimensional reduction analysis for RNA-Seq.

Author(s)

benben-miao

Examples

# 1. Library package TOmicsVis
library(TOmicsVis)

# 2. Load example datasets
data(gene_expression)
head(gene_expression)

data(samples_groups)
head(samples_groups)

# 3. Default parameters
res <- pca_analysis(gene_expression, samples_groups)
head(res)

PCA dimensional reduction visualization for RNA-Seq.

Description

PCA dimensional reduction visualization for RNA-Seq.

Usage

pca_plot(
  sample_gene,
  group_sample,
  xPC = 1,
  yPC = 2,
  multi_shape = TRUE,
  point_size = 5,
  point_alpha = 0.8,
  text_size = 5,
  fill_alpha = 0.05,
  border_alpha = 0,
  sci_fill_color = "Sci_AAAS",
  legend_pos = "right",
  legend_dir = "vertical",
  ggTheme = "theme_light"
)

Arguments

sample_gene

Dataframe: All genes in all samples expression dataframe of RNA-Seq (1st-col: Genes, 2nd-col~: Samples).

group_sample

Dataframe: Samples and groups for gene expression (1st-col: Samples, 2nd-col: Groups).

xPC

Numeric: PC index at x axis. Default: 1, options: 1, 2, 3, ...

yPC

Numeric: PC index at y axis. Default: 2, options: 2, 3, 4, ...

multi_shape

Logical: groups as shapes. Default: TRUE, options: TRUE, FALSE.

point_size

Numeric: PCA plot point size. Default: 5, min: 0.

point_alpha

Numeric: point color alpha. Default: 0.80, min: 0.00, max: 1.00.

text_size

Numeric: PCA plot annotation size. Default: 5, min: 0.

fill_alpha

Numeric: ellipse fill color alpha. Default: 0.10, min: 0.00, max: 1.00.

border_alpha

Numeric: ellipse border color alpha. Default: 0.10, min: 0.00, max: 1.00.

sci_fill_color

Character: ggsci color pallet. Default: "Sci_AAAS", options: "Sci_AAAS", "Sci_NPG", "Sci_Simpsons", "Sci_JAMA", "Sci_GSEA", "Sci_Lancet", "Sci_Futurama", "Sci_JCO", "Sci_NEJM", "Sci_IGV", "Sci_UCSC", "Sci_D3", "Sci_Material".

legend_pos

Character: legend position. Default: "right", options: "none", "left", "right", "bottom", "top".

legend_dir

Character: legend director. Default: "vertical", options: "horizontal", "vertical".

ggTheme

Character: ggplot2 theme. Default: "theme_light", options: "theme_default", "theme_bw", "theme_gray", "theme_light", "theme_linedraw", "theme_dark", "theme_minimal", "theme_classic", "theme_void".

Value

Plot: PCA dimensional reduction visualization for RNA-Seq.

Author(s)

benben-miao

Examples

# 1. Library package TOmicsVis
library(TOmicsVis)

# 2. Load example datasets
data(gene_expression)
head(gene_expression)

data(samples_groups)
head(samples_groups)

# 3. Default parameters
pca_plot(gene_expression, samples_groups)

# 4. Set multi_shape = FALSE
pca_plot(gene_expression, samples_groups, multi_shape = FALSE)

# 5. Set sci_fill_color = "Sci_NPG", fill_alpha = 0.10
pca_plot(gene_expression, samples_groups, sci_fill_color = "Sci_NPG", fill_alpha = 0.10)

Quantile plot for visualizing data distribution.

Description

Quantile plot for visualizing data distribution.

Usage

quantile_plot(
  data,
  my_shape = "fill_circle",
  point_size = 1.5,
  conf_int = TRUE,
  conf_level = 0.95,
  split_panel = "Split_Panel",
  legend_pos = "right",
  legend_dir = "vertical",
  sci_fill_color = "Sci_NPG",
  sci_color_alpha = 0.75,
  ggTheme = "theme_light"
)

Arguments

data

Dataframe: Weight and Sex traits dataframe (1st-col: Weight, 2nd-col: Sex).

my_shape

Character: scatter shape. Default: "fill_circle", options: "border_square", "border_circle", "border_triangle", "plus", "times", "border_diamond", "border_triangle_down", "square_times", "plus_times", "diamond_plus", "circle_plus", "di_triangle", "square_plus", "circle_times","square_triangle", "fill_square", "fill_circle", "fill_triangle", "fill_diamond", "large_circle", "small_circle", "fill_border_circle", "fill_border_square", "fill_border_diamond", "fill_border_triangle".

point_size

Numeric: point size. Default: 1.5, min: 0.0, max: not required.

conf_int

Logical: confidence interval (CI). Default: TRUE, options: TRUE or FALSE.

conf_level

Numeric: confidence interval value. Default: 0.95, min: 0.00, max: 1.00.

split_panel

Character: split panel by groups. Default: "Split_Panel", options: "One_Panel", "Split_Panel".

legend_pos

Character: legend position. Default: "right", options: "none", "left", "right", "bottom", "top".

legend_dir

Character: legend direction. Default: "vertical", options: "horizontal", "vertical".

sci_fill_color

Character: ggsci fill or color palette. Default: "Sci_NPG", options: "Sci_AAAS", "Sci_NPG", "Sci_Simpsons", "Sci_JAMA", "Sci_GSEA", "Sci_Lancet", "Sci_Futurama", "Sci_JCO", "Sci_NEJM", "Sci_IGV", "Sci_UCSC", "Sci_D3", "Sci_Material".

sci_color_alpha

Numeric: ggsci border color alpha. Default: 0.75, min: 0.00, max: 1.00.

ggTheme

Character: ggplot2 themes. Default: "theme_light", options: "theme_default", "theme_bw", "theme_gray", "theme_light", "theme_linedraw", "theme_dark", "theme_minimal", "theme_classic", "theme_void".

Value

Plot: quantile plot for visualizing data distribution.

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(weight_sex)
head(weight_sex)

# 3. Default parameters
quantile_plot(weight_sex)

# 4. Set split_panel = "Split_Panel"
quantile_plot(weight_sex, split_panel = "Split_Panel")

# 5. Set sci_fill_color = "Sci_Futurama"
quantile_plot(weight_sex, sci_fill_color = "Sci_Futurama")

# 6. Set conf_int = FALSE
quantile_plot(weight_sex, conf_int = FALSE)

Samples and groups for gene expression.

Description

Samples and groups for gene expression.

Usage

data(samples_groups)

Format

Dataframe: Samples and groups for gene expression (1st-col: Samples, 2nd-col: Groups).

Author(s)

benben-miao

References

https://github.com/BioSciTools/BioSciToolsDatasets/tree/main/PCAplot/

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Load example dataset samples_groups
data(samples_groups)

# 3. View samples_groups
samples_groups

Survival data as example data for survival_plot function.

Description

Survival data as example data for survival_plot function.

Usage

data(survival_data)

Format

Dataframe: survival record data (1st-col: Time, 2nd-col: Status, 3rd-col: Group).

Author(s)

benben-miao

References

https://github.com/BioSciTools/BioSciToolsDatasets/tree/main/SurvivalAnalysis/

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Load example data
data(survival_data)

# 3. View example data
survival_data

Survival plot for analyzing and visualizing survival data.

Description

Survival plot for analyzing and visualizing survival data.

Usage

survival_plot(
  data,
  curve_function = "pct",
  log_rank = "1",
  conf_inter = TRUE,
  interval_style = "ribbon",
  risk_table = TRUE,
  num_censor = TRUE,
  sci_palette = "aaas",
  ggTheme = "theme_light",
  x_start = 0,
  y_start = 0,
  y_end = 100,
  x_break = 10
)

Arguments

data

Dataframe: survival record data (1st-col: Time, 2nd-col: Status, 3rd-col: Group).

curve_function

Character: an arbitrary function defining a transformation of the survival curve. Often used transformations can be specified with a character argument: "event" plots cumulative events (f(y) = 1-y), "cumhaz" plots the cumulative hazard function (f(y) = -log(y)), and "pct" for survival probability in percentage.

log_rank

Character: the weights to be used in computing the p-value for log-rank test. Default: "1", options: "1", "n", "sqrtN", "S1", "S2", "FH". so that weight correspond to the test as : 1 - log-rank, n - Gehan-Breslow (generalized Wilcoxon), sqrtN - Tarone-Ware, S1 - Peto-Peto's modified survival estimate, S2 - modified Peto-Peto (by Andersen), FH - Fleming-Harrington(p=1, q=1).

conf_inter

Logical: confidence interval. Default: TRUE, options: TRUE, FALSE.

interval_style

Character: confidence interval style. Default: "ribbon", options: "ribbon", "step".

risk_table

Logical: show cumulative risk table. Default: TRUE, options: TRUE, FALSE.

num_censor

Logical: show cumulative number of censoring. Default: TRUE, options: TRUE, FALSE.

sci_palette

Character: ggsci color palette. Default: "aaas", options: "aaas", "npg", "lancet", "jco", "ucscgb", "uchicago", "simpsons", "rickandmorty".

ggTheme

Character: ggplot2 themes. Default: "theme_light", options: "theme_default", "theme_bw", "theme_gray", "theme_light", "theme_linedraw", "theme_dark", "theme_minimal", "theme_classic", "theme_void"

x_start

Numeric: x-axis start value. Default: 0, min: 0, max: null.

y_start

Numeric: y-axis start value. Default: 0, min: 0, max: 100.

y_end

Numeric: y-axis end value. Default: 100, min: 0, max: 100.

x_break

Numeric: x-axis break value. Default: 10, min: 0, max: null.

Value

Plot: survival plot for analyzing and visualizing survival data.

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(survival_data)
head(survival_data)

# 3. Default parameters
survival_plot(survival_data)

# 4. Set conf_inter = FALSE
survival_plot(survival_data, conf_inter = FALSE)

# 5. Set sci_palette = "jco"
survival_plot(survival_data, sci_palette = "jco")

Table cross used to cross search and merge results in two tables.

Description

Table cross used to cross search and merge results in two tables.

Usage

table_cross(
  data1,
  data2,
  inter_var = "Genes",
  left_index = TRUE,
  right_index = TRUE
)

Arguments

data1

Dataframe: Shared DEGs of all paired comparisons in all samples expression dataframe of RNA-Seq. (1st-col: Genes, 2nd-col~: Samples).

data2

Dataframe: GO and KEGG annotation of background genes (1st-col: Genes, 2nd-col: biological_process, 3rd-col: cellular_component, 4th-col: molecular_function, 5th-col: kegg_pathway).

inter_var

Character: Intersecting variable (column name). Default: "geneID" in example data.

left_index

Logical: left table as index. Default: TRUE, options: TRUE, FALSE.

right_index

Logical: right table as index. Default: FALSE, options: TRUE, FALSE.

Value

Table: include multiple columns.

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(gene_expression2)
head(gene_expression2)

data(gene_go_kegg)
head(gene_go_kegg)

# 3. Default parameters
res <- table_cross(gene_expression2, gene_go_kegg, inter_var = "Genes")
head(res)

# 4. Set left_index = TRUE, right_index = FALSE
res <- table_cross(gene_expression2, gene_go_kegg,
inter_var = "Genes", left_index = TRUE, right_index = FALSE)
head(res)

# 5. Set left_index = FALSE, right_index = TRUE
res <- table_cross(gene_expression2, gene_go_kegg,
inter_var = "Genes", left_index = FALSE, right_index = TRUE)
head(res)

Table filter used to filter row by column condition.

Description

Table filter used to filter row by column condition.

Usage

table_filter(data, ...)

Arguments

data

Dataframe: Length, Width, Weight, and Sex traits dataframe (1st-col: Value, 2nd-col: Traits, 3rd-col: Sex).

...

Expression: multiple expressions.

Value

Table: table filter used to filter row by column condition.

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(traits_sex)
head(traits_sex)

# 3. Set height > 100 & eye_color == "black"
res <- table_filter(traits_sex, Sex == "Male" & Traits == "Weight" & Value > 40)
head(res)

Table merge used to merge multiple variables to on variable.

Description

Table merge used to merge multiple variables to on variable.

Usage

table_merge(
  data,
  merge_vars = c("biological_process", "cellular_component", "molecular_function"),
  new_var = "go_category",
  new_value = "go_term",
  na_remove = FALSE
)

Arguments

data

Dataframe: GO and KEGG annotation of background genes (1st-col: Genes, 2nd-col: biological_process, 3rd-col: cellular_component, 4th-col: molecular_function, 5th-col: kegg_pathway).

merge_vars

Vector: include merged variable (column) names. Default: c("Ozone", "Solar.R", "Wind", "Temp") in example data.

new_var

Character: new variable (column) name. Default: "Variable".

new_value

Character: new variable (column) value name. Default: "Value".

na_remove

Logical: remove NA value. Default: FALSE, options: TRUE, FALSE.

Value

Table: include multiple variables.

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(gene_go_kegg)
head(gene_go_kegg)

# 3. Default parameters
res <- table_merge(gene_go_kegg)
head(res)

# 4. Set new_var = "GO", new_value = "Terms"
res <- table_merge(gene_go_kegg, new_var = "GO", new_value = "Terms")
head(res)

Table split used for splitting a grouped column to multiple columns.

Description

Table split used for splitting a grouped column to multiple columns.

Usage

table_split(
  data,
  grouped_var = "go_category",
  value_var = "go_term",
  miss_drop = TRUE
)

Arguments

data

Dataframe: GO and KEGG annotation of background genes (1st-col: Genes, 2nd-col: biological_process, 3rd-col: cellular_component, 4th-col: molecular_function, 5th-col: kegg_pathway).

grouped_var

Character: grouped column name. Default: "go_category".

value_var

Character: value column name. Default: "go_term".

miss_drop

Logical: drop missing values or NA values. Default: TRUE, options: TRUE, FALSE.

Value

Table: table split used for splitting a grouped column to multiple columns.

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(gene_go_kegg2)
head(gene_go_kegg2)

# 3. Default parameters
res <- table_split(gene_go_kegg2)
head(res)

TOmicsVis shiny app start function.

Description

TOmicsVis shiny app start function.

Usage

tomicsvis()

Value

Shinyapp: TOmicsVis shiny app.

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

Length, Width, Weight, and Sex traits dataframe.

Description

Length, Width, Weight, and Sex traits dataframe.

Usage

data(traits_sex)

Format

Dataframe: Length, Width, Weight, and Sex traits dataframe (1st-col: Value, 2nd-col: Traits, 3rd-col: Sex).

Author(s)

benben-miao

References

https://github.com/BioSciTools/BioSciToolsDatasets/tree/main/BoxStat/

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Load example data
data(traits_sex)

# 3. View example data
traits_sex

Trend plot for visualizing gene expression trend profile in multiple traits.

Description

Trend plot for visualizing gene expression trend profile in multiple traits.

Usage

trend_plot(
  data,
  scale_method = "centerObs",
  miss_value = "exclude",
  line_alpha = 0.5,
  show_points = TRUE,
  show_boxplot = TRUE,
  num_column = 1,
  xlab = "Traits",
  ylab = "Genes Expression",
  sci_fill_color = "Sci_AAAS",
  sci_fill_alpha = 0.8,
  sci_color_alpha = 0.8,
  legend_pos = "right",
  legend_dir = "vertical",
  ggTheme = "theme_light"
)

Arguments

data

Dataframe: Shared degs of all paired comparisons in all groups expression dataframe of RNA-Seq. (1st-col: Genes, 2nd-col~n-1-col: Groups, n-col: Pathways).

scale_method

Character: data scale methods. Default: "globalminmax" (global min and max values), options: "std" (standard), "robust", "uniminmax" (unique min and max values), "globalminmax", "center", "centerObs" (center observes).

miss_value

Character: deal method for missing values. Default: "exclude", options: "exclude", "mean", "median", "min10", "random".

line_alpha

Numeric: lines color alpha. Default: 0.50, min: 0.00, max: 1.00.

show_points

Logical: show points at trait node. Default: TRUE, options: TRUE, FALSE.

show_boxplot

Logical: show boxplot at trait node. Default: TRUE, options: TRUE, FALSE.

num_column

Logical: column number. Default: 2, min: 1, max: null.

xlab

Character: x label. Default: "Traits".

ylab

Character: y label. Default: "Genes Expression".

sci_fill_color

Character: ggsci color pallet. Default: "Sci_AAAS", options: "Sci_AAAS", "Sci_NPG", "Sci_Simpsons", "Sci_JAMA", "Sci_GSEA", "Sci_Lancet", "Sci_Futurama", "Sci_JCO", "Sci_NEJM", "Sci_IGV", "Sci_UCSC", "Sci_D3", "Sci_Material".

sci_fill_alpha

Numeric: ggsci fill color alpha. Default: 0.50, min: 0.00, max: 1.00.

sci_color_alpha

Numeric: ggsci border color alpha. Default: 1.00, min: 0.00, max: 1.00.

legend_pos

Character: legend position. Default: "right", options: "none", "left", "right", "bottom", "top".

legend_dir

Character: legend direction. Default: "vertical", options: "horizontal", "vertical".

ggTheme

Character: ggplot2 themes. Default: "theme_light", options: "theme_default", "theme_bw", "theme_gray", "theme_light", "theme_linedraw", "theme_dark", "theme_minimal", "theme_classic", "theme_void"

Value

Plot: box plot support two levels and multiple groups with P value.

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(gene_expression3)
head(gene_expression3)

# 3. Default parameters
trend_plot(gene_expression3[1:50,])

# 4. Set line_alpha = 0.30
trend_plot(gene_expression3[1:50,], line_alpha = 0.30)

# 5. Set sci_fill_color = "Sci_NPG"
trend_plot(gene_expression3[1:50,], sci_fill_color = "Sci_NPG")

TSNE analysis for analyzing and visualizing TSNE algorithm.

Description

TSNE analysis for analyzing and visualizing TSNE algorithm.

Usage

tsne_analysis(sample_gene, group_sample, seed = 1, tsne_dims = 2)

Arguments

sample_gene

Dataframe: All genes in all samples expression dataframe of RNA-Seq (1st-col: Genes, 2nd-col~: Samples).

group_sample

Dataframe: Samples and groups for gene expression (1st-col: Samples, 2nd-col: Groups).

seed

Numeric: set seed for robust result. Default: 1.

tsne_dims

Numeric: TSNE dimensionality number. Default: 2.

Value

Table: TSNE analysis for analyzing and visualizing TSNE algorithm.

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(gene_expression)
head(gene_expression)

data(samples_groups)
head(samples_groups)

# 3. Default parameters
res <- tsne_analysis(gene_expression, samples_groups)
head(res)

# 4. Set tsne_dims = 3
res <- tsne_analysis(gene_expression, samples_groups, tsne_dims = 3)
head(res)

TSNE plot for analyzing and visualizing TSNE algorithm.

Description

TSNE plot for analyzing and visualizing TSNE algorithm.

Usage

tsne_plot(
  sample_gene,
  group_sample,
  seed = 1,
  multi_shape = FALSE,
  point_size = 5,
  point_alpha = 0.8,
  text_size = 5,
  text_alpha = 0.8,
  fill_alpha = 0.1,
  border_alpha = 0,
  sci_fill_color = "Sci_AAAS",
  legend_pos = "right",
  legend_dir = "vertical",
  ggTheme = "theme_light"
)

Arguments

sample_gene

Dataframe: All genes in all samples expression dataframe of RNA-Seq (1st-col: Genes, 2nd-col~: Samples).

group_sample

Dataframe: Samples and groups for gene expression (1st-col: Samples, 2nd-col: Groups).

seed

Numeric: set seed for robust result. Default: 1.

multi_shape

Logical: groups as shapes. Default: FALSE, options: TRUE, FALSE.

point_size

Numeric: point size. Default: 5, min: 0, max: null.

point_alpha

Numeric: point color alpha. Default: 0.80, min: 0.00, max: 1.00.

text_size

Numeric: text size. Default: 5, min: 0 (hind), max: null.

text_alpha

Numeric: text alpha. Default: 0.80, min: 0.00, max: 1.00.

fill_alpha

Numeric: ellipse alpha. Default: 0.30, min: 0.00, max: 1.00.

border_alpha

Numeric: ellipse border color alpha. Default: 0.10, min: 0.00, max: 1.00.

sci_fill_color

Character: ggsci color pallet. Default: "Sci_AAAS", options: "Sci_AAAS", "Sci_NPG", "Sci_Simpsons", "Sci_JAMA", "Sci_GSEA", "Sci_Lancet", "Sci_Futurama", "Sci_JCO", "Sci_NEJM", "Sci_IGV", "Sci_UCSC", "Sci_D3", "Sci_Material".

legend_pos

Character: legend position. Default: "right", options: "none", "left", "right", "bottom", "top".

legend_dir

Character: legend direction. Default: "vertical", options: "horizontal", "vertical".

ggTheme

Character: ggplot2 themes. Default: "theme_light", options: "theme_default", "theme_bw", "theme_gray", "theme_light", "theme_linedraw", "theme_dark", "theme_minimal", "theme_classic", "theme_void"

Value

Plot: TSNE plot for analyzing and visualizing TSNE algorithm.

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(gene_expression)
head(gene_expression)

data(samples_groups)
head(samples_groups)

# 3. Default parameters
tsne_plot(gene_expression, samples_groups)

# 4. Set sci_fill_color = "Sci_NPG", seed = 6
tsne_plot(gene_expression, samples_groups, sci_fill_color = "Sci_NPG", seed = 6)

# 5. Set multi_shape = TRUE, fill_alpha = 0.00
tsne_plot(gene_expression, samples_groups, multi_shape = TRUE, fill_alpha = 0.00)

UMAP analysis for analyzing RNA-Seq data.

Description

UMAP analysis for analyzing RNA-Seq data.

Usage

umap_analysis(sample_gene, group_sample, seed = 1, method = "naive")

Arguments

sample_gene

Dataframe: gene expression dataframe (1st-col: Transcripts or Genes, 2nd-col~: Samples).

group_sample

Dataframe: Samples and groups for gene expression (1st-col: Samples, 2nd-col: Groups).

seed

Numeric: set seed for robust result. Default: 1.

method

Character: 'naive' (an implementation written in pure R) and 'umap-learn' (requires python package 'umap-learn').

Value

Table: UMAP analysis for analyzing RNA-Seq data.

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(gene_expression)
head(gene_expression)

data(samples_groups)
head(samples_groups)

# 3. Default parameters
res <- umap_analysis(gene_expression, samples_groups)
head(res)

UMAP plot for analyzing and visualizing UMAP algorithm.

Description

UMAP plot for analyzing and visualizing UMAP algorithm.

Usage

umap_plot(
  sample_gene,
  group_sample,
  seed = 1,
  multi_shape = TRUE,
  point_size = 5,
  point_alpha = 1,
  text_size = 5,
  text_alpha = 0.8,
  fill_alpha = 0,
  border_alpha = 0,
  sci_fill_color = "Sci_AAAS",
  legend_pos = "right",
  legend_dir = "vertical",
  ggTheme = "theme_light"
)

Arguments

sample_gene

Dataframe: gene expression dataframe (1st-col: Transcripts or Genes, 2nd-col~: Samples).

group_sample

Dataframe: Samples and groups for gene expression (1st-col: Samples, 2nd-col: Groups).

seed

Numeric: set seed for robust result. Default: 1.

multi_shape

Logical: groups as shapes. Default: FALSE, options: TRUE, FALSE.

point_size

Numeric: point size. Default: 5, min: 0, max: null.

point_alpha

Numeric: point color alpha. Default: 0.80, min: 0.00, max: 1.00.

text_size

Numeric: text size. Default: 5, min: 0 (hind), max: null.

text_alpha

Numeric: text alpha. Default: 0.80, min: 0.00, max: 1.00.

fill_alpha

Numeric: ellipse alpha. Default: 0.30, min: 0.00, max: 1.00.

border_alpha

Numeric: ellipse border color alpha. Default: 0.10, min: 0.00, max: 1.00.

sci_fill_color

Character: ggsci color pallet. Default: "Sci_AAAS", options: "Sci_AAAS", "Sci_NPG", "Sci_Simpsons", "Sci_JAMA", "Sci_GSEA", "Sci_Lancet", "Sci_Futurama", "Sci_JCO", "Sci_NEJM", "Sci_IGV", "Sci_UCSC", "Sci_D3", "Sci_Material".

legend_pos

Character: legend position. Default: "right", options: "none", "left", "right", "bottom", "top".

legend_dir

Character: legend direction. Default: "vertical", options: "horizontal", "vertical".

ggTheme

Character: ggplot2 themes. Default: "theme_light", options: "theme_default", "theme_bw", "theme_gray", "theme_light", "theme_linedraw", "theme_dark", "theme_minimal", "theme_classic", "theme_void"

Value

Plot: UMAP plot for analyzing and visualizing UMAP algorithm.

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(gene_expression)
head(gene_expression)

data(samples_groups)
head(samples_groups)

# 3. Default parameters
umap_plot(gene_expression, samples_groups)

# 4. Set sci_fill_color = "Sci_Simpsons", seed = 6
umap_plot(gene_expression, samples_groups, sci_fill_color = "Sci_Simpsons", seed = 6)

# 5. Set fill_alpha = 0.10
umap_plot(gene_expression, samples_groups, fill_alpha = 0.10)

UpSet plot for stat common and unique gene among multiple sets.

Description

UpSet plot for stat common and unique gene among multiple sets.

Usage

upsetr_plot(
  data,
  sets_num = 4,
  keep_order = FALSE,
  order_by = "freq",
  decrease = TRUE,
  mainbar_color = "#006600",
  number_angle = 45,
  matrix_color = "#cc0000",
  point_size = 4.5,
  point_alpha = 0.5,
  line_size = 0.8,
  shade_color = "#cdcdcd",
  shade_alpha = 0.5,
  setsbar_color = "#000066",
  setsnum_size = 6,
  text_scale = 1.2
)

Arguments

data

Dataframe: Paired comparisons differentially expressed genes (degs) among groups (1st-col~: degs of paired comparisons).

sets_num

Numeric: sets number. Default: 4, min: 2, max: NULL.

keep_order

Logical: keep sets in the order entered using the sets parameter. Default: FALSE, options: TRUE, FALSE.

order_by

Character: intersections in the matrix should be ordered by. Default: "freq" (frequency), options: "freq", "degree", "both".

decrease

Logical: order by decrease. Default: TRUE, options: TRUE, FALSE.

mainbar_color

Charactor: mainbar color (color name or hex value). Default: "#006600".

number_angle

Numeric: number display angle. Default: 45, min: 0, max: 360.

matrix_color

Charactor: matrix point color (color name or hex value). Default: "#cc0000".

point_size

Numeric: point size. Default: 4.5, min: 0.0, max: NULL.

point_alpha

Numeric: point color alpha. Default: 0.50, min: 0.00, max: 1.00.

line_size

Numeric: connection line size. Default: 0.8, min: 0.00, max: NULL.

shade_color

Character: matrix shade color. Default: "#cdcdcd".

shade_alpha

Numeric: shade color alpha. Default: 0.50, min: 0.00, max: 1.00.

setsbar_color

Character: sets bar color. Default: "#000066".

setsnum_size

Numeric: sets bar number size. Default: 6.

text_scale

Numeric: all text scale. Default: 1.2, min: 0.01, max: NULL.

Value

Plot: UpSet plot for stat common and unique gene among multiple sets.

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(degs_lists)
head(degs_lists)

# 3. Default parameters
upsetr_plot(degs_lists)

# 4. Set keep_order = TRUE, order_by = "degree"
upsetr_plot(degs_lists, keep_order = TRUE, order_by = "degree")

# 5. Set mainbar_color = "#333333", number_angle = 0
upsetr_plot(degs_lists, mainbar_color = "#333333", number_angle = 0)

# 6. Set shade_color = "#ffcc00", setsbar_color = "#0000cc"
upsetr_plot(degs_lists, shade_color = "#ffcc00", setsbar_color = "#0000cc")

Venn plot for stat common and unique gene among multiple sets.

Description

Venn plot for stat common and unique gene among multiple sets.

Usage

venn_plot(
  data,
  title_size = 1,
  label_show = TRUE,
  label_size = 0.8,
  border_show = TRUE,
  line_type = "longdash",
  ellipse_shape = "circle",
  sci_fill_color = "Sci_AAAS",
  sci_fill_alpha = 0.65
)

Arguments

data

Dataframe: Paired comparisons differentially expressed genes (degs) among groups (1st-col~: degs of paired comparisons).

title_size

Numeric: sets title size. Default: 1, min: 0, max: NULL.

label_show

Logical: show intersection labels. Default: TRUE, options: TRUE, FALSE.

label_size

Numeric: intersection labels size. Default: 0.8, min: 0, max: NULL.

border_show

Logical: show border line. Default: TRUE, options: TRUE, FALSE.

line_type

Character: ellipse border line type. Default: "blank", options: "blank", "solid", "dashed", "dotted", "dotdash", "longdash", "twodash".

ellipse_shape

Character: ellipse shape. Default: "circle", options: "circle", "ellipse".

sci_fill_color

Character: ggsci color palette. Default: "Sci_AAAS", options: "Sci_AAAS", "Sci_NPG", "Sci_Simpsons", "Sci_JAMA", "Sci_GSEA", "Sci_Lancet", "Sci_Futurama", "Sci_JCO", "Sci_NEJM", "Sci_IGV", "Sci_UCSC", "Sci_D3", "Sci_Material".

sci_fill_alpha

Numeric: ggsci fill color alpha. Default: 0.65, min: 0.00, max: 1.00.

Value

Plot: venn plot for stat common and unique gene among multiple sets.

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(degs_lists)
head(degs_lists)

# 3. Default parameters
venn_plot(degs_lists)

# 4. Set line_type = "blank"
venn_plot(degs_lists, line_type = "blank")

# 5. Set ellipse_shape = "ellipse"
venn_plot(degs_lists, ellipse_shape = "ellipse")

# 6. Set sci_fill_color = "Sci_IGV"
venn_plot(degs_lists, sci_fill_color = "Sci_IGV")

Violin plot support two levels and multiple groups with P value.

Description

Violin plot support two levels and multiple groups with P value.

Usage

violin_plot(
  data,
  test_method = "t.test",
  test_label = "p.format",
  group_level = "Three_Column",
  violin_orientation = "vertical",
  add_element = "boxplot",
  element_alpha = 0.5,
  my_shape = "plus_times",
  sci_fill_color = "Sci_AAAS",
  sci_fill_alpha = 0.5,
  sci_color_alpha = 1,
  legend_pos = "right",
  legend_dir = "vertical",
  ggTheme = "theme_light"
)

Arguments

data

Dataframe: Length, Width, Weight, and Sex traits dataframe (1st-col: Value, 2nd-col: Traits, 3rd-col: Sex).

test_method

Character: test methods of P value. Default: "t.test", options: "wilcox.test", "t.test", "anova", "kruskal.test".

test_label

Character: test label of P value. Default: "p.format", options: "p.signif", "p.format". c(0, 0.0001, 0.001, 0.01, 0.05, 1).

group_level

Character: group levels. Default: "Three_Column", options: "Two_Column", "Three_Column".

violin_orientation

Character: violin orientation. Default: "vertical", options: "vertical", "horizontal", "reverse".

add_element

Character: add new plot. Default: "boxplot", options: "none", "dotplot", "jitter", "boxplot", "point", "mean", "mean_se", "mean_sd", "mean_ci", "mean_range", "median", "median_iqr", "median_hilow", "median_q1q3", "median_mad", "median_range".

element_alpha

Numeric: element color alpha. Default: 0.50, min: 0.00, max: 1.00.

my_shape

Character: box scatter shape. Default: "plus_times", options: "border_square", "border_circle", "border_triangle", "plus", "times", "border_diamond", "border_triangle_down", "square_times", "plus_times", "diamond_plus", "circle_plus", "di_triangle", "square_plus", "circle_times","square_triangle", "fill_square", "fill_circle", "fill_triangle", "fill_diamond", "large_circle", "small_circle", "fill_border_circle", "fill_border_square", "fill_border_diamond", "fill_border_triangle".

sci_fill_color

Character: ggsci color pallet. Default: "Sci_AAAS", options: "Sci_AAAS", "Sci_NPG", "Sci_Simpsons", "Sci_JAMA", "Sci_GSEA", "Sci_Lancet", "Sci_Futurama", "Sci_JCO", "Sci_NEJM", "Sci_IGV", "Sci_UCSC", "Sci_D3", "Sci_Material".

sci_fill_alpha

Numeric: ggsci fill color alpha. Default: 0.50, min: 0.00, max: 1.00.

sci_color_alpha

Numeric: ggsci border color alpha. Default: 1.00, min: 0.00, max: 1.00.

legend_pos

Character: legend position. Default: "right", options: "none", "left", "right", "bottom", "top".

legend_dir

Character: legend direction. Default: "vertical", options: "horizontal", "vertical".

ggTheme

Character: ggplot2 themes. Default: "theme_light", options: "theme_default", "theme_bw", "theme_gray", "theme_light", "theme_linedraw", "theme_dark", "theme_minimal", "theme_classic", "theme_void"

Value

Plot: violin plot support two levels and multiple groups with P value.

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(traits_sex)
head(traits_sex)

# 3. Default parameters
violin_plot(traits_sex)

# 4. Set test_label = "p.signif",
violin_plot(traits_sex, test_label = "p.signif")

# 5. Set violin_orientation = "horizontal"
violin_plot(traits_sex, violin_orientation = "horizontal")

# 6. Set group_level = "Two_Column"
violin_plot(traits_sex, group_level = "Two_Column")

# 7. Set add_element = "jitter"
violin_plot(traits_sex, add_element = "jitter")

Volcano plot for visualizing differentailly expressed genes.

Description

Volcano plot for visualizing differentailly expressed genes.

Usage

volcano_plot(
  data,
  title = "CT-vs-LT12",
  log2fc_cutoff = 1,
  pq_value = "pvalue",
  pq_cutoff = 0.05,
  cutoff_line = "longdash",
  point_shape = "large_circle",
  point_size = 2,
  point_alpha = 0.5,
  color_normal = "#888888",
  color_log2fc = "#008000",
  color_pvalue = "#0088ee",
  color_Log2fc_p = "#ff0000",
  label_size = 3,
  boxed_labels = FALSE,
  draw_connectors = FALSE,
  legend_pos = "right"
)

Arguments

data

Dataframe: differentially expressed genes (DEGs) stats (1st-col: Genes, 2nd-col: log2FoldChange, 3rd-col: Pvalue, 4th-col: FDR).

title

Character: title of plot. Default: CT-vs-LT12.

log2fc_cutoff

Numeric: log2(FoldChange) cutoff log2(2) = 1. Default: 1.0, min: 0.0, max: null.

pq_value

Character: select pvalue or qvalue. Default: "pvalue", options: "pvalue", "padj".

pq_cutoff

Numeric: pvalue or qvalue cutoff. Default: 0.005, min: 0.000, max: 1.000.

cutoff_line

Character: cutoff line type. Default: "longdash", options: "blank", "solid", "dashed", "dotted", "dotdash", "longdash", "twodash".

point_shape

Character: point shape. Default: "large_circle", options: "border_square", "border_circle", "border_triangle", "plus", "times", "border_diamond", "border_triangle_down", "square_times", "plus_times", "diamond_plus", "circle_plus", "di_triangle", "square_plus", "circle_times","square_triangle", "fill_square", "fill_circle", "fill_triangle", "fill_diamond", "large_circle", "small_circle", "fill_border_circle", "fill_border_square", "fill_border_diamond", "fill_border_triangle".

point_size

Numeric: point size. Default: 1.0, min: 0.0, max: null.

point_alpha

Numeric: point color alpha. Default: 0.50, min: 0.00, max: 1.00.

color_normal

Character: normal genes color (color name or hex value). Default: "#888888".

color_log2fc

Character: genes color that log2fc >= log2fc_cutoff. Default: "#008000".

color_pvalue

Character: genes color that pvalue > pq_cutoff. Default: "#0088ee".

color_Log2fc_p

Character: genes color that log2fc >= log2fc_cutoff and pvalue > pq_cutoff. Default: "#ff0000".

label_size

Numeric: DEG labels size. Default: 3.0, min: 0.0, max: null.

boxed_labels

Logical: add box to every DEG label. Default: FALSE.

draw_connectors

Logical: add connector between DEGs and labels. Default: FALSE.

legend_pos

Character: legend position. Default: "right", options: "right", "left", "top", "bottom".

Value

Plot: volcano plot for visualizing differentailly expressed genes.

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(degs_stats)
head(degs_stats)

# 3. Default parameters
volcano_plot(degs_stats)

# 4. Set color_Log2fc_p = "#ff8800"
volcano_plot(degs_stats, color_Log2fc_p = "#ff8800")

# 5. Set boxed_labels = TRUE
volcano_plot(degs_stats, boxed_labels = TRUE)

Weight and Sex traits dataframe.

Description

Weight and Sex traits dataframe.

Usage

data(weight_sex)

Format

Dataframe: Weight and Sex traits dataframe (1st-col: Weight, 2nd-col: Sex).

Author(s)

benben-miao

References

https://github.com/BioSciTools/BioSciToolsDatasets/tree/main/QuantileQuantile/

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Load example data
data(weight_sex)

# 3. View example data
weight_sex

WGCNA analysis pipeline for RNA-Seq.

Description

WGCNA analysis pipeline for RNA-Seq.

Usage

wgcna_pipeline(
  sample_gene,
  group_sample,
  R_cutofff = 0.85,
  max_block = 5000,
  min_module = 20,
  network_type = "unsigned",
  merge_cutoff = 0.15,
  cor_type = "pearson",
  na_color = "#cdcdcd",
  xlab_angle = 45,
  text_size = 0.7
)

Arguments

sample_gene

Dataframe: All genes in all samples expression dataframe of RNA-Seq (1st-col: Genes, 2nd-col~: Samples).

group_sample

Dataframe: Samples and groups for gene expression (1st-col: Samples, 2nd-col: Groups).

R_cutofff

Numeric: Rsquare cutoff. Default: 0.85, min: 0.00, max: 1.00.

max_block

Numeric: max block size. Default: 5000.

min_module

Numeric: min module gene number. Default: 20.

network_type

Character: network type. Default: "unsigned", options: "unsigned", "signed", "signed hybrid".

merge_cutoff

Numeric: merge modules cutoff. Default: 0.15.

cor_type

Character: correlation type. Default: "pearson", options: "pearson", "bicor".

na_color

Character: NA value color (color name or hex value). Default: "#cdcdcd".

xlab_angle

Numeric: X axis lable angle. Default: 45, min: 0, max: 360.

text_size

Numeric: cell text size. Default: 0.7, min: 0, max: NULL.

Value

WGCNA results in tempdir() directory of current session.

Author(s)

benben-miao

Examples

# 1. Library TOmicsVis package
library(TOmicsVis)

# 2. Use example dataset
data(gene_expression)
head(gene_expression)

data(samples_groups)
head(samples_groups)