Question: RNA-seq, R, DESeq2,
0
gravatar for onemore100iq
4 months ago by
onemore100iq0 wrote:

How to extract transformed counts from DESeqDataSet object as a matrix using assay?

rna-seq • 324 views
ADD COMMENTlink modified 4 months ago by swbarnes23.4k • written 4 months ago by onemore100iq0
3
gravatar for Kevin Blighe
4 months ago by
Kevin Blighe17k
University College London Cancer Institute
Kevin Blighe17k wrote:

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 counts:

rld <- rlog(dds, blind=FALSE)

To access the counts:

assay(rld)

You can feasibly save these in a new object:

matrixRLD <- assay(rld)
ADD COMMENTlink modified 4 months ago • written 4 months ago by Kevin Blighe17k

Thank you so much, sir it worked perfectly

ADD REPLYlink written 4 months ago by onemore100iq0

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

ADD REPLYlink written 4 months ago by onemore100iq0

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

ADD REPLYlink written 4 months ago by onemore100iq0

Hi, I am not understanding your question, exactly.

If you want to convert Ensembl to HGNC, try this:

require(biomaRt)
mart <- useMart("ENSEMBL_MART_ENSEMBL")
mart <- useDataset("hsapiens_gene_ensembl", mart)
annots <- getBM(mart=mart, attributes=c("ensembl_gene_id", "hgnc_symbol"), filter="ensembl_gene_id", values=rownames(matrixRLD), uniqueRows=TRUE)

This will give you a data-frame of Ensembl-to-HGNC mappings, which you can then use to concert your gene names in matrixRLD.

ADD REPLYlink modified 4 months ago • written 4 months ago by Kevin Blighe17k

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

ADD REPLYlink written 4 months ago by onemore100iq0

Okay, no problem. Please create a new question if you have any more problems.

Best of luck, Kevin

ADD REPLYlink written 4 months ago by Kevin Blighe17k

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

ADD REPLYlink written 4 months ago by onemore100iq0

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?

ADD REPLYlink written 4 months ago by Kevin Blighe17k
0
gravatar for swbarnes2
4 months ago by
swbarnes23.4k
United States
swbarnes23.4k wrote:

If you want the counts normalized for library size only, not log transformed:

counts(dds, normalized = TRUE)
ADD COMMENTlink written 4 months ago by swbarnes23.4k
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.3.0
Traffic: 1153 users visited in the last hour