{"action":"created","issue":{"url":"https://api.github.com/repos/pysam-developers/pysam/issues/245","repository_url":"https://api.github.com/repos/pysam-developers/pysam","labels_url":"https://api.github.com/repos/pysam-developers/pysam/issues/245/labels{/name}","comments_url":"https://api.github.com/repos/pysam-developers/pysam/issues/245/comments","events_url":"https://api.github.com/repos/pysam-developers/pysam/issues/245/events","html_url":"https://github.com/pysam-developers/pysam/issues/245","id":138469361,"number":245,"title":"Redirected stdout (e.g., with pysam.idxstats) now has a different format","user":{"login":"dpryan79","id":6399000,"avatar_url":"https://avatars.githubusercontent.com/u/6399000?v=3","gravatar_id":"","url":"https://api.github.com/users/dpryan79","html_url":"https://github.com/dpryan79","followers_url":"https://api.github.com/users/dpryan79/followers","following_url":"https://api.github.com/users/dpryan79/following{/other_user}","gists_url":"https://api.github.com/users/dpryan79/gists{/gist_id}","starred_url":"https://api.github.com/users/dpryan79/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpryan79/subscriptions","organizations_url":"https://api.github.com/users/dpryan79/orgs","repos_url":"https://api.github.com/users/dpryan79/repos","events_url":"https://api.github.com/users/dpryan79/events{/privacy}","received_events_url":"https://api.github.com/users/dpryan79/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-03-04T12:57:03Z","updated_at":"2016-03-14T18:56:19Z","closed_at":null,"body":"In versions previous to 0.9.0, a command like `pysam.idxstats(\"foo.bam\")` would produce a list of lines. In 0.9.0, one instead gets a single string of everything. Thus, instead of:\r\n\r\n    >>> pysam.idxstats('foo.bam')\r\n    ['1\\t195471971\\t13186418\\t21638\\n', '10\\t130694993\\t8695225\\t14791\\n', '11\\t122082543\\t8350803\\t15876\\n', ...\r\n\r\none now gets:\r\n\r\n    >>> pysam.idxstats('foo.bam')\r\n    '1\\t195471971\\t13186418\\t21638\\n10\\t130694993\\t8695225\\t14791\\n11\\t122082543\\t8350803\\t15876\\n12\\t120129022\\t8021634\\t27456\\n13\\t120421639\\t8119102\\t19602\\n14\\t124902244\\t8548846\\t74064\\n15\\t104043685\\t6917153\\t12046\\n16\\t98207768\\t6453436\\t14843\\n17\\t9...\r\n\r\nGranted, one can `foo.strip().split('\\n')` on the output, but any code that uses this now needs to be updated."},"comment":{"url":"https://api.github.com/repos/pysam-developers/pysam/issues/comments/196470740","html_url":"https://github.com/pysam-developers/pysam/issues/245#issuecomment-196470740","issue_url":"https://api.github.com/repos/pysam-developers/pysam/issues/245","id":196470740,"user":{"login":"kyleabeauchamp","id":1900459,"avatar_url":"https://avatars.githubusercontent.com/u/1900459?v=3","gravatar_id":"","url":"https://api.github.com/users/kyleabeauchamp","html_url":"https://github.com/kyleabeauchamp","followers_url":"https://api.github.com/users/kyleabeauchamp/followers","following_url":"https://api.github.com/users/kyleabeauchamp/following{/other_user}","gists_url":"https://api.github.com/users/kyleabeauchamp/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleabeauchamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleabeauchamp/subscriptions","organizations_url":"https://api.github.com/users/kyleabeauchamp/orgs","repos_url":"https://api.github.com/users/kyleabeauchamp/repos","events_url":"https://api.github.com/users/kyleabeauchamp/events{/privacy}","received_events_url":"https://api.github.com/users/kyleabeauchamp/received_events","type":"User","site_admin":false},"created_at":"2016-03-14T18:56:19Z","updated_at":"2016-03-14T18:56:19Z","body":"You could even just add something simple like the following:\r\n\r\n\r\n```\r\nif old_style_output:\r\n    result = \"\\n\".join(result)\r\n```"}}