How to draw boxplot for hub genes
0
0
Entering edit mode
20 months ago
wes ▴ 90

May I know what is the information needed in order to draw boxplot for hub genes as shown in this article- Identification of Hub Genes and Key Pathways Associated With Bipolar Disorder Based on Weighted Gene Co-expression Network Analysis. Example of boxplot of hub genes.

Currently I have fruit RNA-Seq data at 3 development stage. Is TPM data sufficient to draw the boxplot of hub genes? How to draw the boxplot with TPM data only?

hub gene • 1.0k views
ADD COMMENT
1
Entering edit mode

You can use ggplot2 package in R like the figure you provided. You can find examples like these on google: http://www.sthda.com/english/wiki/ggplot2-facet-split-a-plot-into-a-matrix-of-panels

ADD REPLY
1
Entering edit mode

Hi wes,

Yes, basically the TPM information and gene names are enough to produce similar boxplots. TPM is already a normalized method so you don't need to log transform the expression. For the plots, you just need to load the expression matrix and select the hub genes and then plot. You can use the ggplot2 package as suggested by barslmn to make more beautiful plots as well.

The code should be something similar to this:

Load the TPM expression data

tpm_data <- read.table("tpm_data.txt", header=TRUE, row.names=1)

Select the hub gene(s) you want to plot

hub_gene <- "MYB"

Subset the TPM data to include only the hub gene

hub_gene_data <- tpm_data[hub_gene, ]

Transpose the data to create a matrix of samples by genes

hub_gene_data <- t(hub_gene_data)

Create a boxplot of the hub gene expression across the three developmental stages

boxplot(hub_gene_data, main=paste0("Expression of ", hub_gene, " across developmental stages"), 
        ylab="TPM", xlab="Developmental stage")
ADD REPLY

Login before adding your answer.

Traffic: 2009 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6