rlog, lfcShrink and vst on gene subset
1
1
Entering edit mode
@giuliapasquesi-15143
Last seen 6.5 years ago

I am analyzing a dataset that includes both gene and transposable element raw counts. 
I am only interested in analyzing the differential expression of TEs, but still need to create and normalize the entire dataset. For the DE analysis itself it is not a major problem, because I can retrieve the results and filter out the genes. However, I was interested in plotting the variance-stabilized transformation of the data (or the rlog) and the PCA for the TEs only, ignoring the genes.
Is there a way to do this directly in DeSeq2?
I was thinking of providing an additional feature data column specifying "gene" or "TE", but then I don't know if it  is possible post-normalization to use only the "TE" subset to make transformations and lfcShrink.

Thank you so much 

Giulia

deseq2 subsetting plot • 2.0k views
ADD COMMENT
0
Entering edit mode

Have you tried simply row-subsetting the DESeqDataSet before calling the model fitting functions?

ADD REPLY
0
Entering edit mode
@mikelove
Last seen 1 day ago
United States

If you want to plot for example, the PCA for just some samples, you can provide a subsetted DESeqTransform object to plotPCA:

plotPCA(vsd[idx,])
ADD COMMENT
0
Entering edit mode

I did't know about the [idx] flag but isn't it gonna specify the samples I want to include? I would like to plot the variances for only a subset of genes (therefore by rows and not by column in a matrix. Provided the normalization was based on all genes, otherwise the library size would be incorrect and bring to a weird normalization) for all samples.

I apologize if I wasn't clear the first time.

 

ADD REPLY
1
Entering edit mode

The way indexing works in R is, if you use [ ... , ... ], the first element indexes rows (here, genes) and the second element indexes columns (samples). If you leave out an element, it provides all. So [idx,] gives a subset of the rows and all of the columns.

See here:

http://bioconductor.org/packages/release/bioc/vignettes/SummarizedExperiment/inst/doc/SummarizedExperiment.html#anatomy-of-a-summarizedexperiment

ADD REPLY
0
Entering edit mode

Thank you so much for the clarification. 
It is exactly what I was looking for!

 

ADD REPLY

Login before adding your answer.

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