{"action":"created","issue":{"url":"https://api.github.com/repos/fidelram/deepTools/issues/349","repository_url":"https://api.github.com/repos/fidelram/deepTools","labels_url":"https://api.github.com/repos/fidelram/deepTools/issues/349/labels{/name}","comments_url":"https://api.github.com/repos/fidelram/deepTools/issues/349/comments","events_url":"https://api.github.com/repos/fidelram/deepTools/issues/349/events","html_url":"https://github.com/fidelram/deepTools/issues/349","id":151116625,"number":349,"title":"computeMatrix - cannot open *.bw a second time if in read-only directory","user":{"login":"MWSchmid","id":8819325,"avatar_url":"https://avatars.githubusercontent.com/u/8819325?v=3","gravatar_id":"","url":"https://api.github.com/users/MWSchmid","html_url":"https://github.com/MWSchmid","followers_url":"https://api.github.com/users/MWSchmid/followers","following_url":"https://api.github.com/users/MWSchmid/following{/other_user}","gists_url":"https://api.github.com/users/MWSchmid/gists{/gist_id}","starred_url":"https://api.github.com/users/MWSchmid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MWSchmid/subscriptions","organizations_url":"https://api.github.com/users/MWSchmid/orgs","repos_url":"https://api.github.com/users/MWSchmid/repos","events_url":"https://api.github.com/users/MWSchmid/events{/privacy}","received_events_url":"https://api.github.com/users/MWSchmid/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-26T12:07:03Z","updated_at":"2016-04-27T07:17:46Z","closed_at":null,"body":"Hi\r\n\r\nThanks for the tools - nice work.\r\n\r\nI encountered an error with \"computeMatrix\" (version 2.2.3-6-43d23f4). If I try to use the same set of *.bw files for several rounds of \"computeMatrix\", it fails to open the *.bw files after the first usage. It's important to mention that this only happens if the *.bw files are located in a read-only directory (in my case it was a cifs-mounted samba share, you can only write on it with sudo...).\r\n\r\nExample:\r\n```sh\r\nfor PEAKFILE in *.bed; do\r\ncomputeMatrix reference-point -S /myData/*.bw -o ${PEAKFILE//.bed}.mat.gz -R $PEAKFILE --referencePoint center -a 5000 -b 5000 --skipZeros\r\ndone\r\n```\r\nThis works with the first PEAKFILE (*.bed), but throws an error at the second round, if \"/myData\" is read-only (otherwise it works fine).\r\n\r\nBest regards,\r\n\r\nMarc"},"comment":{"url":"https://api.github.com/repos/fidelram/deepTools/issues/comments/214991467","html_url":"https://github.com/fidelram/deepTools/issues/349#issuecomment-214991467","issue_url":"https://api.github.com/repos/fidelram/deepTools/issues/349","id":214991467,"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-04-27T07:17:46Z","updated_at":"2016-04-27T07:17:46Z","body":"That's rather unusual. This only happens if `fopen()` can't open a file. I suspect that your file system has things locked somehow. What happens if you open two terminals, start python in both, and type the following:\r\n\r\n    import pyBigWig\r\n    bw = pyBigWig.open(\"/myData/blaba.raw.bw\")\r\n\r\nPresumably that would give you the same error, but it's good to check."}}