Circos.heatmap not displaying zero values in R
1
0
Entering edit mode
2.1 years ago

I have a wide dataframe of a single row with a binary present absence dataset encoded in 1s and 0s:

dim(preMicroCazyme_wide)
[1]    1 1970

I am wanting to do this as i will layer several circos.heatmaps to show the presence absence in different systems. However the plots just come out all one colour and seemingly ignore the 0 values:

Each of the below have the same dimensions just different profiles of 1s and 0s.

    cols1 = colorRamp2(c(0, 1), c("white", "blue"))
    cols2 = colorRamp2(c(0, 1), c("white", "pink"))

    circos.heatmap(preMicroCazyme_wide, cols1 = cols, split = FALSE, cluster = FALSE)
    circos.heatmap(wide_termite_cazy, col = cols2, split = FALSE, cluster = FALSE)

    # Showing the output is not correct for some reason
    length(preMicroCazyme_wide[preMicroCazyme_wide == 0])
    [1] 281
    > length(wide_termite_cazy[wide_termite_cazy == 0])
    [1] 1289

Yet the resulting plot looks like this: circos output

This looks like the 0 values are either being ignored or coloured in regardless. Any idea how I can fix this?

Example data could look like this:

   df = t(data.frame(row1 = rep(c(0,1), 100,)))
visualisation R • 501 views
ADD COMMENT
1
Entering edit mode
2.1 years ago

I had the data frame wide when i needed it to be long t(my_df) solved the issue!

ADD COMMENT

Login before adding your answer.

Traffic: 2423 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