{"action":"opened","issue":{"url":"https://api.github.com/repos/arq5x/bedtools2/issues/173","labels_url":"https://api.github.com/repos/arq5x/bedtools2/issues/173/labels{/name}","comments_url":"https://api.github.com/repos/arq5x/bedtools2/issues/173/comments","events_url":"https://api.github.com/repos/arq5x/bedtools2/issues/173/events","html_url":"https://github.com/arq5x/bedtools2/issues/173","id":54260757,"number":173,"title":"closestBed overlapping nearest genes (features)","user":{"login":"radaniba","id":1666443,"avatar_url":"https://avatars.githubusercontent.com/u/1666443?v=3","gravatar_id":"","url":"https://api.github.com/users/radaniba","html_url":"https://github.com/radaniba","followers_url":"https://api.github.com/users/radaniba/followers","following_url":"https://api.github.com/users/radaniba/following{/other_user}","gists_url":"https://api.github.com/users/radaniba/gists{/gist_id}","starred_url":"https://api.github.com/users/radaniba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/radaniba/subscriptions","organizations_url":"https://api.github.com/users/radaniba/orgs","repos_url":"https://api.github.com/users/radaniba/repos","events_url":"https://api.github.com/users/radaniba/events{/privacy}","received_events_url":"https://api.github.com/users/radaniba/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-13T22:56:52Z","updated_at":"2015-01-13T22:56:52Z","closed_at":null,"body":"Hello\r\n\r\nIs there any recipe to use closestBed to get flanking genes (depending on the strand) if the region in A is intergenic ? It would be great if this is something added by default in closestBed\r\n\r\nAn option like : `-f, --flank` that return the nearest feature in the + strand and in the - strand, a combination of -S and -s together  \r\n\r\nThanks\r\n\r\n\r\n\r\nexample\r\n\r\nRefgene.bed\r\n\r\nchr1    1736    4272    DDX11L1    +\r\nchr1    4224    19233    WASH7P    -\r\nchr1    4224    7502    LOC100288778    -\r\nchr1    7231    7299    MIR6859-1    -\r\nchr1    7231    7299    MIR6859-2    -\r\nA.bed\r\n\r\nchr1    1790    4290   \r\nchr1    4225    8000  \r\nchr1    4230    7500   \r\nchr1    7250    7290   \r\n\r\n\r\nI played with closestBed a bit but cannot find a recipe to get  nearest flanking genes for each region in A\r\n\r\nanyone with an idea ?\r\n\r\nThanks"}}