Heatmap2 missing some genes
1
0
Entering edit mode
4.1 years ago

Hi everyone, this is maybe a very short question.

I have a table like this (each letter is a gene)

A
B
C
D
E
F
G
H
I
J
K

After that, I want to generate a Heatmap, with this script

head(highly_variable_lcpm)
heatmap.2(as.matrix(highly_variable_lcpm),
          col=color1,
          trace="none", 
          main="Top 100 de genes con mayor variabilidad",
          #ColSideColors=col.cell,
          density.info="none",
          Colv="NA",
      Rowv=FALSE, 
          scale="row")

This script shows me a nice Heatmap, but the problem is that only shows me B, D, F, H, J genes.

The question is, is there any parameter that I can add or modify to tell the script that shows me all genes? I tried to generate the table with less genes, but is the same. If I generate a table with 100 genes, the heatmap shows me 50 genes (one yes, one no, one yes, one no, etc) , if I generate a table with 50 genes it shows me 25...and then...

Would you please help me? thank you in advance!

heatmap RNA-seq • 2.7k views
ADD COMMENT
1
Entering edit mode

So it only shows half of the labels?

ADD REPLY
2
Entering edit mode
4.1 years ago

It looks like every other label is not displayed. This is usually because there's not enough space to display all of them. One option is to reduce the font size of the labels using parameters like cexRow and cexCol, another option is to make the image bigger using the lmat, lwid and lhei parameters. Check the docs.

You may find this previous post listing various tutorials on heatmaps in R useful.

ADD COMMENT
0
Entering edit mode

thank you! it was the problem, cexRox and cexCol were the solution, there was not enough space to display all genes thank you!

ADD REPLY
0
Entering edit mode

If an answer was helpful, you should upvote it; if the answer resolved your question, you should mark it as accepted. You can accept more than one answer if they work.

Upvote|Bookmark|Accept

ADD REPLY

Login before adding your answer.

Traffic: 2538 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6