Search
Question: rlog, lfcShrink and vst on gene subset
0
gravatar for giulia.pasquesi
11 days ago by
giulia.pasquesi0 wrote:

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

ADD COMMENTlink modified 7 days ago by Michael Love18k • written 11 days ago by giulia.pasquesi0

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

ADD REPLYlink written 9 days ago by Wolfgang Huber13k
0
gravatar for Michael Love
7 days ago by
Michael Love18k
United States
Michael Love18k wrote:

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 COMMENTlink written 7 days ago by Michael Love18k

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 REPLYlink written 7 days ago by giulia.pasquesi0
1

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 REPLYlink modified 7 days ago • written 7 days ago by Michael Love18k

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

 

ADD REPLYlink written 6 days ago by giulia.pasquesi0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 373 users visited in the last hour