{"action":"created","comment":{"url":"https://api.github.com/repos/biogo/biogo/pulls/comments/23421722","id":23421722,"diff_hunk":"@@ -0,0 +1,125 @@\n+// Copyright ©2012 The bíogo Authors. All rights reserved.\n+// Use of this source code is governed by a BSD-style\n+// license that can be found in the LICENSE file.\n+\n+// Package gene contains the types and methods to handle the definition of a\n+// gene. It is under intense debate what is the exact definition of a gene.\n+// To learn more about the alternative definitions and the problems that can\n+// arise see http://genome.cshlp.org/content/17/6/669.full. In this package we\n+// use the definition proposed in above the manuscript; a gene is a union\n+// of genomic sequences encoding a coherent set of potentially overlapping\n+// functional products. Since the package is located under the seqfeature\n+// namespace, we also make the assumption that a gene corresponds to a\n+// specific genomic area (has genomic coordinates) and may have a collection\n+// of transcripts attached to it.\n+package gene\n+\n+import (\n+\t\"code.google.com/p/biogo/feat\"\n+\n+\t\"errors\"\n+)\n+\n+// Assert that interfaces are satisfied\n+var (\n+\t_ feat.Feature = (*Gene)(nil)\n+\t_ Gener        = (*Gene)(nil)\n+)\n+\n+// Gener defines the gene interface.\n+type Gener interface {\n+\tfeat.Feature\n+\tfeat.Orienter\n+\tFeatures() []feat.Feature\n+\tTranscripts() []Transcripter\n+}\n+\n+// A Gene occupies a specific area on the genome and may have 0 or more\n+// transcripts attached to it. The area that a gene occupies is defined by the\n+// corresponding areas that its transcripts occupy.\n+type Gene struct {\n+\tId               string\n+\tChrom            feat.Feature\n+\tChromStart       int\n+\tChromEnd         int\n+\tChromOrientation feat.Orientation\n+\ttranscripts      []Transcripter\n+}\n+\n+// Start returns the gene start on the chromosome.\n+func (s *Gene) Start() int { return s.ChromStart }\n+\n+// End returns the gene end on the chromosome.\n+func (s *Gene) End() int { return s.ChromEnd }\n+\n+// Len returns the length of the gene.\n+func (s *Gene) Len() int { return s.ChromEnd - s.ChromStart }\n+\n+// Name returns the gene name. Currently the same as the id.\n+func (s *Gene) Name() string { return s.Id }\n+\n+// Description returns a description for the gene.\n+func (s *Gene) Description() string { return \"gene feature\" }\n+\n+// Location returns the location of the gene. Namely the chromosome.\n+func (s *Gene) Location() feat.Feature { return s.Chrom }\n+\n+// Orientation returns the orientation of the gene.\n+func (s *Gene) Orientation() feat.Orientation { return s.ChromOrientation }\n+\n+// Transcripts returns a slice with all transcripts added to the gene.\n+func (s *Gene) Transcripts() []Transcripter { return s.transcripts }\n+\n+// Features returns all features added to the gene.\n+// Currently only transcripts are added so only transcripts are returned.\n+func (s *Gene) Features() []feat.Feature {","path":"feat/gene/gene.go","position":75,"original_position":75,"commit_id":"7ae0480cd482a51478b50f27271824c95d162c32","original_commit_id":"7ae0480cd482a51478b50f27271824c95d162c32","user":{"login":"kortschak","id":275221,"avatar_url":"https://avatars.githubusercontent.com/u/275221?v=3","gravatar_id":"","url":"https://api.github.com/users/kortschak","html_url":"https://github.com/kortschak","followers_url":"https://api.github.com/users/kortschak/followers","following_url":"https://api.github.com/users/kortschak/following{/other_user}","gists_url":"https://api.github.com/users/kortschak/gists{/gist_id}","starred_url":"https://api.github.com/users/kortschak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kortschak/subscriptions","organizations_url":"https://api.github.com/users/kortschak/orgs","repos_url":"https://api.github.com/users/kortschak/repos","events_url":"https://api.github.com/users/kortschak/events{/privacy}","received_events_url":"https://api.github.com/users/kortschak/received_events","type":"User","site_admin":false},"body":"I would remove it from the interface. I would also make the features field exported (unfortunately this means we need a different name for it). Then Add is not needed.","created_at":"2015-01-22T23:54:55Z","updated_at":"2015-01-22T23:54:55Z","html_url":"https://github.com/biogo/biogo/pull/1#discussion_r23421722","pull_request_url":"https://api.github.com/repos/biogo/biogo/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/biogo/biogo/pulls/comments/23421722"},"html":{"href":"https://github.com/biogo/biogo/pull/1#discussion_r23421722"},"pull_request":{"href":"https://api.github.com/repos/biogo/biogo/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/biogo/biogo/pulls/1","id":27642460,"html_url":"https://github.com/biogo/biogo/pull/1","diff_url":"https://github.com/biogo/biogo/pull/1.diff","patch_url":"https://github.com/biogo/biogo/pull/1.patch","issue_url":"https://api.github.com/repos/biogo/biogo/issues/1","number":1,"state":"open","locked":false,"title":"Pull request for the gene package","user":{"login":"mnsmar","id":1588709,"avatar_url":"https://avatars.githubusercontent.com/u/1588709?v=3","gravatar_id":"","url":"https://api.github.com/users/mnsmar","html_url":"https://github.com/mnsmar","followers_url":"https://api.github.com/users/mnsmar/followers","following_url":"https://api.github.com/users/mnsmar/following{/other_user}","gists_url":"https://api.github.com/users/mnsmar/gists{/gist_id}","starred_url":"https://api.github.com/users/mnsmar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnsmar/subscriptions","organizations_url":"https://api.github.com/users/mnsmar/orgs","repos_url":"https://api.github.com/users/mnsmar/repos","events_url":"https://api.github.com/users/mnsmar/events{/privacy}","received_events_url":"https://api.github.com/users/mnsmar/received_events","type":"User","site_admin":false},"body":"Contains code for genes, transcripts, exons, introns, 5'UTR, CDS and 3'UTR.","created_at":"2015-01-19T23:10:22Z","updated_at":"2015-01-22T23:54:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"102a6c8b7dfecfdfbb54e57903f98ecdbf5aa7c5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/biogo/biogo/pulls/1/commits","review_comments_url":"https://api.github.com/repos/biogo/biogo/pulls/1/comments","review_comment_url":"https://api.github.com/repos/biogo/biogo/pulls/comments/{number}","comments_url":"https://api.github.com/repos/biogo/biogo/issues/1/comments","statuses_url":"https://api.github.com/repos/biogo/biogo/statuses/7ae0480cd482a51478b50f27271824c95d162c32","head":{"label":"mnsmar:gene","ref":"gene","sha":"7ae0480cd482a51478b50f27271824c95d162c32","user":{"login":"mnsmar","id":1588709,"avatar_url":"https://avatars.githubusercontent.com/u/1588709?v=3","gravatar_id":"","url":"https://api.github.com/users/mnsmar","html_url":"https://github.com/mnsmar","followers_url":"https://api.github.com/users/mnsmar/followers","following_url":"https://api.github.com/users/mnsmar/following{/other_user}","gists_url":"https://api.github.com/users/mnsmar/gists{/gist_id}","starred_url":"https://api.github.com/users/mnsmar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnsmar/subscriptions","organizations_url":"https://api.github.com/users/mnsmar/orgs","repos_url":"https://api.github.com/users/mnsmar/repos","events_url":"https://api.github.com/users/mnsmar/events{/privacy}","received_events_url":"https://api.github.com/users/mnsmar/received_events","type":"User","site_admin":false},"repo":{"id":29501100,"name":"biogo","full_name":"mnsmar/biogo","owner":{"login":"mnsmar","id":1588709,"avatar_url":"https://avatars.githubusercontent.com/u/1588709?v=3","gravatar_id":"","url":"https://api.github.com/users/mnsmar","html_url":"https://github.com/mnsmar","followers_url":"https://api.github.com/users/mnsmar/followers","following_url":"https://api.github.com/users/mnsmar/following{/other_user}","gists_url":"https://api.github.com/users/mnsmar/gists{/gist_id}","starred_url":"https://api.github.com/users/mnsmar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnsmar/subscriptions","organizations_url":"https://api.github.com/users/mnsmar/orgs","repos_url":"https://api.github.com/users/mnsmar/repos","events_url":"https://api.github.com/users/mnsmar/events{/privacy}","received_events_url":"https://api.github.com/users/mnsmar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mnsmar/biogo","description":"GitHib code mirror for the bíogo project.","fork":true,"url":"https://api.github.com/repos/mnsmar/biogo","forks_url":"https://api.github.com/repos/mnsmar/biogo/forks","keys_url":"https://api.github.com/repos/mnsmar/biogo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mnsmar/biogo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mnsmar/biogo/teams","hooks_url":"https://api.github.com/repos/mnsmar/biogo/hooks","issue_events_url":"https://api.github.com/repos/mnsmar/biogo/issues/events{/number}","events_url":"https://api.github.com/repos/mnsmar/biogo/events","assignees_url":"https://api.github.com/repos/mnsmar/biogo/assignees{/user}","branches_url":"https://api.github.com/repos/mnsmar/biogo/branches{/branch}","tags_url":"https://api.github.com/repos/mnsmar/biogo/tags","blobs_url":"https://api.github.com/repos/mnsmar/biogo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mnsmar/biogo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mnsmar/biogo/git/refs{/sha}","trees_url":"https://api.github.com/repos/mnsmar/biogo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mnsmar/biogo/statuses/{sha}","languages_url":"https://api.github.com/repos/mnsmar/biogo/languages","stargazers_url":"https://api.github.com/repos/mnsmar/biogo/stargazers","contributors_url":"https://api.github.com/repos/mnsmar/biogo/contributors","subscribers_url":"https://api.github.com/repos/mnsmar/biogo/subscribers","subscription_url":"https://api.github.com/repos/mnsmar/biogo/subscription","commits_url":"https://api.github.com/repos/mnsmar/biogo/commits{/sha}","git_commits_url":"https://api.github.com/repos/mnsmar/biogo/git/commits{/sha}","comments_url":"https://api.github.com/repos/mnsmar/biogo/comments{/number}","issue_comment_url":"https://api.github.com/repos/mnsmar/biogo/issues/comments/{number}","contents_url":"https://api.github.com/repos/mnsmar/biogo/contents/{+path}","compare_url":"https://api.github.com/repos/mnsmar/biogo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mnsmar/biogo/merges","archive_url":"https://api.github.com/repos/mnsmar/biogo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mnsmar/biogo/downloads","issues_url":"https://api.github.com/repos/mnsmar/biogo/issues{/number}","pulls_url":"https://api.github.com/repos/mnsmar/biogo/pulls{/number}","milestones_url":"https://api.github.com/repos/mnsmar/biogo/milestones{/number}","notifications_url":"https://api.github.com/repos/mnsmar/biogo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mnsmar/biogo/labels{/name}","releases_url":"https://api.github.com/repos/mnsmar/biogo/releases{/id}","created_at":"2015-01-19T23:01:19Z","updated_at":"2015-01-19T23:01:21Z","pushed_at":"2015-01-19T23:19:59Z","git_url":"git://github.com/mnsmar/biogo.git","ssh_url":"git@github.com:mnsmar/biogo.git","clone_url":"https://github.com/mnsmar/biogo.git","svn_url":"https://github.com/mnsmar/biogo","homepage":"https://code.google.com/p/biogo","size":0,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"biogo:master","ref":"master","sha":"cb7bcb7a051aa15719533e8067aa51816131f0c4","user":{"login":"biogo","id":1227814,"avatar_url":"https://avatars.githubusercontent.com/u/1227814?v=3","gravatar_id":"","url":"https://api.github.com/users/biogo","html_url":"https://github.com/biogo","followers_url":"https://api.github.com/users/biogo/followers","following_url":"https://api.github.com/users/biogo/following{/other_user}","gists_url":"https://api.github.com/users/biogo/gists{/gist_id}","starred_url":"https://api.github.com/users/biogo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biogo/subscriptions","organizations_url":"https://api.github.com/users/biogo/orgs","repos_url":"https://api.github.com/users/biogo/repos","events_url":"https://api.github.com/users/biogo/events{/privacy}","received_events_url":"https://api.github.com/users/biogo/received_events","type":"Organization","site_admin":false},"repo":{"id":29500276,"name":"biogo","full_name":"biogo/biogo","owner":{"login":"biogo","id":1227814,"avatar_url":"https://avatars.githubusercontent.com/u/1227814?v=3","gravatar_id":"","url":"https://api.github.com/users/biogo","html_url":"https://github.com/biogo","followers_url":"https://api.github.com/users/biogo/followers","following_url":"https://api.github.com/users/biogo/following{/other_user}","gists_url":"https://api.github.com/users/biogo/gists{/gist_id}","starred_url":"https://api.github.com/users/biogo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biogo/subscriptions","organizations_url":"https://api.github.com/users/biogo/orgs","repos_url":"https://api.github.com/users/biogo/repos","events_url":"https://api.github.com/users/biogo/events{/privacy}","received_events_url":"https://api.github.com/users/biogo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/biogo/biogo","description":"GitHub code mirror for the bíogo project.","fork":false,"url":"https://api.github.com/repos/biogo/biogo","forks_url":"https://api.github.com/repos/biogo/biogo/forks","keys_url":"https://api.github.com/repos/biogo/biogo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/biogo/biogo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/biogo/biogo/teams","hooks_url":"https://api.github.com/repos/biogo/biogo/hooks","issue_events_url":"https://api.github.com/repos/biogo/biogo/issues/events{/number}","events_url":"https://api.github.com/repos/biogo/biogo/events","assignees_url":"https://api.github.com/repos/biogo/biogo/assignees{/user}","branches_url":"https://api.github.com/repos/biogo/biogo/branches{/branch}","tags_url":"https://api.github.com/repos/biogo/biogo/tags","blobs_url":"https://api.github.com/repos/biogo/biogo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/biogo/biogo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/biogo/biogo/git/refs{/sha}","trees_url":"https://api.github.com/repos/biogo/biogo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/biogo/biogo/statuses/{sha}","languages_url":"https://api.github.com/repos/biogo/biogo/languages","stargazers_url":"https://api.github.com/repos/biogo/biogo/stargazers","contributors_url":"https://api.github.com/repos/biogo/biogo/contributors","subscribers_url":"https://api.github.com/repos/biogo/biogo/subscribers","subscription_url":"https://api.github.com/repos/biogo/biogo/subscription","commits_url":"https://api.github.com/repos/biogo/biogo/commits{/sha}","git_commits_url":"https://api.github.com/repos/biogo/biogo/git/commits{/sha}","comments_url":"https://api.github.com/repos/biogo/biogo/comments{/number}","issue_comment_url":"https://api.github.com/repos/biogo/biogo/issues/comments/{number}","contents_url":"https://api.github.com/repos/biogo/biogo/contents/{+path}","compare_url":"https://api.github.com/repos/biogo/biogo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/biogo/biogo/merges","archive_url":"https://api.github.com/repos/biogo/biogo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/biogo/biogo/downloads","issues_url":"https://api.github.com/repos/biogo/biogo/issues{/number}","pulls_url":"https://api.github.com/repos/biogo/biogo/pulls{/number}","milestones_url":"https://api.github.com/repos/biogo/biogo/milestones{/number}","notifications_url":"https://api.github.com/repos/biogo/biogo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/biogo/biogo/labels{/name}","releases_url":"https://api.github.com/repos/biogo/biogo/releases{/id}","created_at":"2015-01-19T22:37:26Z","updated_at":"2015-01-22T15:36:43Z","pushed_at":"2015-01-22T01:05:08Z","git_url":"git://github.com/biogo/biogo.git","ssh_url":"git@github.com:biogo/biogo.git","clone_url":"https://github.com/biogo/biogo.git","svn_url":"https://github.com/biogo/biogo","homepage":"https://code.google.com/p/biogo","size":0,"stargazers_count":2,"watchers_count":2,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/biogo/biogo/pulls/1"},"html":{"href":"https://github.com/biogo/biogo/pull/1"},"issue":{"href":"https://api.github.com/repos/biogo/biogo/issues/1"},"comments":{"href":"https://api.github.com/repos/biogo/biogo/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/biogo/biogo/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/biogo/biogo/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/biogo/biogo/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/biogo/biogo/statuses/7ae0480cd482a51478b50f27271824c95d162c32"}}}}