{"action":"created","issue":{"url":"https://api.github.com/repos/pysam-developers/pysam/issues/111","labels_url":"https://api.github.com/repos/pysam-developers/pysam/issues/111/labels{/name}","comments_url":"https://api.github.com/repos/pysam-developers/pysam/issues/111/comments","events_url":"https://api.github.com/repos/pysam-developers/pysam/issues/111/events","html_url":"https://github.com/pysam-developers/pysam/issues/111","id":70350549,"number":111,"title":"Read counting","user":{"login":"goranrakocevic","id":5047327,"avatar_url":"https://avatars.githubusercontent.com/u/5047327?v=3","gravatar_id":"","url":"https://api.github.com/users/goranrakocevic","html_url":"https://github.com/goranrakocevic","followers_url":"https://api.github.com/users/goranrakocevic/followers","following_url":"https://api.github.com/users/goranrakocevic/following{/other_user}","gists_url":"https://api.github.com/users/goranrakocevic/gists{/gist_id}","starred_url":"https://api.github.com/users/goranrakocevic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goranrakocevic/subscriptions","organizations_url":"https://api.github.com/users/goranrakocevic/orgs","repos_url":"https://api.github.com/users/goranrakocevic/repos","events_url":"https://api.github.com/users/goranrakocevic/events{/privacy}","received_events_url":"https://api.github.com/users/goranrakocevic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-23T08:54:30Z","updated_at":"2015-05-21T21:26:27Z","closed_at":null,"body":"Seems like Samfile().unmapped and Samfile().count are skipping some unmapped reads.\r\nI'm counting reads in a whole genome:\r\nSamfile().count  = 1357176500\r\nSamfile().unmapped = 1962182\r\n\r\nHowever, if I iterate through read by read and look at the flags, I get:\r\n(These numbers also match Picard Alignment Summary metrics)\r\nTotal: 1383584070\r\nUnmapped: 28369752\r\nThe unmapped reads by flag: 69: 101074, 77: 13203785, 117: 101132, 133: 880353, 141: 13203785, 181: 879623\r\nThus, it looks like reads with flags 141 and 77 are not taken into account\r\n\r\nAny ideas what might cause this? Unfortunately, I can't share the files, but I can look at anything that might be helpful.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/pysam-developers/pysam/issues/comments/104425346","html_url":"https://github.com/pysam-developers/pysam/issues/111#issuecomment-104425346","issue_url":"https://api.github.com/repos/pysam-developers/pysam/issues/111","id":104425346,"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":"2015-05-21T21:26:27Z","updated_at":"2015-05-21T21:26:27Z","body":"Thank you. I keep this open until I know of a solution."}}