{"action":"created","issue":{"url":"https://api.github.com/repos/arq5x/bedtools2/issues/629","repository_url":"https://api.github.com/repos/arq5x/bedtools2","labels_url":"https://api.github.com/repos/arq5x/bedtools2/issues/629/labels{/name}","comments_url":"https://api.github.com/repos/arq5x/bedtools2/issues/629/comments","events_url":"https://api.github.com/repos/arq5x/bedtools2/issues/629/events","html_url":"https://github.com/arq5x/bedtools2/issues/629","id":313602031,"number":629,"title":"Feature-request: makewindows produce windows that start at multiples of windowsize","user":{"login":"endrebak","id":17778898,"avatar_url":"https://avatars3.githubusercontent.com/u/17778898?v=4","gravatar_id":"","url":"https://api.github.com/users/endrebak","html_url":"https://github.com/endrebak","followers_url":"https://api.github.com/users/endrebak/followers","following_url":"https://api.github.com/users/endrebak/following{/other_user}","gists_url":"https://api.github.com/users/endrebak/gists{/gist_id}","starred_url":"https://api.github.com/users/endrebak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endrebak/subscriptions","organizations_url":"https://api.github.com/users/endrebak/orgs","repos_url":"https://api.github.com/users/endrebak/repos","events_url":"https://api.github.com/users/endrebak/events{/privacy}","received_events_url":"https://api.github.com/users/endrebak/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-12T07:08:27Z","updated_at":"2018-04-19T15:56:48Z","closed_at":"2018-04-19T15:56:48Z","author_association":"NONE","body":"Often I have a file\r\n\r\n```\r\nchr1 162 177\r\nchr1 344 414\r\n```\r\n\r\nand want to produce genome windows like this (with a window-size of 50):\r\n\r\n```\r\nchr1 150 200\r\nchr1 300 350\r\nchr1 350 400\r\nchr1 400 450\r\n```\r\n\r\nThe formula is \r\n\r\n`start = start - (start - windowsize % 50)`\r\n\r\nand \r\n\r\n`end = end - (end - windowsize % 50) + windowsize`\r\n\r\nThis can be done in awk, but tiling the genome is a useful feature and much used for experiments where base-pair precision is not of interest, such as broad histone marks in ChIP-Seq.\r\n"},"comment":{"url":"https://api.github.com/repos/arq5x/bedtools2/issues/comments/382788629","html_url":"https://github.com/arq5x/bedtools2/issues/629#issuecomment-382788629","issue_url":"https://api.github.com/repos/arq5x/bedtools2/issues/629","id":382788629,"user":{"login":"arq5x","id":72291,"avatar_url":"https://avatars3.githubusercontent.com/u/72291?v=4","gravatar_id":"","url":"https://api.github.com/users/arq5x","html_url":"https://github.com/arq5x","followers_url":"https://api.github.com/users/arq5x/followers","following_url":"https://api.github.com/users/arq5x/following{/other_user}","gists_url":"https://api.github.com/users/arq5x/gists{/gist_id}","starred_url":"https://api.github.com/users/arq5x/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arq5x/subscriptions","organizations_url":"https://api.github.com/users/arq5x/orgs","repos_url":"https://api.github.com/users/arq5x/repos","events_url":"https://api.github.com/users/arq5x/events{/privacy}","received_events_url":"https://api.github.com/users/arq5x/received_events","type":"User","site_admin":false},"created_at":"2018-04-19T15:56:48Z","updated_at":"2018-04-19T15:56:48Z","author_association":"OWNER","body":"My feeling is that this is a sufficiently \"custom\" scenario that it is best done with awk.  Could you create a simple bash script that invokes this logic and call that?"}}
{"actor":{"display_login":"arq5x"}}