{"action":"created","issue":{"url":"https://api.github.com/repos/fiji/Colocalisation_Analysis/issues/20","labels_url":"https://api.github.com/repos/fiji/Colocalisation_Analysis/issues/20/labels{/name}","comments_url":"https://api.github.com/repos/fiji/Colocalisation_Analysis/issues/20/comments","events_url":"https://api.github.com/repos/fiji/Colocalisation_Analysis/issues/20/events","html_url":"https://github.com/fiji/Colocalisation_Analysis/pull/20","id":98767757,"number":20,"title":"Fix critical bugs in Manders calculations pixel threshold boolean selection","user":{"login":"chalkie666","id":259634,"avatar_url":"https://avatars.githubusercontent.com/u/259634?v=3","gravatar_id":"","url":"https://api.github.com/users/chalkie666","html_url":"https://github.com/chalkie666","followers_url":"https://api.github.com/users/chalkie666/followers","following_url":"https://api.github.com/users/chalkie666/following{/other_user}","gists_url":"https://api.github.com/users/chalkie666/gists{/gist_id}","starred_url":"https://api.github.com/users/chalkie666/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chalkie666/subscriptions","organizations_url":"https://api.github.com/users/chalkie666/orgs","repos_url":"https://api.github.com/users/chalkie666/repos","events_url":"https://api.github.com/users/chalkie666/events{/privacy}","received_events_url":"https://api.github.com/users/chalkie666/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/fiji/Colocalisation_Analysis/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"tomka","id":112226,"avatar_url":"https://avatars.githubusercontent.com/u/112226?v=3","gravatar_id":"","url":"https://api.github.com/users/tomka","html_url":"https://github.com/tomka","followers_url":"https://api.github.com/users/tomka/followers","following_url":"https://api.github.com/users/tomka/following{/other_user}","gists_url":"https://api.github.com/users/tomka/gists{/gist_id}","starred_url":"https://api.github.com/users/tomka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomka/subscriptions","organizations_url":"https://api.github.com/users/tomka/orgs","repos_url":"https://api.github.com/users/tomka/repos","events_url":"https://api.github.com/users/tomka/events{/privacy}","received_events_url":"https://api.github.com/users/tomka/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2015-08-03T15:25:08Z","updated_at":"2015-08-05T18:06:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/fiji/Colocalisation_Analysis/pulls/20","html_url":"https://github.com/fiji/Colocalisation_Analysis/pull/20","diff_url":"https://github.com/fiji/Colocalisation_Analysis/pull/20.diff","patch_url":"https://github.com/fiji/Colocalisation_Analysis/pull/20.patch"},"body":"I fear I discovered a maths bug in Manders colocalisation coefficients, using thresholds above or below (none thresholds was correct). Please check the Manders paper (it linked ot on the Coloc_2 page) and verify in code review. \r\n\r\n I spotted the logic was wrong in the boolean code that selects if the cursor is looking at a pixel which is above the threshold in the OTHER channel. We were looking in the SAME channel, which was wrong. \r\n\r\nOut unit test cases did not catch this... i think bacause the 2 channel test images of the spots have the same thresholds and range, so it doesnt matter if the wrong channel threshold is checked.... The tests still pass woh this branch's code. I suggest a unit test using the mask image (see below) for the colocsample1b sample image data - i verified that this gives pretty different Manders coefficient (thresholded)  results for this bug fix.  See attached pdf outputs.\r\n\r\nI noticed this upon re-reading the Manders paper, checking the old plugin's code - Colocalization Threshold, hearing about differences between Manders results from Coloc_2 and other software (they all make different numbers anyway....)  and while working on adding more split coloc coefficient to the MandersColocaization Class (as requested by Ann Wheeler in issue #17....\r\n\r\nAlso here is a mask image to go with the colocsample1b test images to use as a ROI/mask in the analysis and a unit test. \r\n\r\nThere is also some renaming of variables and a class, and a bunch more detailed comments, in order to make things more understandable in light of these bugs and the next part of the work to add more split coefficients. \r\n\r\nI hope i got all the whitespace and the coding style is ok... if not, feel free to fix... I installed the eclipse template things for code style... but not sure how to use them... maybe they just work...\r\n\r\ncheers\r\n\r\nDan\r\n[coloc_colocsample1b-green.tif_colocsample1b-red.tif_mask_1_OnlyDiffWongMandersAbove.pdf](https://github.com/fiji/Colocalisation_Analysis/files/1107/coloc_colocsample1b-green.tif_colocsample1b-red.tif_mask_1_OnlyDiffWongMandersAbove.pdf)\r\n[coloc_colocsample1b-green.tif_colocsample1b-redFixedManders.pdf](https://github.com/fiji/Colocalisation_Analysis/files/1108/coloc_colocsample1b-green.tif_colocsample1b-redFixedManders.pdf)\r\n"},"comment":{"url":"https://api.github.com/repos/fiji/Colocalisation_Analysis/issues/comments/128094373","html_url":"https://github.com/fiji/Colocalisation_Analysis/pull/20#issuecomment-128094373","issue_url":"https://api.github.com/repos/fiji/Colocalisation_Analysis/issues/20","id":128094373,"user":{"login":"chalkie666","id":259634,"avatar_url":"https://avatars.githubusercontent.com/u/259634?v=3","gravatar_id":"","url":"https://api.github.com/users/chalkie666","html_url":"https://github.com/chalkie666","followers_url":"https://api.github.com/users/chalkie666/followers","following_url":"https://api.github.com/users/chalkie666/following{/other_user}","gists_url":"https://api.github.com/users/chalkie666/gists{/gist_id}","starred_url":"https://api.github.com/users/chalkie666/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chalkie666/subscriptions","organizations_url":"https://api.github.com/users/chalkie666/orgs","repos_url":"https://api.github.com/users/chalkie666/repos","events_url":"https://api.github.com/users/chalkie666/events{/privacy}","received_events_url":"https://api.github.com/users/chalkie666/received_events","type":"User","site_admin":false},"created_at":"2015-08-05T18:06:59Z","updated_at":"2015-08-05T18:06:59Z","body":"@tomka ok, i went with the first option, and reset two commits back, and pushed it to github. So hopefully thats ok to merge without irrelevant commits in the history. \r\n\r\nNow i understand the branching and new branch for a pull request workflow... sorry for being slow to get it. "}}