文/伍鴻榮 要做熱圖,首先我們是要準(zhǔn)備好數(shù)據(jù),比如說TCGA的rna-seq,或者你自個(gè)測(cè)有的數(shù)據(jù)。然后可能利用deseq 包進(jìn)行差異分析。比如說作者提出的用阿扎胞苷對(duì)AML3細(xì)胞影響的基因表達(dá)譜數(shù)據(jù)。 數(shù)據(jù)篩選:在熱圖上繪制所有5704個(gè)FDR調(diào)整p值<>
以下是我將在以下R腳本代碼: #read in the count matrix mx<-read.table('aza_aml3_countmatrix.xls', row.names="1" ,="" header="">-read.table('aza_aml3_countmatrix.xls',> #read in the DESeq DGE spreadsheet dge<-read.table('deb_deseq.xls', row.names="1" ,="" header="">-read.table('deb_deseq.xls',> #merge the counts onto the DGE spreadsheet mg<> #sort the merged table by p-value smg<-mg[order(mg$pval),>-mg[order(mg$pval),> #select only the columns containing the gene names and count data x<-subset(smg, select="c('Row.names'," 'untr1',="" 'untr2',="" 'untr3',="" 'aza1',="" 'aza2',="">-subset(smg,> #make the table a data frame with gene names then remove duplicate gene name column y<-(as.data.frame(x, row.names="">-(as.data.frame(x,> x<-subset(y,>-subset(y,> #scale rows xt<> xts<> xtst<> #only grab top 100 by p-value h<-head(xtst, n="">-head(xtst,> #set layout options - adjust if labels get cut off pdf('heatmap.pdf',width=7, height=8) #draw heatmap allowing larger margins and adjusting row label font size heatmap(h, margins = c(4,10), cexRow=.4) #output plot to file dev.off() 正如您所看到的,熱圖顯示了這100個(gè)最顯著差異基因的嚴(yán)重表達(dá)變化。還要注意,前100名中的大多數(shù)基因是下調(diào)的。 |
|