{"action":"opened","issue":{"url":"https://api.github.com/repos/seqan/seqan/issues/1831","repository_url":"https://api.github.com/repos/seqan/seqan","labels_url":"https://api.github.com/repos/seqan/seqan/issues/1831/labels{/name}","comments_url":"https://api.github.com/repos/seqan/seqan/issues/1831/comments","events_url":"https://api.github.com/repos/seqan/seqan/issues/1831/events","html_url":"https://github.com/seqan/seqan/issues/1831","id":171726075,"number":1831,"title":"guessFormatFromFilename issue","user":{"login":"jwalabroad","id":6922120,"avatar_url":"https://avatars.githubusercontent.com/u/6922120?v=3","gravatar_id":"","url":"https://api.github.com/users/jwalabroad","html_url":"https://github.com/jwalabroad","followers_url":"https://api.github.com/users/jwalabroad/followers","following_url":"https://api.github.com/users/jwalabroad/following{/other_user}","gists_url":"https://api.github.com/users/jwalabroad/gists{/gist_id}","starred_url":"https://api.github.com/users/jwalabroad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwalabroad/subscriptions","organizations_url":"https://api.github.com/users/jwalabroad/orgs","repos_url":"https://api.github.com/users/jwalabroad/repos","events_url":"https://api.github.com/users/jwalabroad/events{/privacy}","received_events_url":"https://api.github.com/users/jwalabroad/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-17T18:21:04Z","updated_at":"2016-08-17T18:21:04Z","closed_at":null,"body":"I am trying to read a BAM file as follows, but it is failing:\r\n\r\n```\r\nstd::string bam=\"small.bam\";\r\nseqan::BamFileIn bamFileIn;\r\nif(!open(bamFileIn, bam.c_str(), seqan::OPEN_RDONLY)) { \r\nstd::cerr << \"ERROR: could not open input file \" << bamFileInName << \".\\n\";\r\nreturn 1;\r\n}\r\n```\r\n\r\nI have tried this for multiple BAMs, all of which are well-behaved with other APIs. This does work if I input a SAM file instead. I used gdb to find where ```open``` is failing, and traced it to ```!guessFormatFromFilename(basename, file.format)``` on line 698 of ```formatted_file.h```. The ```guessFormatFromFilename``` is returning 0, even though I am confirming that ```basename``` is indeed \"small.bam\"\r\n\r\nAm I missing something here, or is this a bug?"}}
{"actor":{"display_login":"jwalabroad"}}