Entering edit mode
15 months ago
Hamza
▴
10
I receive the following error from pheatmap:
pheatmap(my_matrix,annotation_col = my_metadata)
Error in cut.default(a, breaks = 100) : 'x' must be numeric
However, my matrix is already numeric
apply(my_matrix,2,is.numeric)
GCBGE0767G POHRZ1835F ZCBZP7326X HHMJY1357N IMTWE9463H DJPSO3322R REXYQ6498S OFCFL1180G KTGMI0703N AQDZN3914I IBKRI1023I HGIIC0255O PEUMK2767Q
TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
IZTMF7642U MXKMR5399Y BLBGG0808F PGHVS1628Y DTOJM9017I FOTAV7788Y IDWVU4461M YBECA7334K EGTWK7592T EVDMU2971O LIDGN5172P YKFAX1349I YLOXV4155S
TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
PBUNH9938W CCAUS4102V MGELH2280E BCZST1456Y ZLYRP8159V UKXJB6887Z YANQL8585B WUMUL4815C WTXQA4810I WOKDQ1603L YLNGA5107D WJRIA0010K ACNVG9218A
TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
AUGTB9564V FVQNA3298H UGBZX9149O VHPPI3077E KQKYD2822Z UERHW1594Z VKXDZ2923H BBKEX8083N UAHTX3652M HQVUP0102D GHKCR0738E XLHDC1857Z FKLBX7676A
TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
SZHNM3174B
TRUE
So I don't understand the issue. Can anyone take a guess?
class(my_matrix)
[1] "matrix, array"
My matrix looks like this
GCBGE0767G POHRZ1835F ZCBZP7326X HHMJY1357N IMTWE9463H DJPSO3322R REXYQ6498S OFCFL1180G KTGMI0703N AQDZN3914I IBKRI1023I
A2M 13.328123 14.177430 13.215992 14.259884 14.106684 12.668580 13.841886 14.203813 14.041668 13.496955 12.869849
A2ML1 8.939902 8.550417 8.309676 6.091018 11.837218 11.466685 8.694179 9.014055 9.832503 5.828606 5.597503
A4GALT 10.405861 10.703880 10.477482 10.346346 8.780233 8.854969 8.925953 9.471257 10.937927 8.338915 7.453108
AAAS 11.397697 11.037208 10.840574 10.505638 10.943570 11.186013 10.936939 10.780347 10.988737 11.139503 11.102039
AACS 9.967724 10.075644 9.361871 8.563242 9.334040 9.299174 9.835727 9.999253 9.319627 10.168981 10.529605
AADAC 4.128528 5.384454 4.128528 6.730545 4.438229 4.476618 5.956244 5.617084 5.249543 7.579926 4.128528
Please try
as.matrix(my_matrix)
ordata.matrix(my_matrix)
. Also, please ensure that the colnames ofmy_matrix
are the same as the rownames ofmy_metadata