Search
Question: plot Heatmap after the use of "Interaction" within DESeq2
0
gravatar for JunLVI
6 months ago by
JunLVI40
Japan
JunLVI40 wrote:

 

The structure of my dataset is 4 cell lines of 2 genotype with biological duplicates (4*2*2 samples), the purpose of the analysis to assess the effect of different genotypes (KO vs WT) on the gene expression in 4 cell lines) 

I used "Interation" in order to test for differences in KO effects:

dds$group <- factor(paste0(dds$compartment, dds$genotype))
design(dds) <- ~ group
dds <- DESeq(dds)
resultsNames(dds)
results(dds, contrast=c("group", "CelltypeA_WT", "CelltypeB_cKO"))

as showed above, I could easily get the result as well as report the result as ".csv" files. 

but is there easy way to plot heatmap of the results above? 

something like: 

library("genefilter")
topVarGenes <- head(order(rowVars(assay(rld)),decreasing=TRUE),40)
mat <- assay(rld)[ topVarGenes, ]
mat <- mat - rowMeans(mat)
df <- as.data.frame(colData(rld)[,c("genotype","compartment")])
pheatmap(mat, annotation_col=df,fontsize=9,fontsize_number = 0.4 * fontsize)

TKS!

 

ADD COMMENTlink modified 6 months ago by Michael Love13k • written 6 months ago by JunLVI40
0
gravatar for Michael Love
6 months ago by
Michael Love13k
United States
Michael Love13k wrote:

If you want to plot specific genes in a heatmap, don't use the topVarGenes to filter the mat. You can index the mat by the name or names of your specific genes:

mat <- assay(rld)
mat <- mat - rowMeans(mat)
mat <- mat[ your.specific.genes, ]
ADD COMMENTlink written 6 months ago by Michael Love13k
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: 187 users visited in the last hour