{"action":"created","comment":{"url":"https://api.github.com/repos/ga4gh/server/pulls/comments/57319137","id":57319137,"diff_hunk":"@@ -0,0 +1,321 @@\n+\"\"\"\n+Object representation of GFF3 data and parser for GFF3 files.\n+\n+See: http://www.sequenceontology.org/gff3.shtml\n+\"\"\"\n+\n+from __future__ import division\n+from __future__ import print_function\n+from __future__ import unicode_literals\n+\n+import urllib\n+import copy\n+import re\n+import gzip\n+import bz2\n+import collections\n+\n+GFF3_HEADER = \"##gff-version 3\"\n+\n+\n+class GFF3Exception(Exception):\n+    \"\"\"\n+    Exception associated with GFF3 data.\n+    \"\"\"\n+    def __init__(self, message, fileName=None, lineNumber=None):\n+        if fileName is not None:\n+            message = \"{}:{}: {}\".format(fileName, lineNumber, message)\n+        super(GFF3Exception, self).__init__(message)\n+\n+# characters forcing encode for columns\n+_encodeColReStr = \"\\t|\\n|\\r|%|[\\x00-\\x1F]|\\x7f\"\n+_encodeColRe = re.compile(_encodeColReStr)\n+\n+# characters forcing encode for attribute names or values\n+_encodeAttrReStr = _encodeColReStr + \"|;|=|&|,\"\n+_encodeAttrRe = re.compile(_encodeAttrReStr)\n+\n+\n+def _encodeCol(v):\n+    \"\"\"\n+    Encode a column if is has special characters.\n+    \"\"\"\n+    if _encodeColRe.search(v):\n+        return urllib.quote(v)\n+    else:\n+        return v\n+\n+\n+def _encodeAttr(v):\n+    \"\"\"\n+    Encode a attribute name or value if is has special characters.\n+    \"\"\"\n+    if _encodeAttrRe.search(v):\n+        return urllib.quote(v)\n+    else:\n+        return v\n+\n+\n+class Feature(object):\n+    \"\"\"\n+    One feature notation from a GFF3, missing attribute, as code by `.' in\n+    the file are stored as None.\n+    \"\"\"\n+\n+    __slots__ = (\"seqname\", \"source\", \"type\", \"start\", \"end\", \"score\",","path":"ga4gh/gff3Parser.py","position":65,"original_position":65,"commit_id":"d2905a7085e238a178b9ec95928657b53c7c0469","original_commit_id":"78493d2a190e2916c736c5ac63b1b23a1f91ff0f","user":{"login":"diekhans","id":110053,"avatar_url":"https://avatars.githubusercontent.com/u/110053?v=3","gravatar_id":"","url":"https://api.github.com/users/diekhans","html_url":"https://github.com/diekhans","followers_url":"https://api.github.com/users/diekhans/followers","following_url":"https://api.github.com/users/diekhans/following{/other_user}","gists_url":"https://api.github.com/users/diekhans/gists{/gist_id}","starred_url":"https://api.github.com/users/diekhans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diekhans/subscriptions","organizations_url":"https://api.github.com/users/diekhans/orgs","repos_url":"https://api.github.com/users/diekhans/repos","events_url":"https://api.github.com/users/diekhans/events{/privacy}","received_events_url":"https://api.github.com/users/diekhans/received_events","type":"User","site_admin":false},"body":"\nI am not arguing for against anything, just explaining.  You are\nfree to do what you like.  I am religions about documenting the\nnon-obvious,  I am just surprise this is non-obvious; but I tend\nto read language specifications.\n\nJerome Kelleher <notifications@github.com> writes:\n> Not that I know of, but it's sufficiently different from the rest of the code\n> to require a note on the point. It's better to be up front with the reader and\n> explain the rationale for something rather than have them try to guess.\n> \n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly or view it on GitHub*\n> \n","created_at":"2016-03-24T13:55:40Z","updated_at":"2016-03-24T13:55:40Z","html_url":"https://github.com/ga4gh/server/pull/999#discussion_r57319137","pull_request_url":"https://api.github.com/repos/ga4gh/server/pulls/999","_links":{"self":{"href":"https://api.github.com/repos/ga4gh/server/pulls/comments/57319137"},"html":{"href":"https://github.com/ga4gh/server/pull/999#discussion_r57319137"},"pull_request":{"href":"https://api.github.com/repos/ga4gh/server/pulls/999"}}},"pull_request":{"url":"https://api.github.com/repos/ga4gh/server/pulls/999","id":63439698,"html_url":"https://github.com/ga4gh/server/pull/999","diff_url":"https://github.com/ga4gh/server/pull/999.diff","patch_url":"https://github.com/ga4gh/server/pull/999.patch","issue_url":"https://api.github.com/repos/ga4gh/server/issues/999","number":999,"state":"open","locked":false,"title":"Sequence annotation restart, take 3","user":{"login":"macieksmuga","id":6685511,"avatar_url":"https://avatars.githubusercontent.com/u/6685511?v=3","gravatar_id":"","url":"https://api.github.com/users/macieksmuga","html_url":"https://github.com/macieksmuga","followers_url":"https://api.github.com/users/macieksmuga/followers","following_url":"https://api.github.com/users/macieksmuga/following{/other_user}","gists_url":"https://api.github.com/users/macieksmuga/gists{/gist_id}","starred_url":"https://api.github.com/users/macieksmuga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macieksmuga/subscriptions","organizations_url":"https://api.github.com/users/macieksmuga/orgs","repos_url":"https://api.github.com/users/macieksmuga/repos","events_url":"https://api.github.com/users/macieksmuga/events{/privacy}","received_events_url":"https://api.github.com/users/macieksmuga/received_events","type":"User","site_admin":false},"body":"Update: I squashed and rebased against the latest (March 18) master.\r\n\r\nThis PR brings the sequence annotation API to reference server, as driven by a sqlite database backend.\r\nIt includes:\r\n\r\n- Sequence Annotations objects in protocols and `datamodel`,\r\n- Integration of Sequence annotations endpoints to all relevant parts of the server codebase,\r\n- A generic lightweight SQLite3 backend,\r\n- A GFF3 (sequence annotation file format) parser into the DB backend format,\r\n- All relevant tests,\r\n- Simple data repository manager extension to handle the new data types.","created_at":"2016-03-18T21:36:30Z","updated_at":"2016-03-24T13:55:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"317e5a7ff72b997aa26905d6a540d52d19aeef5d","assignee":{"login":"macieksmuga","id":6685511,"avatar_url":"https://avatars.githubusercontent.com/u/6685511?v=3","gravatar_id":"","url":"https://api.github.com/users/macieksmuga","html_url":"https://github.com/macieksmuga","followers_url":"https://api.github.com/users/macieksmuga/followers","following_url":"https://api.github.com/users/macieksmuga/following{/other_user}","gists_url":"https://api.github.com/users/macieksmuga/gists{/gist_id}","starred_url":"https://api.github.com/users/macieksmuga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macieksmuga/subscriptions","organizations_url":"https://api.github.com/users/macieksmuga/orgs","repos_url":"https://api.github.com/users/macieksmuga/repos","events_url":"https://api.github.com/users/macieksmuga/events{/privacy}","received_events_url":"https://api.github.com/users/macieksmuga/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/ga4gh/server/pulls/999/commits","review_comments_url":"https://api.github.com/repos/ga4gh/server/pulls/999/comments","review_comment_url":"https://api.github.com/repos/ga4gh/server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ga4gh/server/issues/999/comments","statuses_url":"https://api.github.com/repos/ga4gh/server/statuses/d2905a7085e238a178b9ec95928657b53c7c0469","head":{"label":"macieksmuga:sequence-annotation-starter4","ref":"sequence-annotation-starter4","sha":"d2905a7085e238a178b9ec95928657b53c7c0469","user":{"login":"macieksmuga","id":6685511,"avatar_url":"https://avatars.githubusercontent.com/u/6685511?v=3","gravatar_id":"","url":"https://api.github.com/users/macieksmuga","html_url":"https://github.com/macieksmuga","followers_url":"https://api.github.com/users/macieksmuga/followers","following_url":"https://api.github.com/users/macieksmuga/following{/other_user}","gists_url":"https://api.github.com/users/macieksmuga/gists{/gist_id}","starred_url":"https://api.github.com/users/macieksmuga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macieksmuga/subscriptions","organizations_url":"https://api.github.com/users/macieksmuga/orgs","repos_url":"https://api.github.com/users/macieksmuga/repos","events_url":"https://api.github.com/users/macieksmuga/events{/privacy}","received_events_url":"https://api.github.com/users/macieksmuga/received_events","type":"User","site_admin":false},"repo":{"id":30611010,"name":"server","full_name":"macieksmuga/server","owner":{"login":"macieksmuga","id":6685511,"avatar_url":"https://avatars.githubusercontent.com/u/6685511?v=3","gravatar_id":"","url":"https://api.github.com/users/macieksmuga","html_url":"https://github.com/macieksmuga","followers_url":"https://api.github.com/users/macieksmuga/followers","following_url":"https://api.github.com/users/macieksmuga/following{/other_user}","gists_url":"https://api.github.com/users/macieksmuga/gists{/gist_id}","starred_url":"https://api.github.com/users/macieksmuga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macieksmuga/subscriptions","organizations_url":"https://api.github.com/users/macieksmuga/orgs","repos_url":"https://api.github.com/users/macieksmuga/repos","events_url":"https://api.github.com/users/macieksmuga/events{/privacy}","received_events_url":"https://api.github.com/users/macieksmuga/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/macieksmuga/server","description":"A reference implementation of the APIs defined in the schemas repository.","fork":true,"url":"https://api.github.com/repos/macieksmuga/server","forks_url":"https://api.github.com/repos/macieksmuga/server/forks","keys_url":"https://api.github.com/repos/macieksmuga/server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/macieksmuga/server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/macieksmuga/server/teams","hooks_url":"https://api.github.com/repos/macieksmuga/server/hooks","issue_events_url":"https://api.github.com/repos/macieksmuga/server/issues/events{/number}","events_url":"https://api.github.com/repos/macieksmuga/server/events","assignees_url":"https://api.github.com/repos/macieksmuga/server/assignees{/user}","branches_url":"https://api.github.com/repos/macieksmuga/server/branches{/branch}","tags_url":"https://api.github.com/repos/macieksmuga/server/tags","blobs_url":"https://api.github.com/repos/macieksmuga/server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/macieksmuga/server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/macieksmuga/server/git/refs{/sha}","trees_url":"https://api.github.com/repos/macieksmuga/server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/macieksmuga/server/statuses/{sha}","languages_url":"https://api.github.com/repos/macieksmuga/server/languages","stargazers_url":"https://api.github.com/repos/macieksmuga/server/stargazers","contributors_url":"https://api.github.com/repos/macieksmuga/server/contributors","subscribers_url":"https://api.github.com/repos/macieksmuga/server/subscribers","subscription_url":"https://api.github.com/repos/macieksmuga/server/subscription","commits_url":"https://api.github.com/repos/macieksmuga/server/commits{/sha}","git_commits_url":"https://api.github.com/repos/macieksmuga/server/git/commits{/sha}","comments_url":"https://api.github.com/repos/macieksmuga/server/comments{/number}","issue_comment_url":"https://api.github.com/repos/macieksmuga/server/issues/comments{/number}","contents_url":"https://api.github.com/repos/macieksmuga/server/contents/{+path}","compare_url":"https://api.github.com/repos/macieksmuga/server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/macieksmuga/server/merges","archive_url":"https://api.github.com/repos/macieksmuga/server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/macieksmuga/server/downloads","issues_url":"https://api.github.com/repos/macieksmuga/server/issues{/number}","pulls_url":"https://api.github.com/repos/macieksmuga/server/pulls{/number}","milestones_url":"https://api.github.com/repos/macieksmuga/server/milestones{/number}","notifications_url":"https://api.github.com/repos/macieksmuga/server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/macieksmuga/server/labels{/name}","releases_url":"https://api.github.com/repos/macieksmuga/server/releases{/id}","deployments_url":"https://api.github.com/repos/macieksmuga/server/deployments","created_at":"2015-02-10T19:44:42Z","updated_at":"2016-01-20T01:33:21Z","pushed_at":"2016-03-23T19:03:55Z","git_url":"git://github.com/macieksmuga/server.git","ssh_url":"git@github.com:macieksmuga/server.git","clone_url":"https://github.com/macieksmuga/server.git","svn_url":"https://github.com/macieksmuga/server","homepage":null,"size":4784,"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":"ga4gh:sequence-annotation","ref":"sequence-annotation","sha":"074606d5b1654ef9a58e390311614a3f103d8628","user":{"login":"ga4gh","id":6921777,"avatar_url":"https://avatars.githubusercontent.com/u/6921777?v=3","gravatar_id":"","url":"https://api.github.com/users/ga4gh","html_url":"https://github.com/ga4gh","followers_url":"https://api.github.com/users/ga4gh/followers","following_url":"https://api.github.com/users/ga4gh/following{/other_user}","gists_url":"https://api.github.com/users/ga4gh/gists{/gist_id}","starred_url":"https://api.github.com/users/ga4gh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga4gh/subscriptions","organizations_url":"https://api.github.com/users/ga4gh/orgs","repos_url":"https://api.github.com/users/ga4gh/repos","events_url":"https://api.github.com/users/ga4gh/events{/privacy}","received_events_url":"https://api.github.com/users/ga4gh/received_events","type":"Organization","site_admin":false},"repo":{"id":22882621,"name":"server","full_name":"ga4gh/server","owner":{"login":"ga4gh","id":6921777,"avatar_url":"https://avatars.githubusercontent.com/u/6921777?v=3","gravatar_id":"","url":"https://api.github.com/users/ga4gh","html_url":"https://github.com/ga4gh","followers_url":"https://api.github.com/users/ga4gh/followers","following_url":"https://api.github.com/users/ga4gh/following{/other_user}","gists_url":"https://api.github.com/users/ga4gh/gists{/gist_id}","starred_url":"https://api.github.com/users/ga4gh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga4gh/subscriptions","organizations_url":"https://api.github.com/users/ga4gh/orgs","repos_url":"https://api.github.com/users/ga4gh/repos","events_url":"https://api.github.com/users/ga4gh/events{/privacy}","received_events_url":"https://api.github.com/users/ga4gh/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ga4gh/server","description":"A reference implementation of the APIs defined in the schemas repository.","fork":false,"url":"https://api.github.com/repos/ga4gh/server","forks_url":"https://api.github.com/repos/ga4gh/server/forks","keys_url":"https://api.github.com/repos/ga4gh/server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ga4gh/server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ga4gh/server/teams","hooks_url":"https://api.github.com/repos/ga4gh/server/hooks","issue_events_url":"https://api.github.com/repos/ga4gh/server/issues/events{/number}","events_url":"https://api.github.com/repos/ga4gh/server/events","assignees_url":"https://api.github.com/repos/ga4gh/server/assignees{/user}","branches_url":"https://api.github.com/repos/ga4gh/server/branches{/branch}","tags_url":"https://api.github.com/repos/ga4gh/server/tags","blobs_url":"https://api.github.com/repos/ga4gh/server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ga4gh/server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ga4gh/server/git/refs{/sha}","trees_url":"https://api.github.com/repos/ga4gh/server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ga4gh/server/statuses/{sha}","languages_url":"https://api.github.com/repos/ga4gh/server/languages","stargazers_url":"https://api.github.com/repos/ga4gh/server/stargazers","contributors_url":"https://api.github.com/repos/ga4gh/server/contributors","subscribers_url":"https://api.github.com/repos/ga4gh/server/subscribers","subscription_url":"https://api.github.com/repos/ga4gh/server/subscription","commits_url":"https://api.github.com/repos/ga4gh/server/commits{/sha}","git_commits_url":"https://api.github.com/repos/ga4gh/server/git/commits{/sha}","comments_url":"https://api.github.com/repos/ga4gh/server/comments{/number}","issue_comment_url":"https://api.github.com/repos/ga4gh/server/issues/comments{/number}","contents_url":"https://api.github.com/repos/ga4gh/server/contents/{+path}","compare_url":"https://api.github.com/repos/ga4gh/server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ga4gh/server/merges","archive_url":"https://api.github.com/repos/ga4gh/server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ga4gh/server/downloads","issues_url":"https://api.github.com/repos/ga4gh/server/issues{/number}","pulls_url":"https://api.github.com/repos/ga4gh/server/pulls{/number}","milestones_url":"https://api.github.com/repos/ga4gh/server/milestones{/number}","notifications_url":"https://api.github.com/repos/ga4gh/server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ga4gh/server/labels{/name}","releases_url":"https://api.github.com/repos/ga4gh/server/releases{/id}","deployments_url":"https://api.github.com/repos/ga4gh/server/deployments","created_at":"2014-08-12T15:31:49Z","updated_at":"2016-03-21T14:16:46Z","pushed_at":"2016-03-24T13:48:08Z","git_url":"git://github.com/ga4gh/server.git","ssh_url":"git@github.com:ga4gh/server.git","clone_url":"https://github.com/ga4gh/server.git","svn_url":"https://github.com/ga4gh/server","homepage":null,"size":8084,"stargazers_count":53,"watchers_count":53,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":80,"mirror_url":null,"open_issues_count":129,"forks":80,"open_issues":129,"watchers":53,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ga4gh/server/pulls/999"},"html":{"href":"https://github.com/ga4gh/server/pull/999"},"issue":{"href":"https://api.github.com/repos/ga4gh/server/issues/999"},"comments":{"href":"https://api.github.com/repos/ga4gh/server/issues/999/comments"},"review_comments":{"href":"https://api.github.com/repos/ga4gh/server/pulls/999/comments"},"review_comment":{"href":"https://api.github.com/repos/ga4gh/server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ga4gh/server/pulls/999/commits"},"statuses":{"href":"https://api.github.com/repos/ga4gh/server/statuses/d2905a7085e238a178b9ec95928657b53c7c0469"}}}}