{"action":"created","issue":{"url":"https://api.github.com/repos/CGATOxford/cgat/issues/247","repository_url":"https://api.github.com/repos/CGATOxford/cgat","labels_url":"https://api.github.com/repos/CGATOxford/cgat/issues/247/labels{/name}","comments_url":"https://api.github.com/repos/CGATOxford/cgat/issues/247/comments","events_url":"https://api.github.com/repos/CGATOxford/cgat/issues/247/events","html_url":"https://github.com/CGATOxford/cgat/issues/247","id":130685539,"number":247,"title":"Extend BED interval to specific size","user":{"login":"MikeDMorgan","id":6473398,"avatar_url":"https://avatars.githubusercontent.com/u/6473398?v=3","gravatar_id":"","url":"https://api.github.com/users/MikeDMorgan","html_url":"https://github.com/MikeDMorgan","followers_url":"https://api.github.com/users/MikeDMorgan/followers","following_url":"https://api.github.com/users/MikeDMorgan/following{/other_user}","gists_url":"https://api.github.com/users/MikeDMorgan/gists{/gist_id}","starred_url":"https://api.github.com/users/MikeDMorgan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikeDMorgan/subscriptions","organizations_url":"https://api.github.com/users/MikeDMorgan/orgs","repos_url":"https://api.github.com/users/MikeDMorgan/repos","events_url":"https://api.github.com/users/MikeDMorgan/events{/privacy}","received_events_url":"https://api.github.com/users/MikeDMorgan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-02T13:39:46Z","updated_at":"2016-02-08T16:18:35Z","closed_at":null,"body":"Currently bedtools features and bed2bed.py do not have a feature to extend/clip intervals to a specific size.  This may be a requirement for some third-party tools, for instance the MEME-suite of programs expect sequences to be of the same length.\r\n\r\nSuggestion:  allow a --set-interval size option that iteratively pads and/or clips intervals to the specific length.\r\n\r\nPossible solutions:  \r\n\r\n- Take the size as the distance from the current centre of the interval and extend/clip symmetrically to get the appropriate size\r\n- Allow assymetric padding/clipping in either 5' or 3' direction to achieve the desired interval length\r\n\r\nNeed to account for contig size to prevent extension off the end of the chromosome.\r\n\r\nOther suggestions/potential bug catches are encouraged."},"comment":{"url":"https://api.github.com/repos/CGATOxford/cgat/issues/comments/181446088","html_url":"https://github.com/CGATOxford/cgat/issues/247#issuecomment-181446088","issue_url":"https://api.github.com/repos/CGATOxford/cgat/issues/247","id":181446088,"user":{"login":"AndreasHeger","id":4426336,"avatar_url":"https://avatars.githubusercontent.com/u/4426336?v=3","gravatar_id":"","url":"https://api.github.com/users/AndreasHeger","html_url":"https://github.com/AndreasHeger","followers_url":"https://api.github.com/users/AndreasHeger/followers","following_url":"https://api.github.com/users/AndreasHeger/following{/other_user}","gists_url":"https://api.github.com/users/AndreasHeger/gists{/gist_id}","starred_url":"https://api.github.com/users/AndreasHeger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndreasHeger/subscriptions","organizations_url":"https://api.github.com/users/AndreasHeger/orgs","repos_url":"https://api.github.com/users/AndreasHeger/repos","events_url":"https://api.github.com/users/AndreasHeger/events{/privacy}","received_events_url":"https://api.github.com/users/AndreasHeger/received_events","type":"User","site_admin":false},"created_at":"2016-02-08T16:18:35Z","updated_at":"2016-02-08T16:18:35Z","body":"Hi Mike, this makes sense, but could this be solved through some bedtools /awk combination, i.e., select midpoint of each interval and then use bedtools slop?"}}