Entering edit mode
6.9 years ago
onemore100iq
▴
20
How to extract transformed counts from DESeqDataSet object as a matrix using assay?
How to extract transformed counts from DESeqDataSet object as a matrix using assay?
You should have a dds object that contains normalised counts and that was created and/or further manipulated by the DESeq
function.
To transform the normalised counts to regularised log expression levels:
rld <- rlog(dds, blind=FALSE)
To access the counts:
assay(rld)
You can feasibly save these in a new object:
matrixRLD <- assay(rld)
If you want the counts normalized for library size only, not log transformed:
counts(dds, normalized = TRUE)
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Thank you so much, sir it worked perfectly
Another 2 questions please,
after getting this matrixRLD, how to subset it so it includes a gene set that in table x in directory y? and if this table x has Enseml gene IDs and HGNC gene name how to get only HGNC gene names to be included in this new matrix?
Thanks in advance
Please, I need help with these 2 questions, I been trying for hours: after getting this matrixRLD, how to subset it so it includes a gene set that in table x in directory y? and if this table x has Enseml gene IDs and HGNC gene name how to get only HGNC gene names to be included in this new matrix?
Thanks in advance
Hi, I am not understanding your question, exactly.
If you want to convert Ensembl to HGNC, try this:
This will give you a data-frame of Ensembl-to-HGNC mappings, which you can then use to concert your gene names in matrixRLD.
Thank you so much, sir. I am just new to this field and sometimes getting confused between functions and arguments, and what should come next after this step, etc.... Anyway, thanks and highly appreciated your quick help. Thanks
Okay, no problem. Please create a new question if you have any more problems.
Best of luck, Kevin
Thanks. just one more question, How to do hierarchical clustering to cluster the transformed RNA-seq counts for a get gene set (x) and how to use sigclust2 on this transformed count matrix? Thank you so much in advance for helping a beginner, highly appreciated
I have posted a lot of clustering and heatmap generation:
I have never used sigclust2, however, it seems to d a very similar thing as pvclust, which bootstraps the dendrogram structure and derives probabilities on the branching. For a quick idea on how to run pvclust, take a look here: A: how to make bootstrapped tree in PVCLUST package with SNP genotyping data?