{"action":"created","comment":{"url":"https://api.github.com/repos/BioJulia/Bio.jl/pulls/comments/62415819","id":62415819,"diff_hunk":"@@ -0,0 +1,181 @@\n+module TestIndexing\n+\n+if VERSION >= v\"0.5-\"\n+    using Base.Test\n+else\n+    using BaseTestNext\n+    const Test = BaseTestNext\n+end\n+\n+using Bio.Indexing\n+\n+@testset \"Indexer\" begin\n+    symbolnames = [:First, :Second, :Third, :Fourth, :Fifth]\n+    textnames = [\"First\", \"Second\", \"Third\", \"Fourth\", \"Fifth\"]\n+    groups = UnitRange{Int}[1:5, 6:10, 11:15, 16:20, 21:25]\n+    groups_eight = UnitRange{UInt8}[1:5, 6:10, 11:15, 16:20, 21:25]\n+    int_index_one = Indexer(symbolnames)\n+    int_index_two = Indexer(textnames, UInt64)\n+    int_index_three = Indexer(symbolnames, UInt8)\n+    g_index_one = Indexer(symbolnames, groups)\n+    g_index_two = Indexer(textnames, groups)\n+    g_index_three = Indexer(textnames, groups_eight)\n+    empty_index = Indexer(UInt64)\n+\n+    @testset \"Correct Construction\" begin\n+        @test int_index_one == int_index_two\n+        @test int_index_one == int_index_three\n+        @test int_index_two == int_index_three\n+        @test g_index_one == g_index_two\n+        @test g_index_one == g_index_two\n+        @test g_index_two == g_index_three\n+        @test int_index_one != empty_index\n+        @test g_index_one != empty_index\n+        @test typeof(int_index_one) != typeof(int_index_two)\n+        @test typeof(int_index_one) != typeof(int_index_three)\n+        @test typeof(int_index_two) != typeof(int_index_three)\n+        @test typeof(g_index_one) == typeof(g_index_two)\n+        @test typeof(g_index_one) != typeof(g_index_three)\n+        @test typeof(g_index_two) != typeof(g_index_three)\n+        @test typeof(int_index_one) == Indexer{Int64}\n+        @test typeof(int_index_two) == Indexer{UInt64}\n+        @test typeof(int_index_three) == Indexer{UInt8}\n+        @test typeof(g_index_one) == Indexer{UnitRange{Int64}}\n+        @test typeof(g_index_two) == Indexer{UnitRange{Int64}}\n+        @test typeof(g_index_three) == Indexer{UnitRange{UInt8}}\n+        @test typeof(empty_index) == Indexer{UInt64}\n+    end\n+\n+    @testset \"Basic Operators\" begin\n+        @test length(int_index_one) == 5\n+        @test length(int_index_two) == 5\n+        @test length(int_index_three) == 5\n+        @test length(g_index_one) == 5\n+        @test length(g_index_two) == 5\n+        @test length(g_index_three) == 5\n+        @test names(int_index_one) == symbolnames\n+        @test names(int_index_two) == symbolnames\n+        @test names(int_index_three) == symbolnames\n+        @test names(g_index_one) == symbolnames\n+        @test names(g_index_two) == symbolnames\n+        @test names(g_index_three) == symbolnames\n+        @test names(empty_index) == Symbol[]\n+        @test isequal(copy(int_index_one), int_index_one) && !is(copy(int_index_one), int_index_one)\n+        @test isequal(copy(int_index_two), int_index_two) && !is(copy(int_index_two), int_index_two)\n+        @test isequal(copy(int_index_three), int_index_three) && !is(copy(int_index_three), int_index_three)\n+        @test isequal(copy(g_index_one), g_index_one) && !is(copy(g_index_one), g_index_one)\n+        @test isequal(copy(g_index_two), g_index_two) && !is(copy(g_index_two), g_index_two)\n+        @test isequal(copy(g_index_three), g_index_three) && !is(copy(g_index_three), g_index_three)\n+        @test isequal(copy(empty_index), empty_index) && !is(copy(empty_index), empty_index)\n+        for n in symbolnames","path":"test/util/indexing.jl","position":70,"original_position":70,"commit_id":"754180881776fd37ffef3fbec8e113aa1793b74b","original_commit_id":"754180881776fd37ffef3fbec8e113aa1793b74b","user":{"login":"kdmurray91","id":1560490,"avatar_url":"https://avatars.githubusercontent.com/u/1560490?v=3","gravatar_id":"","url":"https://api.github.com/users/kdmurray91","html_url":"https://github.com/kdmurray91","followers_url":"https://api.github.com/users/kdmurray91/followers","following_url":"https://api.github.com/users/kdmurray91/following{/other_user}","gists_url":"https://api.github.com/users/kdmurray91/gists{/gist_id}","starred_url":"https://api.github.com/users/kdmurray91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdmurray91/subscriptions","organizations_url":"https://api.github.com/users/kdmurray91/orgs","repos_url":"https://api.github.com/users/kdmurray91/repos","events_url":"https://api.github.com/users/kdmurray91/events{/privacy}","received_events_url":"https://api.github.com/users/kdmurray91/received_events","type":"User","site_admin":false},"body":"Pedantry: This seems like it could use a refactor\r\n\r\n```julia\r\nfor indexset in (symbolnames, textnames, 1:5)\r\n     for n in indexset\r\n           @test all_the_things(n)\r\n     end\r\nend\r\n```","created_at":"2016-05-07T12:20:08Z","updated_at":"2016-05-07T12:20:08Z","html_url":"https://github.com/BioJulia/Bio.jl/pull/161#discussion_r62415819","pull_request_url":"https://api.github.com/repos/BioJulia/Bio.jl/pulls/161","_links":{"self":{"href":"https://api.github.com/repos/BioJulia/Bio.jl/pulls/comments/62415819"},"html":{"href":"https://github.com/BioJulia/Bio.jl/pull/161#discussion_r62415819"},"pull_request":{"href":"https://api.github.com/repos/BioJulia/Bio.jl/pulls/161"}}},"pull_request":{"url":"https://api.github.com/repos/BioJulia/Bio.jl/pulls/161","id":67757246,"html_url":"https://github.com/BioJulia/Bio.jl/pull/161","diff_url":"https://github.com/BioJulia/Bio.jl/pull/161.diff","patch_url":"https://github.com/BioJulia/Bio.jl/pull/161.patch","issue_url":"https://api.github.com/repos/BioJulia/Bio.jl/issues/161","number":161,"state":"open","locked":false,"title":"Indexes","user":{"login":"Ward9250","id":3399309,"avatar_url":"https://avatars.githubusercontent.com/u/3399309?v=3","gravatar_id":"","url":"https://api.github.com/users/Ward9250","html_url":"https://github.com/Ward9250","followers_url":"https://api.github.com/users/Ward9250/followers","following_url":"https://api.github.com/users/Ward9250/following{/other_user}","gists_url":"https://api.github.com/users/Ward9250/gists{/gist_id}","starred_url":"https://api.github.com/users/Ward9250/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ward9250/subscriptions","organizations_url":"https://api.github.com/users/Ward9250/orgs","repos_url":"https://api.github.com/users/Ward9250/repos","events_url":"https://api.github.com/users/Ward9250/events{/privacy}","received_events_url":"https://api.github.com/users/Ward9250/received_events","type":"User","site_admin":false},"body":"Datatypes in planned genotype count arrays #160 and the phylogenetic module rework #157 require data structures to index names or labels to integers or a set of integers. This PR provides them.","created_at":"2016-04-25T17:28:21Z","updated_at":"2016-05-07T12:20:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fa40d98436f928f084f2ecf531a835142c3f789c","assignee":{"login":"Ward9250","id":3399309,"avatar_url":"https://avatars.githubusercontent.com/u/3399309?v=3","gravatar_id":"","url":"https://api.github.com/users/Ward9250","html_url":"https://github.com/Ward9250","followers_url":"https://api.github.com/users/Ward9250/followers","following_url":"https://api.github.com/users/Ward9250/following{/other_user}","gists_url":"https://api.github.com/users/Ward9250/gists{/gist_id}","starred_url":"https://api.github.com/users/Ward9250/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ward9250/subscriptions","organizations_url":"https://api.github.com/users/Ward9250/orgs","repos_url":"https://api.github.com/users/Ward9250/repos","events_url":"https://api.github.com/users/Ward9250/events{/privacy}","received_events_url":"https://api.github.com/users/Ward9250/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/BioJulia/Bio.jl/milestones/1","html_url":"https://github.com/BioJulia/Bio.jl/milestones/Population%20Genetics%20Groundwork","labels_url":"https://api.github.com/repos/BioJulia/Bio.jl/milestones/1/labels","id":1400236,"number":1,"title":"Population Genetics Groundwork","description":"Basic types enabling population genetic work would be awesome for Bio.jl, and since population genetics is all about analysing genetic variation, it makes sense the basic types for population genetic data should go in the Var module.\r\n\r\nSo far, two main types are proposed, a GenotypeArray, which acts like a generic array containing allele counts, but with some additional and special behaviour which makes it easy to do pop-gen calculations.\r\n\r\nThe second type is for storing and manipulating SNP data, which stores its data in a compact bit format.","creator":{"login":"Ward9250","id":3399309,"avatar_url":"https://avatars.githubusercontent.com/u/3399309?v=3","gravatar_id":"","url":"https://api.github.com/users/Ward9250","html_url":"https://github.com/Ward9250","followers_url":"https://api.github.com/users/Ward9250/followers","following_url":"https://api.github.com/users/Ward9250/following{/other_user}","gists_url":"https://api.github.com/users/Ward9250/gists{/gist_id}","starred_url":"https://api.github.com/users/Ward9250/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ward9250/subscriptions","organizations_url":"https://api.github.com/users/Ward9250/orgs","repos_url":"https://api.github.com/users/Ward9250/repos","events_url":"https://api.github.com/users/Ward9250/events{/privacy}","received_events_url":"https://api.github.com/users/Ward9250/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2015-11-08T18:35:24Z","updated_at":"2016-04-25T17:31:23Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/BioJulia/Bio.jl/pulls/161/commits","review_comments_url":"https://api.github.com/repos/BioJulia/Bio.jl/pulls/161/comments","review_comment_url":"https://api.github.com/repos/BioJulia/Bio.jl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BioJulia/Bio.jl/issues/161/comments","statuses_url":"https://api.github.com/repos/BioJulia/Bio.jl/statuses/754180881776fd37ffef3fbec8e113aa1793b74b","head":{"label":"BioJulia:indexes","ref":"indexes","sha":"754180881776fd37ffef3fbec8e113aa1793b74b","user":{"login":"BioJulia","id":6486271,"avatar_url":"https://avatars.githubusercontent.com/u/6486271?v=3","gravatar_id":"","url":"https://api.github.com/users/BioJulia","html_url":"https://github.com/BioJulia","followers_url":"https://api.github.com/users/BioJulia/followers","following_url":"https://api.github.com/users/BioJulia/following{/other_user}","gists_url":"https://api.github.com/users/BioJulia/gists{/gist_id}","starred_url":"https://api.github.com/users/BioJulia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BioJulia/subscriptions","organizations_url":"https://api.github.com/users/BioJulia/orgs","repos_url":"https://api.github.com/users/BioJulia/repos","events_url":"https://api.github.com/users/BioJulia/events{/privacy}","received_events_url":"https://api.github.com/users/BioJulia/received_events","type":"Organization","site_admin":false},"repo":{"id":16187538,"name":"Bio.jl","full_name":"BioJulia/Bio.jl","owner":{"login":"BioJulia","id":6486271,"avatar_url":"https://avatars.githubusercontent.com/u/6486271?v=3","gravatar_id":"","url":"https://api.github.com/users/BioJulia","html_url":"https://github.com/BioJulia","followers_url":"https://api.github.com/users/BioJulia/followers","following_url":"https://api.github.com/users/BioJulia/following{/other_user}","gists_url":"https://api.github.com/users/BioJulia/gists{/gist_id}","starred_url":"https://api.github.com/users/BioJulia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BioJulia/subscriptions","organizations_url":"https://api.github.com/users/BioJulia/orgs","repos_url":"https://api.github.com/users/BioJulia/repos","events_url":"https://api.github.com/users/BioJulia/events{/privacy}","received_events_url":"https://api.github.com/users/BioJulia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BioJulia/Bio.jl","description":"Bioinformatics and Computational Biology Infrastructure for Julia","fork":false,"url":"https://api.github.com/repos/BioJulia/Bio.jl","forks_url":"https://api.github.com/repos/BioJulia/Bio.jl/forks","keys_url":"https://api.github.com/repos/BioJulia/Bio.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BioJulia/Bio.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BioJulia/Bio.jl/teams","hooks_url":"https://api.github.com/repos/BioJulia/Bio.jl/hooks","issue_events_url":"https://api.github.com/repos/BioJulia/Bio.jl/issues/events{/number}","events_url":"https://api.github.com/repos/BioJulia/Bio.jl/events","assignees_url":"https://api.github.com/repos/BioJulia/Bio.jl/assignees{/user}","branches_url":"https://api.github.com/repos/BioJulia/Bio.jl/branches{/branch}","tags_url":"https://api.github.com/repos/BioJulia/Bio.jl/tags","blobs_url":"https://api.github.com/repos/BioJulia/Bio.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BioJulia/Bio.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BioJulia/Bio.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/BioJulia/Bio.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BioJulia/Bio.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/BioJulia/Bio.jl/languages","stargazers_url":"https://api.github.com/repos/BioJulia/Bio.jl/stargazers","contributors_url":"https://api.github.com/repos/BioJulia/Bio.jl/contributors","subscribers_url":"https://api.github.com/repos/BioJulia/Bio.jl/subscribers","subscription_url":"https://api.github.com/repos/BioJulia/Bio.jl/subscription","commits_url":"https://api.github.com/repos/BioJulia/Bio.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/BioJulia/Bio.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/BioJulia/Bio.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/BioJulia/Bio.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/BioJulia/Bio.jl/contents/{+path}","compare_url":"https://api.github.com/repos/BioJulia/Bio.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BioJulia/Bio.jl/merges","archive_url":"https://api.github.com/repos/BioJulia/Bio.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BioJulia/Bio.jl/downloads","issues_url":"https://api.github.com/repos/BioJulia/Bio.jl/issues{/number}","pulls_url":"https://api.github.com/repos/BioJulia/Bio.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/BioJulia/Bio.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/BioJulia/Bio.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BioJulia/Bio.jl/labels{/name}","releases_url":"https://api.github.com/repos/BioJulia/Bio.jl/releases{/id}","deployments_url":"https://api.github.com/repos/BioJulia/Bio.jl/deployments","created_at":"2014-01-23T22:20:21Z","updated_at":"2016-05-04T13:21:53Z","pushed_at":"2016-05-07T11:43:45Z","git_url":"git://github.com/BioJulia/Bio.jl.git","ssh_url":"git@github.com:BioJulia/Bio.jl.git","clone_url":"https://github.com/BioJulia/Bio.jl.git","svn_url":"https://github.com/BioJulia/Bio.jl","homepage":"https://biojulia.github.io/Bio.jl","size":4729,"stargazers_count":111,"watchers_count":111,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":36,"mirror_url":null,"open_issues_count":42,"forks":36,"open_issues":42,"watchers":111,"default_branch":"master"}},"base":{"label":"BioJulia:master","ref":"master","sha":"6f53b069093d11e913d91382cd548c8a6328aaa6","user":{"login":"BioJulia","id":6486271,"avatar_url":"https://avatars.githubusercontent.com/u/6486271?v=3","gravatar_id":"","url":"https://api.github.com/users/BioJulia","html_url":"https://github.com/BioJulia","followers_url":"https://api.github.com/users/BioJulia/followers","following_url":"https://api.github.com/users/BioJulia/following{/other_user}","gists_url":"https://api.github.com/users/BioJulia/gists{/gist_id}","starred_url":"https://api.github.com/users/BioJulia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BioJulia/subscriptions","organizations_url":"https://api.github.com/users/BioJulia/orgs","repos_url":"https://api.github.com/users/BioJulia/repos","events_url":"https://api.github.com/users/BioJulia/events{/privacy}","received_events_url":"https://api.github.com/users/BioJulia/received_events","type":"Organization","site_admin":false},"repo":{"id":16187538,"name":"Bio.jl","full_name":"BioJulia/Bio.jl","owner":{"login":"BioJulia","id":6486271,"avatar_url":"https://avatars.githubusercontent.com/u/6486271?v=3","gravatar_id":"","url":"https://api.github.com/users/BioJulia","html_url":"https://github.com/BioJulia","followers_url":"https://api.github.com/users/BioJulia/followers","following_url":"https://api.github.com/users/BioJulia/following{/other_user}","gists_url":"https://api.github.com/users/BioJulia/gists{/gist_id}","starred_url":"https://api.github.com/users/BioJulia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BioJulia/subscriptions","organizations_url":"https://api.github.com/users/BioJulia/orgs","repos_url":"https://api.github.com/users/BioJulia/repos","events_url":"https://api.github.com/users/BioJulia/events{/privacy}","received_events_url":"https://api.github.com/users/BioJulia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BioJulia/Bio.jl","description":"Bioinformatics and Computational Biology Infrastructure for Julia","fork":false,"url":"https://api.github.com/repos/BioJulia/Bio.jl","forks_url":"https://api.github.com/repos/BioJulia/Bio.jl/forks","keys_url":"https://api.github.com/repos/BioJulia/Bio.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BioJulia/Bio.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BioJulia/Bio.jl/teams","hooks_url":"https://api.github.com/repos/BioJulia/Bio.jl/hooks","issue_events_url":"https://api.github.com/repos/BioJulia/Bio.jl/issues/events{/number}","events_url":"https://api.github.com/repos/BioJulia/Bio.jl/events","assignees_url":"https://api.github.com/repos/BioJulia/Bio.jl/assignees{/user}","branches_url":"https://api.github.com/repos/BioJulia/Bio.jl/branches{/branch}","tags_url":"https://api.github.com/repos/BioJulia/Bio.jl/tags","blobs_url":"https://api.github.com/repos/BioJulia/Bio.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BioJulia/Bio.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BioJulia/Bio.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/BioJulia/Bio.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BioJulia/Bio.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/BioJulia/Bio.jl/languages","stargazers_url":"https://api.github.com/repos/BioJulia/Bio.jl/stargazers","contributors_url":"https://api.github.com/repos/BioJulia/Bio.jl/contributors","subscribers_url":"https://api.github.com/repos/BioJulia/Bio.jl/subscribers","subscription_url":"https://api.github.com/repos/BioJulia/Bio.jl/subscription","commits_url":"https://api.github.com/repos/BioJulia/Bio.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/BioJulia/Bio.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/BioJulia/Bio.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/BioJulia/Bio.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/BioJulia/Bio.jl/contents/{+path}","compare_url":"https://api.github.com/repos/BioJulia/Bio.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BioJulia/Bio.jl/merges","archive_url":"https://api.github.com/repos/BioJulia/Bio.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BioJulia/Bio.jl/downloads","issues_url":"https://api.github.com/repos/BioJulia/Bio.jl/issues{/number}","pulls_url":"https://api.github.com/repos/BioJulia/Bio.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/BioJulia/Bio.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/BioJulia/Bio.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BioJulia/Bio.jl/labels{/name}","releases_url":"https://api.github.com/repos/BioJulia/Bio.jl/releases{/id}","deployments_url":"https://api.github.com/repos/BioJulia/Bio.jl/deployments","created_at":"2014-01-23T22:20:21Z","updated_at":"2016-05-04T13:21:53Z","pushed_at":"2016-05-07T11:43:45Z","git_url":"git://github.com/BioJulia/Bio.jl.git","ssh_url":"git@github.com:BioJulia/Bio.jl.git","clone_url":"https://github.com/BioJulia/Bio.jl.git","svn_url":"https://github.com/BioJulia/Bio.jl","homepage":"https://biojulia.github.io/Bio.jl","size":4729,"stargazers_count":111,"watchers_count":111,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":36,"mirror_url":null,"open_issues_count":42,"forks":36,"open_issues":42,"watchers":111,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BioJulia/Bio.jl/pulls/161"},"html":{"href":"https://github.com/BioJulia/Bio.jl/pull/161"},"issue":{"href":"https://api.github.com/repos/BioJulia/Bio.jl/issues/161"},"comments":{"href":"https://api.github.com/repos/BioJulia/Bio.jl/issues/161/comments"},"review_comments":{"href":"https://api.github.com/repos/BioJulia/Bio.jl/pulls/161/comments"},"review_comment":{"href":"https://api.github.com/repos/BioJulia/Bio.jl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BioJulia/Bio.jl/pulls/161/commits"},"statuses":{"href":"https://api.github.com/repos/BioJulia/Bio.jl/statuses/754180881776fd37ffef3fbec8e113aa1793b74b"}}}}