{"action":"created","comment":{"url":"https://api.github.com/repos/qiime2/q2-types/pulls/comments/71807858","id":71807858,"diff_hunk":"@@ -0,0 +1,183 @@\n+# ----------------------------------------------------------------------------\n+# Copyright (c) 2016--, QIIME development team.\n+#\n+# Distributed under the terms of the Modified BSD License.\n+#\n+# The full license is in the file LICENSE, distributed with this software.\n+# ----------------------------------------------------------------------------\n+\n+import os\n+\n+import skbio\n+import skbio.io\n+import pandas as pd\n+\n+import qiime\n+from qiime.plugin import SemanticType, DataLayout, FileFormat\n+from .plugin_setup import plugin\n+\n+\n+FeatureData = SemanticType('FeatureData', field_names='type')\n+\n+Taxonomy = SemanticType('Taxonomy', variant_of=FeatureData.field['type'])\n+\n+Sequence = SemanticType('Sequence', variant_of=FeatureData.field['type'])\n+\n+AlignedSequence = SemanticType('AlignedSequence',\n+                               variant_of=FeatureData.field['type'])\n+\n+\n+class TaxonomyFormat(FileFormat):\n+    name = 'taxonomy'\n+\n+    @classmethod\n+    def sniff(cls, filepath):\n+        with open(filepath, 'r') as fh:\n+            count = 0\n+            while count < 10:\n+                line = fh.readline()\n+                if line == '':\n+                    break\n+                elif line.startswith('#'):\n+                    continue\n+                else:\n+                    cells = line.split('\\t')\n+                    if len(cells) < 2:\n+                        return False\n+                    count += 1\n+            return False if count == 0 else True","path":"q2_types/_feature_data.py","position":48,"original_position":48,"commit_id":"7c176a117e70a99990402b128295f304c0b9a763","original_commit_id":"7c176a117e70a99990402b128295f304c0b9a763","user":{"login":"ebolyen","id":3976804,"avatar_url":"https://avatars.githubusercontent.com/u/3976804?v=3","gravatar_id":"","url":"https://api.github.com/users/ebolyen","html_url":"https://github.com/ebolyen","followers_url":"https://api.github.com/users/ebolyen/followers","following_url":"https://api.github.com/users/ebolyen/following{/other_user}","gists_url":"https://api.github.com/users/ebolyen/gists{/gist_id}","starred_url":"https://api.github.com/users/ebolyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebolyen/subscriptions","organizations_url":"https://api.github.com/users/ebolyen/orgs","repos_url":"https://api.github.com/users/ebolyen/repos","events_url":"https://api.github.com/users/ebolyen/events{/privacy}","received_events_url":"https://api.github.com/users/ebolyen/received_events","type":"User","site_admin":false},"body":"The way I think of it is there are several opportunities to fail (or succeed), and only after exhausting all of them can you demonstrate the opposite, then you can reason about every conditional uniformly. (But this is coming from a guy who can't even track the `count` variable correctly)","created_at":"2016-07-21T23:49:40Z","updated_at":"2016-07-21T23:49:40Z","html_url":"https://github.com/qiime2/q2-types/pull/18#discussion_r71807858","pull_request_url":"https://api.github.com/repos/qiime2/q2-types/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/qiime2/q2-types/pulls/comments/71807858"},"html":{"href":"https://github.com/qiime2/q2-types/pull/18#discussion_r71807858"},"pull_request":{"href":"https://api.github.com/repos/qiime2/q2-types/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/qiime2/q2-types/pulls/18","id":78236482,"html_url":"https://github.com/qiime2/q2-types/pull/18","diff_url":"https://github.com/qiime2/q2-types/pull/18.diff","patch_url":"https://github.com/qiime2/q2-types/pull/18.patch","issue_url":"https://api.github.com/repos/qiime2/q2-types/issues/18","number":18,"state":"open","locked":false,"title":"ENH: Add FeatureData[Taxonomy|Sequence|AlignedSequence]","user":{"login":"jakereps","id":2638727,"avatar_url":"https://avatars.githubusercontent.com/u/2638727?v=3","gravatar_id":"","url":"https://api.github.com/users/jakereps","html_url":"https://github.com/jakereps","followers_url":"https://api.github.com/users/jakereps/followers","following_url":"https://api.github.com/users/jakereps/following{/other_user}","gists_url":"https://api.github.com/users/jakereps/gists{/gist_id}","starred_url":"https://api.github.com/users/jakereps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakereps/subscriptions","organizations_url":"https://api.github.com/users/jakereps/orgs","repos_url":"https://api.github.com/users/jakereps/repos","events_url":"https://api.github.com/users/jakereps/events{/privacy}","received_events_url":"https://api.github.com/users/jakereps/received_events","type":"User","site_admin":false},"body":"Initial support for QIIME 1 formats\r\nPair-programmed with @jairideout ","created_at":"2016-07-20T23:28:55Z","updated_at":"2016-07-21T23:49:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d0f8742f11f23baa4338f233867f4ec39903aa37","assignee":{"login":"gregcaporaso","id":192372,"avatar_url":"https://avatars.githubusercontent.com/u/192372?v=3","gravatar_id":"","url":"https://api.github.com/users/gregcaporaso","html_url":"https://github.com/gregcaporaso","followers_url":"https://api.github.com/users/gregcaporaso/followers","following_url":"https://api.github.com/users/gregcaporaso/following{/other_user}","gists_url":"https://api.github.com/users/gregcaporaso/gists{/gist_id}","starred_url":"https://api.github.com/users/gregcaporaso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregcaporaso/subscriptions","organizations_url":"https://api.github.com/users/gregcaporaso/orgs","repos_url":"https://api.github.com/users/gregcaporaso/repos","events_url":"https://api.github.com/users/gregcaporaso/events{/privacy}","received_events_url":"https://api.github.com/users/gregcaporaso/received_events","type":"User","site_admin":false},"assignees":[{"login":"gregcaporaso","id":192372,"avatar_url":"https://avatars.githubusercontent.com/u/192372?v=3","gravatar_id":"","url":"https://api.github.com/users/gregcaporaso","html_url":"https://github.com/gregcaporaso","followers_url":"https://api.github.com/users/gregcaporaso/followers","following_url":"https://api.github.com/users/gregcaporaso/following{/other_user}","gists_url":"https://api.github.com/users/gregcaporaso/gists{/gist_id}","starred_url":"https://api.github.com/users/gregcaporaso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregcaporaso/subscriptions","organizations_url":"https://api.github.com/users/gregcaporaso/orgs","repos_url":"https://api.github.com/users/gregcaporaso/repos","events_url":"https://api.github.com/users/gregcaporaso/events{/privacy}","received_events_url":"https://api.github.com/users/gregcaporaso/received_events","type":"User","site_admin":false},{"login":"ebolyen","id":3976804,"avatar_url":"https://avatars.githubusercontent.com/u/3976804?v=3","gravatar_id":"","url":"https://api.github.com/users/ebolyen","html_url":"https://github.com/ebolyen","followers_url":"https://api.github.com/users/ebolyen/followers","following_url":"https://api.github.com/users/ebolyen/following{/other_user}","gists_url":"https://api.github.com/users/ebolyen/gists{/gist_id}","starred_url":"https://api.github.com/users/ebolyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebolyen/subscriptions","organizations_url":"https://api.github.com/users/ebolyen/orgs","repos_url":"https://api.github.com/users/ebolyen/repos","events_url":"https://api.github.com/users/ebolyen/events{/privacy}","received_events_url":"https://api.github.com/users/ebolyen/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/qiime2/q2-types/pulls/18/commits","review_comments_url":"https://api.github.com/repos/qiime2/q2-types/pulls/18/comments","review_comment_url":"https://api.github.com/repos/qiime2/q2-types/pulls/comments{/number}","comments_url":"https://api.github.com/repos/qiime2/q2-types/issues/18/comments","statuses_url":"https://api.github.com/repos/qiime2/q2-types/statuses/7c176a117e70a99990402b128295f304c0b9a763","head":{"label":"jakereps:feature-data","ref":"feature-data","sha":"7c176a117e70a99990402b128295f304c0b9a763","user":{"login":"jakereps","id":2638727,"avatar_url":"https://avatars.githubusercontent.com/u/2638727?v=3","gravatar_id":"","url":"https://api.github.com/users/jakereps","html_url":"https://github.com/jakereps","followers_url":"https://api.github.com/users/jakereps/followers","following_url":"https://api.github.com/users/jakereps/following{/other_user}","gists_url":"https://api.github.com/users/jakereps/gists{/gist_id}","starred_url":"https://api.github.com/users/jakereps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakereps/subscriptions","organizations_url":"https://api.github.com/users/jakereps/orgs","repos_url":"https://api.github.com/users/jakereps/repos","events_url":"https://api.github.com/users/jakereps/events{/privacy}","received_events_url":"https://api.github.com/users/jakereps/received_events","type":"User","site_admin":false},"repo":{"id":63734378,"name":"q2-types","full_name":"jakereps/q2-types","owner":{"login":"jakereps","id":2638727,"avatar_url":"https://avatars.githubusercontent.com/u/2638727?v=3","gravatar_id":"","url":"https://api.github.com/users/jakereps","html_url":"https://github.com/jakereps","followers_url":"https://api.github.com/users/jakereps/followers","following_url":"https://api.github.com/users/jakereps/following{/other_user}","gists_url":"https://api.github.com/users/jakereps/gists{/gist_id}","starred_url":"https://api.github.com/users/jakereps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakereps/subscriptions","organizations_url":"https://api.github.com/users/jakereps/orgs","repos_url":"https://api.github.com/users/jakereps/repos","events_url":"https://api.github.com/users/jakereps/events{/privacy}","received_events_url":"https://api.github.com/users/jakereps/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jakereps/q2-types","description":"Definitions of common QIIME 2 types.","fork":true,"url":"https://api.github.com/repos/jakereps/q2-types","forks_url":"https://api.github.com/repos/jakereps/q2-types/forks","keys_url":"https://api.github.com/repos/jakereps/q2-types/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jakereps/q2-types/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jakereps/q2-types/teams","hooks_url":"https://api.github.com/repos/jakereps/q2-types/hooks","issue_events_url":"https://api.github.com/repos/jakereps/q2-types/issues/events{/number}","events_url":"https://api.github.com/repos/jakereps/q2-types/events","assignees_url":"https://api.github.com/repos/jakereps/q2-types/assignees{/user}","branches_url":"https://api.github.com/repos/jakereps/q2-types/branches{/branch}","tags_url":"https://api.github.com/repos/jakereps/q2-types/tags","blobs_url":"https://api.github.com/repos/jakereps/q2-types/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jakereps/q2-types/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jakereps/q2-types/git/refs{/sha}","trees_url":"https://api.github.com/repos/jakereps/q2-types/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jakereps/q2-types/statuses/{sha}","languages_url":"https://api.github.com/repos/jakereps/q2-types/languages","stargazers_url":"https://api.github.com/repos/jakereps/q2-types/stargazers","contributors_url":"https://api.github.com/repos/jakereps/q2-types/contributors","subscribers_url":"https://api.github.com/repos/jakereps/q2-types/subscribers","subscription_url":"https://api.github.com/repos/jakereps/q2-types/subscription","commits_url":"https://api.github.com/repos/jakereps/q2-types/commits{/sha}","git_commits_url":"https://api.github.com/repos/jakereps/q2-types/git/commits{/sha}","comments_url":"https://api.github.com/repos/jakereps/q2-types/comments{/number}","issue_comment_url":"https://api.github.com/repos/jakereps/q2-types/issues/comments{/number}","contents_url":"https://api.github.com/repos/jakereps/q2-types/contents/{+path}","compare_url":"https://api.github.com/repos/jakereps/q2-types/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jakereps/q2-types/merges","archive_url":"https://api.github.com/repos/jakereps/q2-types/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jakereps/q2-types/downloads","issues_url":"https://api.github.com/repos/jakereps/q2-types/issues{/number}","pulls_url":"https://api.github.com/repos/jakereps/q2-types/pulls{/number}","milestones_url":"https://api.github.com/repos/jakereps/q2-types/milestones{/number}","notifications_url":"https://api.github.com/repos/jakereps/q2-types/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jakereps/q2-types/labels{/name}","releases_url":"https://api.github.com/repos/jakereps/q2-types/releases{/id}","deployments_url":"https://api.github.com/repos/jakereps/q2-types/deployments","created_at":"2016-07-19T23:25:14Z","updated_at":"2016-07-19T23:25:15Z","pushed_at":"2016-07-21T22:31:42Z","git_url":"git://github.com/jakereps/q2-types.git","ssh_url":"git@github.com:jakereps/q2-types.git","clone_url":"https://github.com/jakereps/q2-types.git","svn_url":"https://github.com/jakereps/q2-types","homepage":null,"size":709,"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":"qiime2:master","ref":"master","sha":"3c5ed8772774407dbcd8c0a29f4aefb8f8d84f4e","user":{"login":"qiime2","id":18176583,"avatar_url":"https://avatars.githubusercontent.com/u/18176583?v=3","gravatar_id":"","url":"https://api.github.com/users/qiime2","html_url":"https://github.com/qiime2","followers_url":"https://api.github.com/users/qiime2/followers","following_url":"https://api.github.com/users/qiime2/following{/other_user}","gists_url":"https://api.github.com/users/qiime2/gists{/gist_id}","starred_url":"https://api.github.com/users/qiime2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qiime2/subscriptions","organizations_url":"https://api.github.com/users/qiime2/orgs","repos_url":"https://api.github.com/users/qiime2/repos","events_url":"https://api.github.com/users/qiime2/events{/privacy}","received_events_url":"https://api.github.com/users/qiime2/received_events","type":"Organization","site_admin":false},"repo":{"id":58407598,"name":"q2-types","full_name":"qiime2/q2-types","owner":{"login":"qiime2","id":18176583,"avatar_url":"https://avatars.githubusercontent.com/u/18176583?v=3","gravatar_id":"","url":"https://api.github.com/users/qiime2","html_url":"https://github.com/qiime2","followers_url":"https://api.github.com/users/qiime2/followers","following_url":"https://api.github.com/users/qiime2/following{/other_user}","gists_url":"https://api.github.com/users/qiime2/gists{/gist_id}","starred_url":"https://api.github.com/users/qiime2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qiime2/subscriptions","organizations_url":"https://api.github.com/users/qiime2/orgs","repos_url":"https://api.github.com/users/qiime2/repos","events_url":"https://api.github.com/users/qiime2/events{/privacy}","received_events_url":"https://api.github.com/users/qiime2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/qiime2/q2-types","description":"Definitions of common QIIME 2 types.","fork":false,"url":"https://api.github.com/repos/qiime2/q2-types","forks_url":"https://api.github.com/repos/qiime2/q2-types/forks","keys_url":"https://api.github.com/repos/qiime2/q2-types/keys{/key_id}","collaborators_url":"https://api.github.com/repos/qiime2/q2-types/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/qiime2/q2-types/teams","hooks_url":"https://api.github.com/repos/qiime2/q2-types/hooks","issue_events_url":"https://api.github.com/repos/qiime2/q2-types/issues/events{/number}","events_url":"https://api.github.com/repos/qiime2/q2-types/events","assignees_url":"https://api.github.com/repos/qiime2/q2-types/assignees{/user}","branches_url":"https://api.github.com/repos/qiime2/q2-types/branches{/branch}","tags_url":"https://api.github.com/repos/qiime2/q2-types/tags","blobs_url":"https://api.github.com/repos/qiime2/q2-types/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/qiime2/q2-types/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/qiime2/q2-types/git/refs{/sha}","trees_url":"https://api.github.com/repos/qiime2/q2-types/git/trees{/sha}","statuses_url":"https://api.github.com/repos/qiime2/q2-types/statuses/{sha}","languages_url":"https://api.github.com/repos/qiime2/q2-types/languages","stargazers_url":"https://api.github.com/repos/qiime2/q2-types/stargazers","contributors_url":"https://api.github.com/repos/qiime2/q2-types/contributors","subscribers_url":"https://api.github.com/repos/qiime2/q2-types/subscribers","subscription_url":"https://api.github.com/repos/qiime2/q2-types/subscription","commits_url":"https://api.github.com/repos/qiime2/q2-types/commits{/sha}","git_commits_url":"https://api.github.com/repos/qiime2/q2-types/git/commits{/sha}","comments_url":"https://api.github.com/repos/qiime2/q2-types/comments{/number}","issue_comment_url":"https://api.github.com/repos/qiime2/q2-types/issues/comments{/number}","contents_url":"https://api.github.com/repos/qiime2/q2-types/contents/{+path}","compare_url":"https://api.github.com/repos/qiime2/q2-types/compare/{base}...{head}","merges_url":"https://api.github.com/repos/qiime2/q2-types/merges","archive_url":"https://api.github.com/repos/qiime2/q2-types/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/qiime2/q2-types/downloads","issues_url":"https://api.github.com/repos/qiime2/q2-types/issues{/number}","pulls_url":"https://api.github.com/repos/qiime2/q2-types/pulls{/number}","milestones_url":"https://api.github.com/repos/qiime2/q2-types/milestones{/number}","notifications_url":"https://api.github.com/repos/qiime2/q2-types/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/qiime2/q2-types/labels{/name}","releases_url":"https://api.github.com/repos/qiime2/q2-types/releases{/id}","deployments_url":"https://api.github.com/repos/qiime2/q2-types/deployments","created_at":"2016-05-09T20:56:01Z","updated_at":"2016-06-26T20:35:52Z","pushed_at":"2016-07-21T22:31:43Z","git_url":"git://github.com/qiime2/q2-types.git","ssh_url":"git@github.com:qiime2/q2-types.git","clone_url":"https://github.com/qiime2/q2-types.git","svn_url":"https://github.com/qiime2/q2-types","homepage":null,"size":712,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/qiime2/q2-types/pulls/18"},"html":{"href":"https://github.com/qiime2/q2-types/pull/18"},"issue":{"href":"https://api.github.com/repos/qiime2/q2-types/issues/18"},"comments":{"href":"https://api.github.com/repos/qiime2/q2-types/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/qiime2/q2-types/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/qiime2/q2-types/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/qiime2/q2-types/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/qiime2/q2-types/statuses/7c176a117e70a99990402b128295f304c0b9a763"}}}}
{"actor":{"display_login":"ebolyen"}}