{"action":"created","issue":{"url":"https://api.github.com/repos/MadsAlbertsen/ampvis2/issues/38","repository_url":"https://api.github.com/repos/MadsAlbertsen/ampvis2","labels_url":"https://api.github.com/repos/MadsAlbertsen/ampvis2/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/MadsAlbertsen/ampvis2/issues/38/comments","events_url":"https://api.github.com/repos/MadsAlbertsen/ampvis2/issues/38/events","html_url":"https://github.com/MadsAlbertsen/ampvis2/issues/38","id":301346011,"number":38,"title":"Different most abundant taxa in amp_heatmap and amp_boxplot using tax_show=N","user":{"login":"VGalata","id":5700085,"avatar_url":"https://avatars1.githubusercontent.com/u/5700085?v=4","gravatar_id":"","url":"https://api.github.com/users/VGalata","html_url":"https://github.com/VGalata","followers_url":"https://api.github.com/users/VGalata/followers","following_url":"https://api.github.com/users/VGalata/following{/other_user}","gists_url":"https://api.github.com/users/VGalata/gists{/gist_id}","starred_url":"https://api.github.com/users/VGalata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VGalata/subscriptions","organizations_url":"https://api.github.com/users/VGalata/orgs","repos_url":"https://api.github.com/users/VGalata/repos","events_url":"https://api.github.com/users/VGalata/events{/privacy}","received_events_url":"https://api.github.com/users/VGalata/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-01T10:09:25Z","updated_at":"2018-03-01T12:37:12Z","closed_at":null,"author_association":"NONE","body":"I am not sure whether this is a bug but I get different sets of taxa using `amp_heatmap` and `amp_boxplot`. \r\nThe parameter `tax_show` is set to 10 in both cases and the functions are called in the same manner (see below). As I understood from the provided examples the top `N` most abundant taxa should be plotted if `tax_show` is not set to `\"all\"`. If this is correct it would be good to know what affects the selection of the top `N` taxa in both functions.\r\n\r\nThank you in advance!\r\n\r\nUsed version: `ampvis2_2.3.2`\r\n\r\nCode snippet:\r\n\r\n```R\r\nampvis2_obj_no_contam <- ...\r\np_ampvis_rank         <- \"Phylum\"\r\np_ampvis_tax_add      <- NULL\r\np_ampvis_tax_show     <- 10\r\n\r\namp_heatmap(\r\n  data=ampvis2_obj_no_contam,\r\n  group_by=sample_group,\r\n  tax_aggregate=p_ampvis_rank,\r\n  tax_add=p_ampvis_tax_add,\r\n  tax_empty=\"OTU\",\r\n  tax_show=p_ampvis_tax_show\r\n)\r\n\r\namp_boxplot(\r\n  data=ampvis2_obj_no_contam,\r\n  group_by=sample_group,\r\n  tax_aggregate=p_ampvis_rank,\r\n  tax_add= p_ampvistax_add,\r\n  tax_empty=\"OTU\",\r\n  tax_show=p_ampvis_tax_show\r\n)\r\n```\r\n\r\nScreenshots:\r\n![ampvis2_issue_bp_top10](https://user-images.githubusercontent.com/5700085/36838757-580ecd20-1d40-11e8-8736-941a0a97de56.png)\r\n![ampvis2_issue_hm_top10](https://user-images.githubusercontent.com/5700085/36838758-583691f2-1d40-11e8-8e45-3a46ebac75dc.png)\r\n"},"comment":{"url":"https://api.github.com/repos/MadsAlbertsen/ampvis2/issues/comments/369578640","html_url":"https://github.com/MadsAlbertsen/ampvis2/issues/38#issuecomment-369578640","issue_url":"https://api.github.com/repos/MadsAlbertsen/ampvis2/issues/38","id":369578640,"user":{"login":"KasperSkytte","id":23030537,"avatar_url":"https://avatars2.githubusercontent.com/u/23030537?v=4","gravatar_id":"","url":"https://api.github.com/users/KasperSkytte","html_url":"https://github.com/KasperSkytte","followers_url":"https://api.github.com/users/KasperSkytte/followers","following_url":"https://api.github.com/users/KasperSkytte/following{/other_user}","gists_url":"https://api.github.com/users/KasperSkytte/gists{/gist_id}","starred_url":"https://api.github.com/users/KasperSkytte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KasperSkytte/subscriptions","organizations_url":"https://api.github.com/users/KasperSkytte/orgs","repos_url":"https://api.github.com/users/KasperSkytte/repos","events_url":"https://api.github.com/users/KasperSkytte/events{/privacy}","received_events_url":"https://api.github.com/users/KasperSkytte/received_events","type":"User","site_admin":false},"created_at":"2018-03-01T12:37:12Z","updated_at":"2018-03-01T12:37:12Z","author_association":"COLLABORATOR","body":"Hi @VGalata!\r\n\r\nThank you for pointing it out, but it's just because `amp_boxplot` by default orders by median while `amp_heatmap` orders by mean. It makes more sense to order by median in boxplots in my opinion. So setting the `sort_by` to the same in both plots hopefully gives you the same result. If not, please let me know, then something is totally wrong :)"}}
{"actor":{"display_login":"KasperSkytte"}}