{"action":"created","issue":{"url":"https://api.github.com/repos/daler/pybedtools/issues/238","repository_url":"https://api.github.com/repos/daler/pybedtools","labels_url":"https://api.github.com/repos/daler/pybedtools/issues/238/labels{/name}","comments_url":"https://api.github.com/repos/daler/pybedtools/issues/238/comments","events_url":"https://api.github.com/repos/daler/pybedtools/issues/238/events","html_url":"https://github.com/daler/pybedtools/issues/238","id":296871209,"number":238,"title":"Using pandas DataFrame as input for BedTool creation","user":{"login":"fbrundu","id":697622,"avatar_url":"https://avatars3.githubusercontent.com/u/697622?v=4","gravatar_id":"","url":"https://api.github.com/users/fbrundu","html_url":"https://github.com/fbrundu","followers_url":"https://api.github.com/users/fbrundu/followers","following_url":"https://api.github.com/users/fbrundu/following{/other_user}","gists_url":"https://api.github.com/users/fbrundu/gists{/gist_id}","starred_url":"https://api.github.com/users/fbrundu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fbrundu/subscriptions","organizations_url":"https://api.github.com/users/fbrundu/orgs","repos_url":"https://api.github.com/users/fbrundu/repos","events_url":"https://api.github.com/users/fbrundu/events{/privacy}","received_events_url":"https://api.github.com/users/fbrundu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-13T20:16:56Z","updated_at":"2018-02-13T20:24:00Z","closed_at":"2018-02-13T20:24:00Z","author_association":"NONE","body":"I have a pandas DataFrame with a subset of rows from a specific bedfile. Is it possible to create a BedTool object from this pandas DataFrame without saving it to file?\r\n\r\nThanks,\r\nFrancesco"},"comment":{"url":"https://api.github.com/repos/daler/pybedtools/issues/comments/365392578","html_url":"https://github.com/daler/pybedtools/issues/238#issuecomment-365392578","issue_url":"https://api.github.com/repos/daler/pybedtools/issues/238","id":365392578,"user":{"login":"daler","id":115406,"avatar_url":"https://avatars1.githubusercontent.com/u/115406?v=4","gravatar_id":"","url":"https://api.github.com/users/daler","html_url":"https://github.com/daler","followers_url":"https://api.github.com/users/daler/followers","following_url":"https://api.github.com/users/daler/following{/other_user}","gists_url":"https://api.github.com/users/daler/gists{/gist_id}","starred_url":"https://api.github.com/users/daler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daler/subscriptions","organizations_url":"https://api.github.com/users/daler/orgs","repos_url":"https://api.github.com/users/daler/repos","events_url":"https://api.github.com/users/daler/events{/privacy}","received_events_url":"https://api.github.com/users/daler/received_events","type":"User","site_admin":false},"created_at":"2018-02-13T20:24:00Z","updated_at":"2018-02-13T20:24:00Z","author_association":"OWNER","body":"You can use \r\n\r\n```python\r\nx = pybedtools.BedTool.from_dataframe(df)\r\n```\r\n\r\nUnder the hood this is actually just saving a temp file that will be cleaned up once you exit Python, but it's a little more convenient than doing it yourself.\r\n\r\nBy the way, there's also \r\n\r\n```python\r\ny = x.to_dataframe()\r\n```\r\n\r\nfor going in the reverse direction. In both cases, the operations are still saving to file; I don't know of a good way to get around that.\r\n"}}
{"actor":{"display_login":"daler"}}