{"action":"closed","issue":{"url":"https://api.github.com/repos/cbg-ethz/shorah/issues/38","repository_url":"https://api.github.com/repos/cbg-ethz/shorah","labels_url":"https://api.github.com/repos/cbg-ethz/shorah/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/cbg-ethz/shorah/issues/38/comments","events_url":"https://api.github.com/repos/cbg-ethz/shorah/issues/38/events","html_url":"https://github.com/cbg-ethz/shorah/issues/38","id":278809049,"number":38,"title":"IndexError exception raised due to reads.fas being empty","user":{"login":"terrycojones","id":132978,"avatar_url":"https://avatars3.githubusercontent.com/u/132978?v=4","gravatar_id":"","url":"https://api.github.com/users/terrycojones","html_url":"https://github.com/terrycojones","followers_url":"https://api.github.com/users/terrycojones/followers","following_url":"https://api.github.com/users/terrycojones/following{/other_user}","gists_url":"https://api.github.com/users/terrycojones/gists{/gist_id}","starred_url":"https://api.github.com/users/terrycojones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terrycojones/subscriptions","organizations_url":"https://api.github.com/users/terrycojones/orgs","repos_url":"https://api.github.com/users/terrycojones/repos","events_url":"https://api.github.com/users/terrycojones/events{/privacy}","received_events_url":"https://api.github.com/users/terrycojones/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-12-03T18:59:01Z","updated_at":"2018-02-20T12:47:21Z","closed_at":"2018-02-20T12:47:21Z","author_association":"NONE","body":"I run `shorah.py` as follows:\r\n\r\n```sh\r\n$ shorah.py -b alignment.bam.sorted -f data.fasta\r\n```\r\nand get an error:\r\n\r\n```sh\r\nTraceback (most recent call last):\r\n  File \"/opt/shorah/bin/shorah.py\", line 139, in <module>\r\n    alpha=args.a, keep_files=args.k, seed=args.S)\r\n  File \"/opt/shorah/lib/python3.5/site-packages/shorah_dec.py\", line 403, in main\r\n    r = list(aligned_reads.keys())[0]\r\nIndexError: list index out of range\r\n```\r\n\r\nThe code is assuming that `reads.fas` contains reads, but in my case that file is empty.\r\n\r\nIt's not immediately clear to me where `reads.fas` is created. In `shorah.log` I see\r\n\r\n```\r\n$ cat shorah.log\r\nINFO 2017-12-03 18:42:07,585 <module>                          130 /opt/shorah/bin/shorah.py -b alignment.bam.sorted -f data.fasta\r\nDEBUG 2017-12-03 18:42:07,585 <module>                          136 running dec.py\r\n```\r\n\r\nAh, now I see it:\r\n\r\n```sh\r\n$ strings /opt/shorah/bin/b2w | grep reads\\\\.fas\r\nreads.fas\r\nw-%s-%d-%d.reads.fas\r\n```\r\n\r\nAny suggestions?\r\n\r\nThanks!"}}
{"actor":{"display_login":"ozagordi"}}