{"action":"created","issue":{"url":"https://api.github.com/repos/jeromekelleher/msprime/issues/224","repository_url":"https://api.github.com/repos/jeromekelleher/msprime","labels_url":"https://api.github.com/repos/jeromekelleher/msprime/issues/224/labels{/name}","comments_url":"https://api.github.com/repos/jeromekelleher/msprime/issues/224/comments","events_url":"https://api.github.com/repos/jeromekelleher/msprime/issues/224/events","html_url":"https://github.com/jeromekelleher/msprime/issues/224","id":249302671,"number":224,"title":"Debug output for print(tree_sequence)","user":{"login":"jeromekelleher","id":2664569,"avatar_url":"https://avatars2.githubusercontent.com/u/2664569?v=4","gravatar_id":"","url":"https://api.github.com/users/jeromekelleher","html_url":"https://github.com/jeromekelleher","followers_url":"https://api.github.com/users/jeromekelleher/followers","following_url":"https://api.github.com/users/jeromekelleher/following{/other_user}","gists_url":"https://api.github.com/users/jeromekelleher/gists{/gist_id}","starred_url":"https://api.github.com/users/jeromekelleher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeromekelleher/subscriptions","organizations_url":"https://api.github.com/users/jeromekelleher/orgs","repos_url":"https://api.github.com/users/jeromekelleher/repos","events_url":"https://api.github.com/users/jeromekelleher/events{/privacy}","received_events_url":"https://api.github.com/users/jeromekelleher/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-08-10T10:30:43Z","updated_at":"2017-08-10T16:58:04Z","closed_at":null,"body":"Something that's coming up over and over again for me is a the lack of a quick debug output for looking at a tree sequence. I'd like to write\r\n\r\n```python\r\nprint(ts)\r\n```\r\nand get back a summary of the tables. Something like this:\r\n```\r\n****************\r\nTreeSequence @abc1234\r\nsample_size: 2\r\n<more details>\r\n== nodes ==\r\nid      flags   population      time\r\n0       1       0               0.00000000000000\r\n1       1       0               0.00000000000000\r\n2       0       0               1.60156352971203\r\n== edgesets ==\r\nid      left            right           parent  children\r\n0       0.00000000      1.00000000      2       0,1\r\n== migrations ==\r\nid      left    right   node    source  dest    time\r\n== sites ==\r\nid      position        ancestral_state\r\n0       0.25000000      0\r\n== mutations ==\r\nid      site    node    derived_state\r\n0       0       1       1\r\n1       0       0       1\r\n****************\r\n```\r\n\r\nI think this would be very useful, and it's in the spirit of the Python ``__str__`` method as it's an informal representation of the object. \r\n\r\nAny thoughts/objections @petrelharp, @ashander?"},"comment":{"url":"https://api.github.com/repos/jeromekelleher/msprime/issues/comments/321611577","html_url":"https://github.com/jeromekelleher/msprime/issues/224#issuecomment-321611577","issue_url":"https://api.github.com/repos/jeromekelleher/msprime/issues/224","id":321611577,"user":{"login":"jeromekelleher","id":2664569,"avatar_url":"https://avatars2.githubusercontent.com/u/2664569?v=4","gravatar_id":"","url":"https://api.github.com/users/jeromekelleher","html_url":"https://github.com/jeromekelleher","followers_url":"https://api.github.com/users/jeromekelleher/followers","following_url":"https://api.github.com/users/jeromekelleher/following{/other_user}","gists_url":"https://api.github.com/users/jeromekelleher/gists{/gist_id}","starred_url":"https://api.github.com/users/jeromekelleher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeromekelleher/subscriptions","organizations_url":"https://api.github.com/users/jeromekelleher/orgs","repos_url":"https://api.github.com/users/jeromekelleher/repos","events_url":"https://api.github.com/users/jeromekelleher/events{/privacy}","received_events_url":"https://api.github.com/users/jeromekelleher/received_events","type":"User","site_admin":false},"created_at":"2017-08-10T16:58:04Z","updated_at":"2017-08-10T16:58:04Z","body":"Cool, thanks guys. I'll make a PR when things calm down a bit.\r\n\r\n>  Does `id` have a consistent meaning across the 5 types of data?\r\n\r\nI think it does -- it's just a shortcut to let you find things like nodes and sites when referred to from other tables. It seems more consistent (and less confusing) to keep ID in all the tables rather than just include it in the ones that are referred to from other tables."}}
{"actor":{"display_login":"jeromekelleher"}}