It is quite easy to do within R, and not to have to go through the laborious route of exporting your data to Excel and then importing it to some silly online heatmap tool.
You should research how to perform data-frame subsetting in R. Your data is probably an ExpressionSet object, but it is still easy.
Here is a completely reproducible example:
1, Download some already-normalised sample data
gset <- getGEO("GSE1460", GSEMatrix =TRUE, getGPL=FALSE)[]
ExpressionSet (storageMode: lockedEnvironment)
assayData: 22283 features, 15 samples
element names: exprs
sampleNames: GSM24511 GSM24609 ... GSM24622 (15 total)
varLabels: title geo_accession ... data_row_count (32 total)
experimentData: use 'experimentData(object)'
2, randomly select 50 probes and pretend that they are the statistically significant ones
sigprobes <- sample(rownames(gset), 50)
With limma output from
topTable(), you can filter your object easily like this (where results_table contains the output of
results_table_filt <- subset(results_table, abs(logFC) > 2 & adj.P.Val <= 0.05)
...then just take the rownames of
results_table_filt (or the first column, whichever has the names), and then use these to subset your expression matrix as I do in part 4 (below). Using this
subset() command, I am filtering based on absolute log (base 2) fold-change > 2, and adjusted p-value <= 0.05.
3, transform our expression data by scaling row-wise
heat <- t(scale(t(exprs(gset))))
4, subset our data with the statistically significant probes
heat <- heat[sigprobes,]
This works here because the rownames of heat are probe names
5, generate simple heatmap
Please look up other heatmap functions, such as
Heatmap() (from ComplexHeatmap). There are many tutorials and posts on the Web, including on Biostars.