{"action":"created","comment":{"url":"https://api.github.com/repos/osuosl/pgd/pulls/comments/38163595","id":38163595,"diff_hunk":"@@ -329,3 +337,61 @@ def test_crosscheck_cullpdb(self):\n \n         good_out = MonkeyPatch.sitefile('cullpdb_crosscheck.txt')\n         self.assertEqual(test_out, file(good_out).read())\n+\n+\n+from unittest import TestCase as TCase\n+from Bio.PDB import *\n+\n+PRO_MIN = -1\n+PRO_MAX = 3\n+FIELDS = ['a1','a2','a3','a4','a5','a6','a7','L1','L2','L3','L4','L5','phi','psi','ome','chi1','chi2','chi3','chi4','chi5','bm','bs','bg','h_bond_energy','zeta']\n+FIELDS_DICT = {}\n+\n+for i in range(1, len(FIELDS)+1):\n+    #shift values into decimels\n+    FIELDS_DICT[FIELDS[i-1]] = i*.01\n+\n+\n+class OccTest(TCase):\n+\n+    def yield_altid(self, alt_structure) :\n+        for ichain in alt_structure[0] :\n+            for ires in ichain :\n+                if ires.is_disordered():\n+                    res_sum = {}\n+                    count_sum = {}\n+                    for atom in ires :\n+                        if atom.is_disordered():\n+                            try :\n+                                res_sum[ atom.get_altloc() ] = res_sum[atom.get_altloc()] + atom.get_occupancy()\n+                            except KeyError :\n+                                res_sum[atom.get_altloc()] = atom.get_occupancy()\n+                            try :\n+                                count_sum[atom.get_altloc()] = count_sum[atom.get_altloc()]+1\n+                            except KeyError :\n+                                count_sum[atom.get_altloc()] = 1\n+\n+                    avg_dict = {}\n+                    for k,v in res_sum.iteritems() :\n+                        avg_dict[k] = res_sum[k]/count_sum[k]\n+\n+                    keepAltID = max(k for k, v in avg_dict.iteritems())\n+                    yield keepAltID\n+\n+\n+    def test_compare_struccture(self):","path":"pgd_splicer/tests.py","position":61,"original_position":61,"commit_id":"47a33f7cfadc67cf392ee3bbf4b82cc1ee40a48a","original_commit_id":"47a33f7cfadc67cf392ee3bbf4b82cc1ee40a48a","user":{"login":"Sentient07","id":6195312,"avatar_url":"https://avatars.githubusercontent.com/u/6195312?v=3","gravatar_id":"","url":"https://api.github.com/users/Sentient07","html_url":"https://github.com/Sentient07","followers_url":"https://api.github.com/users/Sentient07/followers","following_url":"https://api.github.com/users/Sentient07/following{/other_user}","gists_url":"https://api.github.com/users/Sentient07/gists{/gist_id}","starred_url":"https://api.github.com/users/Sentient07/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sentient07/subscriptions","organizations_url":"https://api.github.com/users/Sentient07/orgs","repos_url":"https://api.github.com/users/Sentient07/repos","events_url":"https://api.github.com/users/Sentient07/events{/privacy}","received_events_url":"https://api.github.com/users/Sentient07/received_events","type":"User","site_admin":false},"body":"Will correct it. Sublime actually autocompleted the method name for me, so went unnoticed ","created_at":"2015-08-28T01:04:25Z","updated_at":"2015-08-28T01:04:25Z","html_url":"https://github.com/osuosl/pgd/pull/32#discussion_r38163595","pull_request_url":"https://api.github.com/repos/osuosl/pgd/pulls/32","_links":{"self":{"href":"https://api.github.com/repos/osuosl/pgd/pulls/comments/38163595"},"html":{"href":"https://github.com/osuosl/pgd/pull/32#discussion_r38163595"},"pull_request":{"href":"https://api.github.com/repos/osuosl/pgd/pulls/32"}}},"pull_request":{"url":"https://api.github.com/repos/osuosl/pgd/pulls/32","id":37945046,"html_url":"https://github.com/osuosl/pgd/pull/32","diff_url":"https://github.com/osuosl/pgd/pull/32.diff","patch_url":"https://github.com/osuosl/pgd/pull/32.patch","issue_url":"https://api.github.com/repos/osuosl/pgd/issues/32","number":32,"state":"open","locked":false,"title":"Occupancy feature","user":{"login":"Sentient07","id":6195312,"avatar_url":"https://avatars.githubusercontent.com/u/6195312?v=3","gravatar_id":"","url":"https://api.github.com/users/Sentient07","html_url":"https://github.com/Sentient07","followers_url":"https://api.github.com/users/Sentient07/followers","following_url":"https://api.github.com/users/Sentient07/following{/other_user}","gists_url":"https://api.github.com/users/Sentient07/gists{/gist_id}","starred_url":"https://api.github.com/users/Sentient07/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sentient07/subscriptions","organizations_url":"https://api.github.com/users/Sentient07/orgs","repos_url":"https://api.github.com/users/Sentient07/repos","events_url":"https://api.github.com/users/Sentient07/events{/privacy}","received_events_url":"https://api.github.com/users/Sentient07/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-17T20:48:25Z","updated_at":"2015-08-28T01:04:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9014dd26f4bcbdb5fa5175085ab821d8b51b3c87","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/osuosl/pgd/pulls/32/commits","review_comments_url":"https://api.github.com/repos/osuosl/pgd/pulls/32/comments","review_comment_url":"https://api.github.com/repos/osuosl/pgd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/osuosl/pgd/issues/32/comments","statuses_url":"https://api.github.com/repos/osuosl/pgd/statuses/47a33f7cfadc67cf392ee3bbf4b82cc1ee40a48a","head":{"label":"Sentient07:occupancy-feature","ref":"occupancy-feature","sha":"47a33f7cfadc67cf392ee3bbf4b82cc1ee40a48a","user":{"login":"Sentient07","id":6195312,"avatar_url":"https://avatars.githubusercontent.com/u/6195312?v=3","gravatar_id":"","url":"https://api.github.com/users/Sentient07","html_url":"https://github.com/Sentient07","followers_url":"https://api.github.com/users/Sentient07/followers","following_url":"https://api.github.com/users/Sentient07/following{/other_user}","gists_url":"https://api.github.com/users/Sentient07/gists{/gist_id}","starred_url":"https://api.github.com/users/Sentient07/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sentient07/subscriptions","organizations_url":"https://api.github.com/users/Sentient07/orgs","repos_url":"https://api.github.com/users/Sentient07/repos","events_url":"https://api.github.com/users/Sentient07/events{/privacy}","received_events_url":"https://api.github.com/users/Sentient07/received_events","type":"User","site_admin":false},"repo":{"id":32860455,"name":"pgd","full_name":"Sentient07/pgd","owner":{"login":"Sentient07","id":6195312,"avatar_url":"https://avatars.githubusercontent.com/u/6195312?v=3","gravatar_id":"","url":"https://api.github.com/users/Sentient07","html_url":"https://github.com/Sentient07","followers_url":"https://api.github.com/users/Sentient07/followers","following_url":"https://api.github.com/users/Sentient07/following{/other_user}","gists_url":"https://api.github.com/users/Sentient07/gists{/gist_id}","starred_url":"https://api.github.com/users/Sentient07/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sentient07/subscriptions","organizations_url":"https://api.github.com/users/Sentient07/orgs","repos_url":"https://api.github.com/users/Sentient07/repos","events_url":"https://api.github.com/users/Sentient07/events{/privacy}","received_events_url":"https://api.github.com/users/Sentient07/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Sentient07/pgd","description":"The Protein Geometry Database.","fork":true,"url":"https://api.github.com/repos/Sentient07/pgd","forks_url":"https://api.github.com/repos/Sentient07/pgd/forks","keys_url":"https://api.github.com/repos/Sentient07/pgd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Sentient07/pgd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Sentient07/pgd/teams","hooks_url":"https://api.github.com/repos/Sentient07/pgd/hooks","issue_events_url":"https://api.github.com/repos/Sentient07/pgd/issues/events{/number}","events_url":"https://api.github.com/repos/Sentient07/pgd/events","assignees_url":"https://api.github.com/repos/Sentient07/pgd/assignees{/user}","branches_url":"https://api.github.com/repos/Sentient07/pgd/branches{/branch}","tags_url":"https://api.github.com/repos/Sentient07/pgd/tags","blobs_url":"https://api.github.com/repos/Sentient07/pgd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Sentient07/pgd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Sentient07/pgd/git/refs{/sha}","trees_url":"https://api.github.com/repos/Sentient07/pgd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Sentient07/pgd/statuses/{sha}","languages_url":"https://api.github.com/repos/Sentient07/pgd/languages","stargazers_url":"https://api.github.com/repos/Sentient07/pgd/stargazers","contributors_url":"https://api.github.com/repos/Sentient07/pgd/contributors","subscribers_url":"https://api.github.com/repos/Sentient07/pgd/subscribers","subscription_url":"https://api.github.com/repos/Sentient07/pgd/subscription","commits_url":"https://api.github.com/repos/Sentient07/pgd/commits{/sha}","git_commits_url":"https://api.github.com/repos/Sentient07/pgd/git/commits{/sha}","comments_url":"https://api.github.com/repos/Sentient07/pgd/comments{/number}","issue_comment_url":"https://api.github.com/repos/Sentient07/pgd/issues/comments{/number}","contents_url":"https://api.github.com/repos/Sentient07/pgd/contents/{+path}","compare_url":"https://api.github.com/repos/Sentient07/pgd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Sentient07/pgd/merges","archive_url":"https://api.github.com/repos/Sentient07/pgd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Sentient07/pgd/downloads","issues_url":"https://api.github.com/repos/Sentient07/pgd/issues{/number}","pulls_url":"https://api.github.com/repos/Sentient07/pgd/pulls{/number}","milestones_url":"https://api.github.com/repos/Sentient07/pgd/milestones{/number}","notifications_url":"https://api.github.com/repos/Sentient07/pgd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Sentient07/pgd/labels{/name}","releases_url":"https://api.github.com/repos/Sentient07/pgd/releases{/id}","created_at":"2015-03-25T11:29:33Z","updated_at":"2015-03-25T11:29:34Z","pushed_at":"2015-08-27T13:37:56Z","git_url":"git://github.com/Sentient07/pgd.git","ssh_url":"git@github.com:Sentient07/pgd.git","clone_url":"https://github.com/Sentient07/pgd.git","svn_url":"https://github.com/Sentient07/pgd","homepage":null,"size":11819,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"osuosl:develop","ref":"develop","sha":"4b7d5ec7528e98fbf3f9bfb05a848565432f15d3","user":{"login":"osuosl","id":1380625,"avatar_url":"https://avatars.githubusercontent.com/u/1380625?v=3","gravatar_id":"","url":"https://api.github.com/users/osuosl","html_url":"https://github.com/osuosl","followers_url":"https://api.github.com/users/osuosl/followers","following_url":"https://api.github.com/users/osuosl/following{/other_user}","gists_url":"https://api.github.com/users/osuosl/gists{/gist_id}","starred_url":"https://api.github.com/users/osuosl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osuosl/subscriptions","organizations_url":"https://api.github.com/users/osuosl/orgs","repos_url":"https://api.github.com/users/osuosl/repos","events_url":"https://api.github.com/users/osuosl/events{/privacy}","received_events_url":"https://api.github.com/users/osuosl/received_events","type":"Organization","site_admin":false},"repo":{"id":24602581,"name":"pgd","full_name":"osuosl/pgd","owner":{"login":"osuosl","id":1380625,"avatar_url":"https://avatars.githubusercontent.com/u/1380625?v=3","gravatar_id":"","url":"https://api.github.com/users/osuosl","html_url":"https://github.com/osuosl","followers_url":"https://api.github.com/users/osuosl/followers","following_url":"https://api.github.com/users/osuosl/following{/other_user}","gists_url":"https://api.github.com/users/osuosl/gists{/gist_id}","starred_url":"https://api.github.com/users/osuosl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osuosl/subscriptions","organizations_url":"https://api.github.com/users/osuosl/orgs","repos_url":"https://api.github.com/users/osuosl/repos","events_url":"https://api.github.com/users/osuosl/events{/privacy}","received_events_url":"https://api.github.com/users/osuosl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/osuosl/pgd","description":"The Protein Geometry Database.","fork":false,"url":"https://api.github.com/repos/osuosl/pgd","forks_url":"https://api.github.com/repos/osuosl/pgd/forks","keys_url":"https://api.github.com/repos/osuosl/pgd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/osuosl/pgd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/osuosl/pgd/teams","hooks_url":"https://api.github.com/repos/osuosl/pgd/hooks","issue_events_url":"https://api.github.com/repos/osuosl/pgd/issues/events{/number}","events_url":"https://api.github.com/repos/osuosl/pgd/events","assignees_url":"https://api.github.com/repos/osuosl/pgd/assignees{/user}","branches_url":"https://api.github.com/repos/osuosl/pgd/branches{/branch}","tags_url":"https://api.github.com/repos/osuosl/pgd/tags","blobs_url":"https://api.github.com/repos/osuosl/pgd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/osuosl/pgd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/osuosl/pgd/git/refs{/sha}","trees_url":"https://api.github.com/repos/osuosl/pgd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/osuosl/pgd/statuses/{sha}","languages_url":"https://api.github.com/repos/osuosl/pgd/languages","stargazers_url":"https://api.github.com/repos/osuosl/pgd/stargazers","contributors_url":"https://api.github.com/repos/osuosl/pgd/contributors","subscribers_url":"https://api.github.com/repos/osuosl/pgd/subscribers","subscription_url":"https://api.github.com/repos/osuosl/pgd/subscription","commits_url":"https://api.github.com/repos/osuosl/pgd/commits{/sha}","git_commits_url":"https://api.github.com/repos/osuosl/pgd/git/commits{/sha}","comments_url":"https://api.github.com/repos/osuosl/pgd/comments{/number}","issue_comment_url":"https://api.github.com/repos/osuosl/pgd/issues/comments{/number}","contents_url":"https://api.github.com/repos/osuosl/pgd/contents/{+path}","compare_url":"https://api.github.com/repos/osuosl/pgd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/osuosl/pgd/merges","archive_url":"https://api.github.com/repos/osuosl/pgd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/osuosl/pgd/downloads","issues_url":"https://api.github.com/repos/osuosl/pgd/issues{/number}","pulls_url":"https://api.github.com/repos/osuosl/pgd/pulls{/number}","milestones_url":"https://api.github.com/repos/osuosl/pgd/milestones{/number}","notifications_url":"https://api.github.com/repos/osuosl/pgd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/osuosl/pgd/labels{/name}","releases_url":"https://api.github.com/repos/osuosl/pgd/releases{/id}","created_at":"2014-09-29T16:12:35Z","updated_at":"2015-06-07T20:09:20Z","pushed_at":"2015-08-27T13:38:01Z","git_url":"git://github.com/osuosl/pgd.git","ssh_url":"git@github.com:osuosl/pgd.git","clone_url":"https://github.com/osuosl/pgd.git","svn_url":"https://github.com/osuosl/pgd","homepage":null,"size":11987,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":7,"forks":3,"open_issues":7,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/osuosl/pgd/pulls/32"},"html":{"href":"https://github.com/osuosl/pgd/pull/32"},"issue":{"href":"https://api.github.com/repos/osuosl/pgd/issues/32"},"comments":{"href":"https://api.github.com/repos/osuosl/pgd/issues/32/comments"},"review_comments":{"href":"https://api.github.com/repos/osuosl/pgd/pulls/32/comments"},"review_comment":{"href":"https://api.github.com/repos/osuosl/pgd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/osuosl/pgd/pulls/32/commits"},"statuses":{"href":"https://api.github.com/repos/osuosl/pgd/statuses/47a33f7cfadc67cf392ee3bbf4b82cc1ee40a48a"}}}}