Question: RNAseq and heatmap
0
gravatar for Merlin
8 weeks ago by
Merlin 10
Vancouver
Merlin 10 wrote:

Hi guys,

When at the end of the analysis I export the results with this code:

write.csv(as.data.frame(resOrdered), 
          file="condition_treated_results.csv")

I have a file containing a list of genes with Log2FC and p-value. let say I have two conditions treated and untreated (6 and 2 ), are the values of gene expression of two replicates (untreated) normalized and compared with the values of the 6 replicates (treated) ? I mean are this taken as a single condition isn't it?

What if I have more conditions? let say 4 different conditions, to create that table 3 will be considered as a unique and one as reference condition?

Thank you

also, to make a heatmap where all the biological replicates cluster together I could take the top 1000 gene that are similar among replicates and different with the reference level but I don't know if that is right and/or DESeq2 can do that, what do you guys think?

Thanks

deseq2 rna-seq heatmap • 163 views
ADD COMMENTlink modified 8 weeks ago by Michael Love25k • written 8 weeks ago by Merlin 10
Answer: RNAseq and heatmap
2
gravatar for Michael Love
8 weeks ago by
Michael Love25k
United States
Michael Love25k wrote:

Take a look at the workflow which describes what shows up in the results table:

https://bioconductor.org/packages/rnaseqGene

To contrast multiple groups, you need to call results() multiple times using the contrast argument. See:

?results

For the last case, you can find these genes by performing a likelihood ratio test. If you have a dds with design ~condition, you can do:

dds <- DESeq(dds, test="LRT", reduced=~1)
res <- results(dds)
heatmap.genes <- head(order(res$padj), n)

where n is the number of genes for the heatmap.

ADD COMMENTlink written 8 weeks ago by Michael Love25k

Thank you, now the first part is clear enough,

For the heatmap,I tried this code as you say but I have this result,

pheatmap(heatmap.genes) Error in hclust(d, method = method) : must have n >= 2 objects to cluster

I think is missing the information of the samples name which in my previous command for heatmao was rld,

topGenes<- head(order(rowVars(assay(rld)), decreasing = TRUE),1000)

Can you tell me how to fix it?

I used this to show the heatmap

library("pheatmap") pheatmap(heatmap.genes)

thank you

ADD REPLYlink modified 8 weeks ago • written 8 weeks ago by Merlin 10

Looks like you’re having some issues going from the transformer data to the heatmap. I’d recommend go one step at a time and make sure you have what you are expecting at each step. Eg heatmap.genes is not data, it’s a set of numeric indices. You should get in the habit of looking at the various objects to see what they represent, using eg head() and dim(), etc.

ADD REPLYlink written 8 weeks ago by Michael Love25k
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 16.09
Traffic: 94 users visited in the last hour