{"action":"created","issue":{"url":"https://api.github.com/repos/biocore/scikit-bio/issues/1173","labels_url":"https://api.github.com/repos/biocore/scikit-bio/issues/1173/labels{/name}","comments_url":"https://api.github.com/repos/biocore/scikit-bio/issues/1173/comments","events_url":"https://api.github.com/repos/biocore/scikit-bio/issues/1173/events","html_url":"https://github.com/biocore/scikit-bio/pull/1173","id":115176045,"number":1173,"title":"ENH: add TabularMSA.__copy__/__deepcopy__","user":{"login":"jairideout","id":1847232,"avatar_url":"https://avatars.githubusercontent.com/u/1847232?v=3","gravatar_id":"","url":"https://api.github.com/users/jairideout","html_url":"https://github.com/jairideout","followers_url":"https://api.github.com/users/jairideout/followers","following_url":"https://api.github.com/users/jairideout/following{/other_user}","gists_url":"https://api.github.com/users/jairideout/gists{/gist_id}","starred_url":"https://api.github.com/users/jairideout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jairideout/subscriptions","organizations_url":"https://api.github.com/users/jairideout/orgs","repos_url":"https://api.github.com/users/jairideout/repos","events_url":"https://api.github.com/users/jairideout/events{/privacy}","received_events_url":"https://api.github.com/users/jairideout/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/biocore/scikit-bio/labels/API","name":"API","color":"c7def8"},{"url":"https://api.github.com/repos/biocore/scikit-bio/labels/enhancement","name":"enhancement","color":"006b75"}],"state":"open","locked":false,"assignee":{"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},"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":19,"closed_issues":23,"state":"open","created_at":"2015-08-28T20:36:38Z","updated_at":"2015-11-05T16:41:11Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-11-04T23:45:42Z","updated_at":"2015-11-05T16:41:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/biocore/scikit-bio/pulls/1173","html_url":"https://github.com/biocore/scikit-bio/pull/1173","diff_url":"https://github.com/biocore/scikit-bio/pull/1173.diff","patch_url":"https://github.com/biocore/scikit-bio/pull/1173.patch"},"body":"Refactored common code into metadata mixins. Fixes #1158.\r\n\r\n@ebolyen shallow copying creates a new list with references to the original sequences. Is that right or should I have it create a new list *and* shallow copy each sequence? See the `TabularMSA` `copy` unit tests for current behavior."},"comment":{"url":"https://api.github.com/repos/biocore/scikit-bio/issues/comments/154116717","html_url":"https://github.com/biocore/scikit-bio/pull/1173#issuecomment-154116717","issue_url":"https://api.github.com/repos/biocore/scikit-bio/issues/1173","id":154116717,"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-11-05T16:41:46Z","updated_at":"2015-11-05T16:41:46Z","body":"Thinking further. I disagree with myself now.\r\n\r\nPart of our user story for metadata is delegating some of the metadata into the sequences. If I created a copy of an MSA would probably intuitively expect the sequence data to be copied while the  metadata itself might be shallow having the same references.\r\n\r\nMore specifically I could see:\r\n```\r\nmsa1 = <magically align some seqs them>\r\nmsa2 = copy.copy(msa1)\r\nmsa2[0].metadata['first'] = \"First!\"\r\n\r\nmsa1[0].metadata['first']\r\nKeyError\r\n```\r\n\r\nI guess it depends on whether the user will see this as a \"grid\" of data, or a list of sequences. I think I lean towards the \"grid\" concept.\r\n\r\nAnd a deep copy is still unambiguous as to it's behaviour."}}