How to plot PCA for DEGs
2
0
Entering edit mode
11 days ago
otieno43 ▴ 40

Hey guys,

I have a list of deferentially expressed genes (DEGs) (dSeq2 generated) with normalized counts (for each replicate in each experimental condition), fold change, pvalue and padj. I want to do a PCA plot on R. Any simple script to do this please will help. Thanks.

DEG for PCA_plot • 358 views
ADD COMMENT
1
Entering edit mode
11 days ago

You can use the functions in the factoextra R package to make a PCA plot. Notably, the fviz_PCA_ind() function should do the trick. But just to double-check: are you sure you want to do a PCA on the DEGs? If you only input genes that you already know to be differentially expressed, then there's every reason to believe that the PCA will simply show clustering based on what-ever variable you used as the predictor in the differential gene expression analysis. So you wouldn't really learn very much from this PCA. I can imagine situations where this analysis could make sense so maybe this is what you want to do, I just figured I'd point this out just in case... Typically, we would want to choose the genes for the PCA in an unbiased manner (e.g. picking the 500 most variable genes), so as to get an unbiased view of the major drivers of gene expression variability in the data set.

ADD COMMENT
0
Entering edit mode

Thanks for the swift response and advise. I have already done PCA before DEG.

ADD REPLY
0
Entering edit mode
10 days ago
san96 ▴ 170

In this workflow there is a good information about it: https://bioconductor.org/packages/release/workflows/vignettes/rnaseqGene/inst/doc/rnaseqGene.html#pca-plot

The other option is to put a bit of your script to help you.

ADD COMMENT

Login before adding your answer.

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