Hot answers tagged

11 votes
Accepted

plotting two heatmaps with the same order of genes

ComplexHeatmap is built for plotting side-by-side heat maps with the same clustering - you use the + notation, similar to ggplot2. To use the same example data as @...
sjcockell's user avatar
  • 861
6 votes

plotting two heatmaps with the same order of genes

You expect that the order of genes is the same for both heatmaps, but the chance is small that the 4000 genes will exactly be clustered in the same order. What you can do, is use the order of genes (...
benn's user avatar
  • 3,571
6 votes

Is it possible to get such a plot

While it was easy to get your data after your edit, the data was not quite useful, the second data frame/matrix has 2 columns only! I had to create a fake data set, that looks like this: ...
haci's user avatar
  • 4,032
5 votes
Accepted

Changing the order of colors in pheatmap

It is possible with annotation_colors argument : First create a list with your conditions and then add the argument : ...
Basti's user avatar
  • 266
5 votes
Accepted

How can I plot multiple sequence alignment in R as a heatmap

@StupidWolf answered me on stackoverflow and he's answer solved my question. I will share it here as well. @StupidWolf: We read in the alignment: ...
rodrigarco's user avatar
4 votes
Accepted

Ordering average of gene expression in heat map

If you order your matrix/data.frame you can sort your columns by decreasing "Average", e.g. ...
jared_mamrot's user avatar
3 votes

Selecting a part of heatmap

You're using ComplexHeatmap, which is pretty easy to subset. Your subset operation creates a subset object of the heatmap, not of the data in the heatmap. In case you don't want to run hclust outside ...
Ram RS's user avatar
  • 2,279
3 votes
Accepted

In a RNA-Seq heatmap should you do Z-score standardisation before clustering the rows/columns or after?

Looking at the source for pheatmap, there is a function called scale_mat that is used to preprocess and normalize the input ...
Alex Reynolds's user avatar
3 votes
Accepted

How I can reproduce this heat map

In case it is still helpful as the post is rather old, the code below would generate a heatmap with annotations thanks to the ComplexHeatmap package. But before ...
haci's user avatar
  • 4,032
2 votes

plotting two heatmaps with the same order of genes

You have 2 options provided that both datasets have the same genes (rows): Keep the original order of rows in the heatmap. If they’re in the same order in the dataset then they will be in the heatmap....
Tom Kelly's user avatar
  • 873
2 votes
Accepted

How I normalize these two sets of data

There's no need to normalize them, you're not comparing them. Just use them as they are.
Devon Ryan's user avatar
  • 19.6k
2 votes
Accepted

How to visualise the proportion of clonal genes to sub clonal genes

I've used some dummy data for simplicity. It's fairly easy to do this with ggplot, but you have to format your matrix-like data for ggplot input. eg : ...
RoB's user avatar
  • 146
2 votes

Is there an "official" standard usage of Red and Green on differential gene expression heatmaps?

As others already pointed out, there is no official heatmap color scheme. I am not sure there is an official color scheme for any other types of plots either. However, heatmaps seem to be far more ...
burger's user avatar
  • 2,169
1 vote

heatmap of specific sequence motifs in aligned fasta files

Here's a solution based on Jesse's comment. The steps are: read in MSA with Biostrings::readAAStringSet() right-fill sequences so they are all the same length (...
acvill's user avatar
  • 613
1 vote

"Error in col2rgb(colors, alpha = TRUE) : invalid RGB specification" when running HeatmapAnnotation() (from ComplexHeatmap)

Looking at the documentation, it seems that HeatmapAnnotation expects a vector, whereas you are giving it a list. It is not clear on what acceptable color types are....
Maximilian Press's user avatar
1 vote

Heat map of protein expression from normalized abundance

The -2 to 2 should be the normalized version of log2 data (maybe mean or median normalization). This is commonly used in heatmaps to show downregulated value vs. upregulated value.
Pete Kittinun's user avatar
1 vote
Accepted

Constructing Two Triangle Heatmaps in One Square

This solution doesn't reproduce the plot, but it would do if the numerical ranges between the triangles do not overlap. ...
M__'s user avatar
  • 12.1k
1 vote

Avoiding the warning 'The following features were omitted as they were not found in the scale.data slot for the SCT assay' in Seurat

Specify your genes of interest using the features parameter of the ScaleData() function. If this parameter is not specified, ...
haci's user avatar
  • 4,032
1 vote
Accepted

Seurat heatmap for two conditions

See the DoHeatmap function in Seurat, which seems to be what that paper has used: https://satijalab.org/seurat/articles/pbmc3k_tutorial.html#cb50 ...
gringer's user avatar
  • 13.9k
1 vote

I want to display color key on my heatmap

I'm not sure exactly what was going on with your data, but I read it in as a raw data.frame using as.matrix(read.table(., row.names=1, header=T)). The issue was ...
user438383's user avatar
  • 1,679
1 vote
Accepted

Is there a way to customize what observations are plotted in ComplexHeatmap?

What is fed into ComplexHeatmap is what it outputs! So if one of your genes has a Missense_Mutation as well as a ...
haci's user avatar
  • 4,032
1 vote

Is there an "official" standard usage of Red and Green on differential gene expression heatmaps?

Although there is no standard as DeepTools' Devon Ryan said, there are still some habits. Usually red means upregulated, as you can see in the default color scheme in MATLAB's clustergram function. ...
Code42's user avatar
  • 282
1 vote

How to transform and sort the matrix to make a heatmap showing signatures?

You are almost there except for a few tricks: If you want columns to be ordered using the values in Cell 4, you will need to provide a custom column order either with the ...
haci's user avatar
  • 4,032
1 vote

DoHeatmap Hierarchical Clustering Seurat

You need to order the marker matrix (e.g. by avg_logFC) before calling DoHeatMap. ...
fra's user avatar
  • 567
1 vote
Accepted

Align legends to each heatmap in a ComplexHeatmap with 2 heatmaps

Turns out, this is not possible. Concatenating two heatmaps causes their legends to be grouped, and while they can be positioned together at the top, bottom, at the left or the right sides, they ...
Ram RS's user avatar
  • 2,279
1 vote

How do I add a colour annotation bar to the heatmap generated by DoHeatmap function of Seurat v2?

I am not sure if it's a v3 or also v2 thing, but have you tried by setting group.by and label? From ...
fra's user avatar
  • 567
1 vote
Accepted

Complexheatmap update issue

I see that you created the ColAnn variable with the Condition annotation but did not include it in the draw call (or even in the ...
Ram RS's user avatar
  • 2,279

Only top scored, non community-wiki answers of a minimum length are eligible