{"action":"created","issue":{"url":"https://api.github.com/repos/AlexsLemonade/refinebio/issues/716","repository_url":"https://api.github.com/repos/AlexsLemonade/refinebio","labels_url":"https://api.github.com/repos/AlexsLemonade/refinebio/issues/716/labels{/name}","comments_url":"https://api.github.com/repos/AlexsLemonade/refinebio/issues/716/comments","events_url":"https://api.github.com/repos/AlexsLemonade/refinebio/issues/716/events","html_url":"https://github.com/AlexsLemonade/refinebio/issues/716","id":367880347,"node_id":"MDU6SXNzdWUzNjc4ODAzNDc=","number":716,"title":"Include PNG of heatmap with each gene expression matrix","user":{"login":"jaclyn-taroni","id":19534205,"node_id":"MDQ6VXNlcjE5NTM0MjA1","avatar_url":"https://avatars0.githubusercontent.com/u/19534205?v=4","gravatar_id":"","url":"https://api.github.com/users/jaclyn-taroni","html_url":"https://github.com/jaclyn-taroni","followers_url":"https://api.github.com/users/jaclyn-taroni/followers","following_url":"https://api.github.com/users/jaclyn-taroni/following{/other_user}","gists_url":"https://api.github.com/users/jaclyn-taroni/gists{/gist_id}","starred_url":"https://api.github.com/users/jaclyn-taroni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaclyn-taroni/subscriptions","organizations_url":"https://api.github.com/users/jaclyn-taroni/orgs","repos_url":"https://api.github.com/users/jaclyn-taroni/repos","events_url":"https://api.github.com/users/jaclyn-taroni/events{/privacy}","received_events_url":"https://api.github.com/users/jaclyn-taroni/received_events","type":"User","site_admin":false},"labels":[{"id":805477791,"node_id":"MDU6TGFiZWw4MDU0Nzc3OTE=","url":"https://api.github.com/repos/AlexsLemonade/refinebio/labels/backlog","name":"backlog","color":"ededed","default":false},{"id":873907685,"node_id":"MDU6TGFiZWw4NzM5MDc2ODU=","url":"https://api.github.com/repos/AlexsLemonade/refinebio/labels/smasher","name":"smasher","color":"16e20b","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-08T17:12:36Z","updated_at":"2018-10-08T17:13:27Z","closed_at":null,"author_association":"MEMBER","body":"### Context\r\n\r\nGetting a high level view of the data values and structure as part of the download came up in tech team meeting, specifically, using a heatmap to illustrate this.\r\n\r\n### Problem or idea\r\n\r\nWe can include a heatmap for each gene expression matrix. I think we'd first filter to genes with high variance so we're not showing all genes in a gene expression matrix.\r\n\r\n### Solution or next step\r\n\r\n- Add [`ComplexHeatmap`](https://bioconductor.org/packages/release/bioc/html/ComplexHeatmap.html) to the smasher Docker image\r\n\r\nFrom @cansav09 's [example](https://github.com/AlexsLemonade/refinebio-examples/blob/4d47d138b7b34048bbb682c2d11d5c73dcc6aa4d/clustering/clustering_example.Rmd):\r\n\r\n```\r\n# Attach the library\r\nlibrary(ComplexHeatmap)\r\n\r\n# Calculate the variance for each gene\r\nvariances <- apply(df, 1, var)\r\n\r\n# Determine summary statistics for gene variances\r\nsum.stats.var <- summary(variances)\r\n\r\n# Subset the data choosing only genes whose variances are in the upper quartile\r\ndf.by.var <- df[which(variances > sum.stats.var[5]), ]\r\n\r\n# Create the heatmap object\r\nheatmap <- Heatmap(df.by.var, \r\n        name = \"Gene_Expression\",\r\n        show_row_names = FALSE,\r\n        show_row_dend = FALSE,   # Can show the gene/row cluster if this is \r\n        #changed to TRUE\r\n        column_dend_height = unit(4, \"cm\"))\r\n\r\n# Open a png file\r\npng(\"HeatmapGSE12955.png\")\r\n\r\n# Print your heatmap\r\nheatmap\r\n\r\n# Close the png file:\r\ndev.off()\r\n\r\n```\r\n### New Issue Checklist\r\n\r\n- [x] The title is short and descriptive.\r\n- [x] You have explained the context that led you to write this issue.\r\n- [x] You have reported a problem or idea.\r\n- [x] You have proposed a solution or next step.\r\n"},"comment":{"url":"https://api.github.com/repos/AlexsLemonade/refinebio/issues/comments/427911858","html_url":"https://github.com/AlexsLemonade/refinebio/issues/716#issuecomment-427911858","issue_url":"https://api.github.com/repos/AlexsLemonade/refinebio/issues/716","id":427911858,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzkxMTg1OA==","user":{"login":"Miserlou","id":139987,"node_id":"MDQ6VXNlcjEzOTk4Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/139987?v=4","gravatar_id":"","url":"https://api.github.com/users/Miserlou","html_url":"https://github.com/Miserlou","followers_url":"https://api.github.com/users/Miserlou/followers","following_url":"https://api.github.com/users/Miserlou/following{/other_user}","gists_url":"https://api.github.com/users/Miserlou/gists{/gist_id}","starred_url":"https://api.github.com/users/Miserlou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Miserlou/subscriptions","organizations_url":"https://api.github.com/users/Miserlou/orgs","repos_url":"https://api.github.com/users/Miserlou/repos","events_url":"https://api.github.com/users/Miserlou/events{/privacy}","received_events_url":"https://api.github.com/users/Miserlou/received_events","type":"User","site_admin":false},"created_at":"2018-10-08T17:13:27Z","updated_at":"2018-10-08T17:13:27Z","author_association":"COLLABORATOR","body":"😎 "}}
{"actor":{"display_login":"Miserlou"}}