{"action":"created","issue":{"url":"https://api.github.com/repos/dpryan79/pyBigWig/issues/12","repository_url":"https://api.github.com/repos/dpryan79/pyBigWig","labels_url":"https://api.github.com/repos/dpryan79/pyBigWig/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/dpryan79/pyBigWig/issues/12/comments","events_url":"https://api.github.com/repos/dpryan79/pyBigWig/issues/12/events","html_url":"https://github.com/dpryan79/pyBigWig/issues/12","id":138857977,"number":12,"title":"wrong 'stats' output?","user":{"login":"francois-a","id":9382463,"avatar_url":"https://avatars.githubusercontent.com/u/9382463?v=3","gravatar_id":"","url":"https://api.github.com/users/francois-a","html_url":"https://github.com/francois-a","followers_url":"https://api.github.com/users/francois-a/followers","following_url":"https://api.github.com/users/francois-a/following{/other_user}","gists_url":"https://api.github.com/users/francois-a/gists{/gist_id}","starred_url":"https://api.github.com/users/francois-a/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/francois-a/subscriptions","organizations_url":"https://api.github.com/users/francois-a/orgs","repos_url":"https://api.github.com/users/francois-a/repos","events_url":"https://api.github.com/users/francois-a/events{/privacy}","received_events_url":"https://api.github.com/users/francois-a/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dpryan79/pyBigWig/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-03-07T01:14:11Z","updated_at":"2016-03-10T21:42:17Z","closed_at":null,"body":"Thanks for developing pyBigWig, this is a very useful module. I've noticed some instances where 'stats' returns an incorrect value (compared with taking the mean of the values returned by 'values'). Here's an example, using an ENCODE mappability track:\r\nhttp://hgdownload.cse.ucsc.edu/goldenPath/hg19/encodeDCC/wgEncodeMapability/wgEncodeCrgMapabilityAlign75mer.bigWig\r\n\r\n```\r\nbw = pyBigWig('wgEncodeMapability/wgEncodeCrgMapabilityAlign75mer.bigWig')\r\nmean(bw.values('chr1', 89294, 91629))\r\n>> 0.22213842662134081\r\nbw.stats('chr1', 89294, 91629)\r\n>> [0.1902993809998163]\r\n```\r\n\r\nThanks in advance for looking into this."},"comment":{"url":"https://api.github.com/repos/dpryan79/pyBigWig/issues/comments/195062307","html_url":"https://github.com/dpryan79/pyBigWig/issues/12#issuecomment-195062307","issue_url":"https://api.github.com/repos/dpryan79/pyBigWig/issues/12","id":195062307,"user":{"login":"dpryan79","id":6399000,"avatar_url":"https://avatars.githubusercontent.com/u/6399000?v=3","gravatar_id":"","url":"https://api.github.com/users/dpryan79","html_url":"https://github.com/dpryan79","followers_url":"https://api.github.com/users/dpryan79/followers","following_url":"https://api.github.com/users/dpryan79/following{/other_user}","gists_url":"https://api.github.com/users/dpryan79/gists{/gist_id}","starred_url":"https://api.github.com/users/dpryan79/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpryan79/subscriptions","organizations_url":"https://api.github.com/users/dpryan79/orgs","repos_url":"https://api.github.com/users/dpryan79/repos","events_url":"https://api.github.com/users/dpryan79/events{/privacy}","received_events_url":"https://api.github.com/users/dpryan79/received_events","type":"User","site_admin":false},"created_at":"2016-03-10T21:42:17Z","updated_at":"2016-03-10T21:42:17Z","body":"I've pushed a small change that should increase the precision of this a bit (I'd be surprised if there's any speed change). I've also added a section to the readme. I'll continue mulling this over for a day or two and then merge into the master branch and make a new release if there's nothing new that needs to be added."}}