You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working with create.heatmap and encountering odd behavior when dealing with NA values and single-row heatmaps.
The weirdest thing is that the NA missing values seem to be contaminating adjacent cells in certain cases.
I will have to resort to manually replacing NA with a pre-defined color as opposed to using the fill.colour option, which is kind of a waste of a nice feature.
For example:
real.continuous.test.data <- t(data.frame(
continuous.data = c(NA, '#3FDADC', '#BFF2F3', '#1FD4D6', NA,'#7FE6E8', '#5FE0E2', '#DFF8F9', '#FFFFFF', '#9FECED')
));
categorical.test.data <- t(data.frame(
categorical.data = c(NA, 'red', 'blue', 'red', NA, 'green', 'yellow', 'purple', 'orange', 'pink')
));
# Ex1 Second column inherits NA from first column but the other NA is handled fine?
create.heatmap(
x = real.continuous.test.data,
input.colours = TRUE,
clustering.method = 'none',
same.as.matrix = TRUE,
print.colour.key = FALSE
);
# Ex2 Both second and fourth columns inherit NA from first and fifth column?
create.heatmap(
x = categorical.test.data,
input.colours = TRUE,
clustering.method = 'none',
same.as.matrix = TRUE,
print.colour.key = FALSE
)
# Ex3 Two rows, now the categorical data looks correct but continuous data remains contaminated
create.heatmap(
x = rbind(categorical.test.data, real.continuous.test.data),
input.colours = TRUE,
clustering.method = 'none',
same.as.matrix = TRUE,
print.colour.key = FALSE
)
Ex1:
Ex2:
Ex3:
The text was updated successfully, but these errors were encountered:
@alkaZeltser I didn't see your issue, but I posted a similar issue recently with a potential solution #181
Yeah I guess I already mentioned this workaround above, which is to replace NAs explicitly with colors. It's just unfortunate because the entire point of the fill.colour parameter is to generalize away this extra step.
I'm working with
create.heatmap
and encountering odd behavior when dealing with NA values and single-row heatmaps.The weirdest thing is that the NA missing values seem to be contaminating adjacent cells in certain cases.
I will have to resort to manually replacing NA with a pre-defined color as opposed to using the
fill.colour
option, which is kind of a waste of a nice feature.For example:
Ex1:
![Screenshot 2024-04-06 at 12 50 11 AM](https://private-user-images.githubusercontent.com/30507223/320190905-a2dc9447-01c5-4cb0-9be8-0668215ff48c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUwMTY4MDYsIm5iZiI6MTcyNTAxNjUwNiwicGF0aCI6Ii8zMDUwNzIyMy8zMjAxOTA5MDUtYTJkYzk0NDctMDFjNS00Y2IwLTliZTgtMDY2ODIxNWZmNDhjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMwVDExMTUwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWE1NzFjZTc2MDEwNWVmNTBmYzE2OWNkNTI3MjY4YWNkYzViZjc0ZjQ1M2ViMGVlNzY0MzM5MGVlMGZmZTQzMjUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.1AAx2GhJHdh8UGIp87_ISSZtjsu4FTavBU2PqpplOyQ)
Ex2:
![Screenshot 2024-04-06 at 12 51 04 AM](https://private-user-images.githubusercontent.com/30507223/320190943-d94e7136-0ec2-45fa-b7ef-e1e70f3702c6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUwMTY4MDYsIm5iZiI6MTcyNTAxNjUwNiwicGF0aCI6Ii8zMDUwNzIyMy8zMjAxOTA5NDMtZDk0ZTcxMzYtMGVjMi00NWZhLWI3ZWYtZTFlNzBmMzcwMmM2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMwVDExMTUwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI3MDJhM2YyZGMxOWU3MTI4OWQxOWNjY2NhYzVkZWY4YTA2ZTE0ODdkYTNhM2Y3ZGJmM2FkYzQzMWI1OTI0MGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ikTqNVfPvwSr6kXZcECjN7G3AuY_9mc-XV0xMHqGkOA)
Ex3:
![Screenshot 2024-04-06 at 12 51 52 AM](https://private-user-images.githubusercontent.com/30507223/320190973-ada0c1d0-4344-4867-b307-af5fb8f2f6e2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUwMTY4MDYsIm5iZiI6MTcyNTAxNjUwNiwicGF0aCI6Ii8zMDUwNzIyMy8zMjAxOTA5NzMtYWRhMGMxZDAtNDM0NC00ODY3LWIzMDctYWY1ZmI4ZjJmNmUyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMwVDExMTUwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ5ZjBiMWIyYzlmZGIwZTBkYmQwNmQ3MWU3ZGU1YWM3ODlkOTYxMWM4YjcwNDdhNzBkNGUwMTlmMzlkYWRhOWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.0IiaQtY73uPCYgkLthD8USJh5BbCFaDB3UMsTgaXzms)
The text was updated successfully, but these errors were encountered: