{"action":"created","issue":{"url":"https://api.github.com/repos/biocore/scikit-bio/issues/1125","labels_url":"https://api.github.com/repos/biocore/scikit-bio/issues/1125/labels{/name}","comments_url":"https://api.github.com/repos/biocore/scikit-bio/issues/1125/comments","events_url":"https://api.github.com/repos/biocore/scikit-bio/issues/1125/events","html_url":"https://github.com/biocore/scikit-bio/issues/1125","id":106100317,"number":1125,"title":"Add `get_key` to `TabularMSA`","user":{"login":"ebolyen","id":3976804,"avatar_url":"https://avatars.githubusercontent.com/u/3976804?v=3","gravatar_id":"","url":"https://api.github.com/users/ebolyen","html_url":"https://github.com/ebolyen","followers_url":"https://api.github.com/users/ebolyen/followers","following_url":"https://api.github.com/users/ebolyen/following{/other_user}","gists_url":"https://api.github.com/users/ebolyen/gists{/gist_id}","starred_url":"https://api.github.com/users/ebolyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebolyen/subscriptions","organizations_url":"https://api.github.com/users/ebolyen/orgs","repos_url":"https://api.github.com/users/ebolyen/repos","events_url":"https://api.github.com/users/ebolyen/events{/privacy}","received_events_url":"https://api.github.com/users/ebolyen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/biocore/scikit-bio/labels/API","name":"API","color":"c7def8"}],"state":"open","locked":false,"assignee":{"login":"anderspitman","id":7820200,"avatar_url":"https://avatars.githubusercontent.com/u/7820200?v=3","gravatar_id":"","url":"https://api.github.com/users/anderspitman","html_url":"https://github.com/anderspitman","followers_url":"https://api.github.com/users/anderspitman/followers","following_url":"https://api.github.com/users/anderspitman/following{/other_user}","gists_url":"https://api.github.com/users/anderspitman/gists{/gist_id}","starred_url":"https://api.github.com/users/anderspitman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anderspitman/subscriptions","organizations_url":"https://api.github.com/users/anderspitman/orgs","repos_url":"https://api.github.com/users/anderspitman/repos","events_url":"https://api.github.com/users/anderspitman/events{/privacy}","received_events_url":"https://api.github.com/users/anderspitman/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/biocore/scikit-bio/milestones/12","html_url":"https://github.com/biocore/scikit-bio/milestones/RFC%201:%20tabular-msa","labels_url":"https://api.github.com/repos/biocore/scikit-bio/milestones/12/labels","id":1278267,"number":12,"title":"RFC 1: tabular-msa","description":"RFC:\r\nhttps://github.com/biocore/scikit-bio-rfcs/blob/master/active/001-tabular-msa.md\r\n\r\nPrior discussion:\r\nhttps://github.com/biocore/scikit-bio-rfcs/pull/1","creator":{"login":"ebolyen","id":3976804,"avatar_url":"https://avatars.githubusercontent.com/u/3976804?v=3","gravatar_id":"","url":"https://api.github.com/users/ebolyen","html_url":"https://github.com/ebolyen","followers_url":"https://api.github.com/users/ebolyen/followers","following_url":"https://api.github.com/users/ebolyen/following{/other_user}","gists_url":"https://api.github.com/users/ebolyen/gists{/gist_id}","starred_url":"https://api.github.com/users/ebolyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebolyen/subscriptions","organizations_url":"https://api.github.com/users/ebolyen/orgs","repos_url":"https://api.github.com/users/ebolyen/repos","events_url":"https://api.github.com/users/ebolyen/events{/privacy}","received_events_url":"https://api.github.com/users/ebolyen/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":13,"state":"open","created_at":"2015-08-28T20:36:38Z","updated_at":"2015-10-07T21:50:55Z","due_on":null,"closed_at":null},"comments":17,"created_at":"2015-09-11T21:47:03Z","updated_at":"2015-10-07T22:57:38Z","closed_at":null,"body":"Regarding the interplay of `TabularMSA(seqs, key=KEY)` and other methods:\r\n\r\nUsers will generally fall into two camps when using the `TabularMSA`, they will either need keys, or they won't. Those that need keys will find it easiest to do something like `TabularMSA(seqs, key='id')` or equivalent. \r\n\r\nWhen interacting with other methods such as `append` there isn't a good reason why the msa couldn't recall the key used, preventing the user from having to duplicate the key for every interaction.\r\n\r\nHere is a table indicating the success of two different `append` calls given different msa states: \r\n\r\n|                             |No key                    | `key='thing'`            | `keys=[...]`              |\r\n|-----------------------------|--------------------------|--------------------------|---------------------------|\r\n| `msa.append(seq)` | :heavy_check_mark:       | :white_check_mark:  |  :heavy_multiplication_x: |\r\n| `msa.append(seq, key=key)`  | :heavy_multiplication_x: | :heavy_check_mark:       | :heavy_check_mark:        |\r\n\r\nWe want to add support for the green checkmark. Iit would be ideal if it succeeded as it is going to represent the most common call of a key-ed msa. \r\n\r\nIf we intend to introduce operational state, we need a way for the user to access it. \r\n\r\nWe propose adding a method `get_key` which would return the current key or raise an `OperationError` if it did not exist. This would also allow alignment functions to potentially propagate the key if two MSAs shared the same key, and would allow them to not necessarily require a key when aligning a novel sequence into an existing key-ed MSA. \r\n\r\nTo support this change, `reindex` should set a private key variable, then other methods such as `append` can just call `get_key` if `has_keys` is `True` and a `key` was not provided."},"comment":{"url":"https://api.github.com/repos/biocore/scikit-bio/issues/comments/146356576","html_url":"https://github.com/biocore/scikit-bio/issues/1125#issuecomment-146356576","issue_url":"https://api.github.com/repos/biocore/scikit-bio/issues/1125","id":146356576,"user":{"login":"ebolyen","id":3976804,"avatar_url":"https://avatars.githubusercontent.com/u/3976804?v=3","gravatar_id":"","url":"https://api.github.com/users/ebolyen","html_url":"https://github.com/ebolyen","followers_url":"https://api.github.com/users/ebolyen/followers","following_url":"https://api.github.com/users/ebolyen/following{/other_user}","gists_url":"https://api.github.com/users/ebolyen/gists{/gist_id}","starred_url":"https://api.github.com/users/ebolyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebolyen/subscriptions","organizations_url":"https://api.github.com/users/ebolyen/orgs","repos_url":"https://api.github.com/users/ebolyen/repos","events_url":"https://api.github.com/users/ebolyen/events{/privacy}","received_events_url":"https://api.github.com/users/ebolyen/received_events","type":"User","site_admin":false},"created_at":"2015-10-07T22:57:38Z","updated_at":"2015-10-07T22:57:38Z","body":"This will make things a whole lot simpler. "}}