Visualization of RNA-seq gene expression only one gene of interest between 2 conditions
1
0
Entering edit mode
13 months ago
Chris ▴ 340

Hi Biostars,

I looked for kind of plot use log2FC to visualize gene expression of only one gene but could not find out. Would you please have a suggestion? Simply as bar plot for gene expression to know gene A express higher in sample 1 vs sample 2. Volcano plot or heat map show all the gene. Even though I can label one gene in those plots but the biologist only want to focus on genes of interest. Thank you so much!

RNA-seq • 2.2k views
ADD COMMENT
1
Entering edit mode

Why not use barplots like you mention for a single gene and heatmaps or grouped barplots for multiple genes? RNA-seq yields relative metrics and cannot strictly be compared between samples using any of the RPKM/FPKM/TPM measures but it doesn't stop people from comparing anyway. I think if the samples were sequenced at comparable library depths, upper-quartile normalize the raw counts, scale per-gene and compare Z-scores.

ADD REPLY
0
Entering edit mode

Because I don't find out code or tutorial doing that in RNA-seq analysis. Most of them use heatmap or volcano plot.

ADD REPLY
1
Entering edit mode

DESeq has a simple built-in function to plot a single gene:

https://www.rdocumentation.org/packages/DESeq2/versions/1.12.3/topics/plotCounts

ADD REPLY
0
Entering edit mode

Thank you! Is there any way we could add color to the dot to distinguish between conditions or adjust the size of the dot? This one has color but I am not sure how to get it. https://r.acidgenomics.com/packages/deseqanalysis/reference/plotCounts.html

ADD REPLY
0
Entering edit mode

Yes, you can do anything in ggplot. But this is a super simple, don't have to learn anything about plotting solution.

ADD REPLY
0
Entering edit mode

It's a vector of numbers and a bar plot. Don't overthink it :-)

ADD REPLY
2
Entering edit mode
13 months ago

you can also get the normalized counts as a dataframe from DESeq2 and then work with it using ggplot2 (use geom_boxplot and geom_point). you can make a figure like this one.

norm_counts <-(counts(se_star2, normalized = TRUE)+1)

norm_counts.df <- as.data.frame(norm_counts)

enter image description here

ADD COMMENT
0
Entering edit mode

Is this generated from multiple replicates of each T[1-6] sample? Or are T[1-6] different conditions? I think OP has a single data point per sample, which is why a bar plot is relevant.

ADD REPLY
0
Entering edit mode

Thank you! The plot looks nice. Would you share the code with geom_boxplot and geom_point? I have 2 data points for a sample.

ADD REPLY
2
Entering edit mode

T1 to T6 are different conditions for 8 samples. if you have much simpler data, then you can do as @Ram suggested with barplot.

however, the code is given below. I am still learning R, so my codes are quite rudimentary. But you should be able to achieve your figures with ggplot and even create a loop for several genes.

norm_counts <-(counts(se_star2, normalized = TRUE)+1)

norm_counts.df <- as.data.frame(norm_counts)

df <- data.frame(t(norm_counts.df), check.names = FALSE)

df$timepoints <- c("T1", "T2", "T3", "T4", "T5", "T6")

ggplot(df, aes(x=timepoints, y= `ITGA4`, fill=timepoints))+
                 geom_boxplot(color="black", width=0.3)+ 
                 geom_point(size=2.5) +theme_classic() +
                 theme(plot.margin = margin(10,150, 10, 150))+
                 theme(legend.position="none")+
                 labs(y = "normalized counts", x = "ITGA4", face = "bold")+
                 theme(axis.text = element_text(size = 30, color = "black"))+
                 theme(axis.title = element_text(size = 40, face = "bold"))+
                 theme(panel.border = element_rect(color = "black",fill = NA, linewidth = 0.5))
ADD REPLY

Login before adding your answer.

Traffic: 1504 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