{"action":"created","issue":{"url":"https://api.github.com/repos/joey711/phyloseq/issues/324","labels_url":"https://api.github.com/repos/joey711/phyloseq/issues/324/labels{/name}","comments_url":"https://api.github.com/repos/joey711/phyloseq/issues/324/comments","events_url":"https://api.github.com/repos/joey711/phyloseq/issues/324/events","html_url":"https://github.com/joey711/phyloseq/issues/324","id":31366797,"number":324,"title":"Support for additional (non-taxonomic) data in tax_table","user":{"login":"davidelliott","id":5833297,"avatar_url":"https://avatars.githubusercontent.com/u/5833297?v=3","gravatar_id":"","url":"https://api.github.com/users/davidelliott","html_url":"https://github.com/davidelliott","followers_url":"https://api.github.com/users/davidelliott/followers","following_url":"https://api.github.com/users/davidelliott/following{/other_user}","gists_url":"https://api.github.com/users/davidelliott/gists{/gist_id}","starred_url":"https://api.github.com/users/davidelliott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidelliott/subscriptions","organizations_url":"https://api.github.com/users/davidelliott/orgs","repos_url":"https://api.github.com/users/davidelliott/repos","events_url":"https://api.github.com/users/davidelliott/events{/privacy}","received_events_url":"https://api.github.com/users/davidelliott/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joey711/phyloseq/labels/Documentation","name":"Documentation","color":"02d7e1"},{"url":"https://api.github.com/repos/joey711/phyloseq/labels/Feature","name":"Feature","color":"02e10c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2014-04-11T22:18:03Z","updated_at":"2015-04-10T12:06:33Z","closed_at":null,"body":"Hi Joey\r\n\r\nI have been using phyloseq a lot on many projects and find it very useful. \r\n\r\nThe sample data slot is really useful for analysing relationships between the microbiome and sample metadata, and for manipulating the phyloseq object in relation to sample data. The taxonomy table is similarly useful for manipulations and analyses based on taxonomic information. In many cases though we have information about OTUs which is not taxonomic but we want to subset or analyse by. \r\n\r\nI wonder therefore if it would be useful to have an extra slot in the phyloseq object for otu data? This could hold any kind of information about OTUs and allow the sort of functionality already possible for sample data and taxonomic information. I have been achieving something similar by having separate tables containing such things as source information from GenBank records, manually curated possible functions, known associations, etc. I have also tried putting this non-taxonomic information into the taxonomy table so that I can manipulate it as shown in the example below. It seems to work however this is clearly not the intended purpose.\r\n\r\n```R\r\nlibrary(phyloseq)\r\ndata(GlobalPatterns)\r\n\r\n# reduce data for example\r\nexpt = subset_taxa(GlobalPatterns, Phylum == \"Bacteroidetes\")\r\n\r\n# re-name the slot in the tax table, ready to hold OTU-related metadata\r\ncolnames(tax_table(expt))[1] <- \"group\"\r\n\r\n# define a functional group for each OTU (randomly for example)\r\ngroups <- sample(c(\"oligotroph\",\"copiotroph\",\"unknown\"), ntaxa(expt),replace=TRUE)\r\n\r\n# over-write the former kingdom slot in the tax table with the functional group\r\ntax_table(expt)[,\"group\"] <- groups\r\n\r\n# merge taxa belonging to the same functional group\r\nexpt.groups <- tax_glom(expt,taxrank=\"group\")\r\n\r\n# visualise distribution of functional groups in each sample\r\nplot_bar(expt.groups,fill=\"group\")\r\n```"},"comment":{"url":"https://api.github.com/repos/joey711/phyloseq/issues/comments/91533418","html_url":"https://github.com/joey711/phyloseq/issues/324#issuecomment-91533418","issue_url":"https://api.github.com/repos/joey711/phyloseq/issues/324","id":91533418,"user":{"login":"willnotburn","id":2406299,"avatar_url":"https://avatars.githubusercontent.com/u/2406299?v=3","gravatar_id":"","url":"https://api.github.com/users/willnotburn","html_url":"https://github.com/willnotburn","followers_url":"https://api.github.com/users/willnotburn/followers","following_url":"https://api.github.com/users/willnotburn/following{/other_user}","gists_url":"https://api.github.com/users/willnotburn/gists{/gist_id}","starred_url":"https://api.github.com/users/willnotburn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willnotburn/subscriptions","organizations_url":"https://api.github.com/users/willnotburn/orgs","repos_url":"https://api.github.com/users/willnotburn/repos","events_url":"https://api.github.com/users/willnotburn/events{/privacy}","received_events_url":"https://api.github.com/users/willnotburn/received_events","type":"User","site_admin":false},"created_at":"2015-04-10T12:06:33Z","updated_at":"2015-04-10T12:06:33Z","body":"I was referring to disadvantages of having to use closed-reference OTUs (qiime) aka phylotypes (mothur) in exotic and/or diverse environments. PICRUSt works with phylotypes. Most of my de novo clustered OTUs, including some of my most abundant ones, are excluded. Community-level ordinations using de novo clusters and a subset of those that could be run through PICRUSt have their differences.\r\n\r\nHaving said that, using PICRUSt results in a nice \"otu_data\" table. If ported to phyloseq, it could be used for functional analyses. Maybe phyloseq can parse KO group levels, just like it does taxonomy levels. \r\n\r\nIt would be exciting stuff in phyloseq: visualizing distribution of various KO levels as easily as phyloseq makes visualizing various Tax levels."}}