DESeq - Change PCA axis from PasillaGuide to PC3 and PC4
1
0
Entering edit mode
chqr • 0
@chqr-9892
Last seen 6.3 years ago

Hi all, I'm new to R and I'm currently going through the DESeq introduction guide by Anders and Huber entitled 'Di fferential expression of RNA-Seq data at the gene level.'

Simply, I have created a PCA plot using pasillaguide data:
print(plotPCA(vsdFull, intgroup=c("condition", "libType")))

My question is how do I produce a graph showing other eigenvectors like PC3 and PC4, ideally using DESeq and gplots.

All of my values and data correspond to the original guide so I'm hoping there is some simple code to use. Thanks in advance.

deseq pca pasilla • 2.8k views
ADD COMMENT
0
Entering edit mode
@federico-marini-6465
Last seen 17 hours ago
Germany

Hi keaan95,

you could inspect the code for the PCA plotting function with

getMethod("plotPCA","DESeqTransform")

The line that is interesting for you is the one containing this:

        d <- data.frame(PC1 = pca$x[, 1], PC2 = pca$x[, 2], group = group,
            intgroup.df, name = colnames(object))

If you replace 1 and 2 for the columns you select, and put 3 and 4, it should do the job.

 

 

ADD COMMENT
1
Entering edit mode

(minor comment that this requires you upgrade to DESeq2, which is recommended)

You can also modify the DESeq PCA function here:

https://github.com/Bioconductor-mirror/DESeq/blob/217e942dacf070673aea489fb0114f7bfecf0932/R/plotDispEsts.R#L40-L58

ADD REPLY

Login before adding your answer.

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