{"action":"opened","issue":{"url":"https://api.github.com/repos/biocore/biom-format/issues/633","labels_url":"https://api.github.com/repos/biocore/biom-format/issues/633/labels{/name}","comments_url":"https://api.github.com/repos/biocore/biom-format/issues/633/comments","events_url":"https://api.github.com/repos/biocore/biom-format/issues/633/events","html_url":"https://github.com/biocore/biom-format/issues/633","id":83203627,"number":633,"title":"Method update_ids won't \"update\" ids to the same name (raises incorrect error)","user":{"login":"ElDeveloper","id":375307,"avatar_url":"https://avatars.githubusercontent.com/u/375307?v=3","gravatar_id":"","url":"https://api.github.com/users/ElDeveloper","html_url":"https://github.com/ElDeveloper","followers_url":"https://api.github.com/users/ElDeveloper/followers","following_url":"https://api.github.com/users/ElDeveloper/following{/other_user}","gists_url":"https://api.github.com/users/ElDeveloper/gists{/gist_id}","starred_url":"https://api.github.com/users/ElDeveloper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElDeveloper/subscriptions","organizations_url":"https://api.github.com/users/ElDeveloper/orgs","repos_url":"https://api.github.com/users/ElDeveloper/repos","events_url":"https://api.github.com/users/ElDeveloper/events{/privacy}","received_events_url":"https://api.github.com/users/ElDeveloper/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/biocore/biom-format/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-31T22:09:37Z","updated_at":"2015-05-31T22:09:37Z","closed_at":null,"body":"When using `update_ids`, you need to provide new identifiers, otherwise the method will raise a spurious error. The example below shows how using the example table you can reproduce the error by creating a dictionary where all key and value pairs are equal:\r\n\r\n```python\r\nIn [7]: from biom import example_table as et\r\n\r\nIn [8]: id_map = {i: i for i in et.ids()}\r\n\r\nIn [9]: id_map\r\nOut[9]: {'S1': 'S1', 'S2': 'S2', 'S3': 'S3'}\r\n\r\nIn [10]: et.update_ids(id_map)\r\n---------------------------------------------------------------------------\r\nTableException                            Traceback (most recent call last)\r\n<ipython-input-10-3d0c303209a3> in <module>()\r\n----> 1 et.update_ids(id_map)\r\n\r\n/Users/yoshikivazquezbaeza/.virtualenvs/qiime-191/lib/python2.7/site-packages/biom/table.pyc in update_ids(self, id_map, axis, strict, inplace)\r\n    990                     \"Mapping not provided for %s identifier: %s. If this \"\r\n    991                     \"identifier should not be updated, pass strict=False.\"\r\n--> 992                     % (axis, old_id))\r\n    993             updated_ids[idx] = new_id\r\n    994 \r\n\r\nTableException: Mapping not provided for sample identifier: S1. If this identifier should not be updated, pass strict=False.\r\n```\r\n\r\nThe error indicates that the mapping for `S1` was not provided, even though it is in the `id_map` dictionary. This error goes away as soon as you change the mapping so the values of the dictionary are different from the keys:\r\n\r\n```python\r\nIn [11]: id_map = {i: i+'-:L' for i in et.ids()}\r\n\r\nIn [12]: et.update_ids(id_map)\r\nOut[12]: 2 x 3 <class 'biom.table.Table'> with 5 nonzero entries (83% dense)\r\n```"}}