GitHub PullRequestReviewCommentEvent at 2014-04-14 19:54:31
Repository: varify
Actor: naegelyd
Payload: {"comment":{"url":"https://api.github.com/repos/cbmi/varify/pulls/comments/11604252","id":11604252,"diff_hunk":"@@ -302,7 +302,30 @@ define([\n                         }\n \n                         if (eff.hgvs_p || eff.amino_acid_change) {\n-                            content.push('<li>' + (eff.hgvs_p || eff.amino_acid_change) + '</li>');\n+                            // Create dictionary of possible changes for hgvs_p\n+                            var changes = {\n+                                \"Non-Polar\": \"IFVLWMAGP\",\n+                                \"Polar\": \"CYTSNQ\",\n+                                \"Negative\": \"ED\",\n+                                \"Positive\": \"HKR\"\n+                            }\n+                            // Construct the string\n+                            var change_string = \"\";\n+                            // Check if there was a change in the hgvs_p\n+                            for (var change in changes){\n+                                if (changes[change].indexOf(eff.hgvs_p[2]) != -1)\n+                                    change_string += change;\n+                            }\n+                            for (var change in changes){\n+                                if (changes[change].indexOf(eff.hgvs_p[eff.hgvs_p.length-1]) != -1)\n+                                    change_string += \"&#8594\"+change;\n+                            }\n+                            // If there is no change, display nothing\n+                            if (change_string.length <= changes['Non-Polar'].length)\n+                                change_string = \"\";\n+\n+                            content.push('<li>' + (eff.hgvs_p || eff.amino_acid_change)\n+                                    + \"<br>\" + change_string + '</li>');","path":"varify/static/js/src/ui/modals/result.js","position":28,"original_position":28,"commit_id":"78b368ab8bdfc8ac94ba23f3f1fd98b34f3bddaa","original_commit_id":"78b368ab8bdfc8ac94ba23f3f1fd98b34f3bddaa","user":{"login":"naegelyd","id":3911912,"avatar_url":"https://avatars.githubusercontent.com/u/3911912?","gravatar_id":"f2b6f2cec914521893ab3f5de23d1a4c","url":"https://api.github.com/users/naegelyd","html_url":"https://github.com/naegelyd","followers_url":"https://api.github.com/users/naegelyd/followers","following_url":"https://api.github.com/users/naegelyd/following{/other_user}","gists_url":"https://api.github.com/users/naegelyd/gists{/gist_id}","starred_url":"https://api.github.com/users/naegelyd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naegelyd/subscriptions","organizations_url":"https://api.github.com/users/naegelyd/orgs","repos_url":"https://api.github.com/users/naegelyd/repos","events_url":"https://api.github.com/users/naegelyd/events{/privacy}","received_events_url":"https://api.github.com/users/naegelyd/received_events","type":"User","site_admin":false},"body":"Use single quotes","created_at":"2014-04-14T19:54:31Z","updated_at":"2014-04-14T19:54:31Z","html_url":"https://github.com/cbmi/varify/pull/250#discussion_r11604252","pull_request_url":"https://api.github.com/repos/cbmi/varify/pulls/250","_links":{"self":{"href":"https://api.github.com/repos/cbmi/varify/pulls/comments/11604252"},"html":{"href":"https://github.com/cbmi/varify/pull/250#discussion_r11604252"},"pull_request":{"href":"https://api.github.com/repos/cbmi/varify/pulls/250"}}}}