{"action":"created","comment":{"url":"https://api.github.com/repos/r-bioinformatics/edgePy/pulls/comments/205457461","pull_request_review_id":140727670,"id":205457461,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTQ1NzQ2MQ==","diff_hunk":"@@ -120,6 +120,10 @@ def samples(self, samples: Optional[np.ndarray]) -> None:\n         # - Samples same length as ncol(self.counts) if defined\n         if samples is not None:\n             samples = np.array(list(self._format_fields(samples)))\n+\n+            if self.counts is not None:\n+                if self.counts.shape[1] != len(samples):","path":"edgePy/_DGEList.py","position":6,"original_position":6,"commit_id":"3b5acf560276d3959c77dfe878c8ad5bdf197898","original_commit_id":"3b5acf560276d3959c77dfe878c8ad5bdf197898","user":{"login":"clintval","id":4634699,"node_id":"MDQ6VXNlcjQ2MzQ2OTk=","avatar_url":"https://avatars2.githubusercontent.com/u/4634699?v=4","gravatar_id":"","url":"https://api.github.com/users/clintval","html_url":"https://github.com/clintval","followers_url":"https://api.github.com/users/clintval/followers","following_url":"https://api.github.com/users/clintval/following{/other_user}","gists_url":"https://api.github.com/users/clintval/gists{/gist_id}","starred_url":"https://api.github.com/users/clintval/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clintval/subscriptions","organizations_url":"https://api.github.com/users/clintval/orgs","repos_url":"https://api.github.com/users/clintval/repos","events_url":"https://api.github.com/users/clintval/events{/privacy}","received_events_url":"https://api.github.com/users/clintval/received_events","type":"User","site_admin":false},"body":"Why not:\r\n\r\n```python\r\nif self.counts is not None and len(samples) != self.counts.shape[1]:\r\n    raise ...\r\n```\r\n\r\nThis keeps the if statements un-nested. This second equality expression also reads better with your statements reversed.","created_at":"2018-07-26T13:34:53Z","updated_at":"2018-07-26T13:35:20Z","html_url":"https://github.com/r-bioinformatics/edgePy/pull/39#discussion_r205457461","pull_request_url":"https://api.github.com/repos/r-bioinformatics/edgePy/pulls/39","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/r-bioinformatics/edgePy/pulls/comments/205457461"},"html":{"href":"https://github.com/r-bioinformatics/edgePy/pull/39#discussion_r205457461"},"pull_request":{"href":"https://api.github.com/repos/r-bioinformatics/edgePy/pulls/39"}}},"pull_request":{"url":"https://api.github.com/repos/r-bioinformatics/edgePy/pulls/39","id":202115018,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyMTE1MDE4","html_url":"https://github.com/r-bioinformatics/edgePy/pull/39","diff_url":"https://github.com/r-bioinformatics/edgePy/pull/39.diff","patch_url":"https://github.com/r-bioinformatics/edgePy/pull/39.patch","issue_url":"https://api.github.com/repos/r-bioinformatics/edgePy/issues/39","number":39,"state":"open","locked":false,"title":"Simple validation for issue #38","user":{"login":"julianstanley","id":22749289,"node_id":"MDQ6VXNlcjIyNzQ5Mjg5","avatar_url":"https://avatars1.githubusercontent.com/u/22749289?v=4","gravatar_id":"","url":"https://api.github.com/users/julianstanley","html_url":"https://github.com/julianstanley","followers_url":"https://api.github.com/users/julianstanley/followers","following_url":"https://api.github.com/users/julianstanley/following{/other_user}","gists_url":"https://api.github.com/users/julianstanley/gists{/gist_id}","starred_url":"https://api.github.com/users/julianstanley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julianstanley/subscriptions","organizations_url":"https://api.github.com/users/julianstanley/orgs","repos_url":"https://api.github.com/users/julianstanley/repos","events_url":"https://api.github.com/users/julianstanley/events{/privacy}","received_events_url":"https://api.github.com/users/julianstanley/received_events","type":"User","site_admin":false},"body":"I just added a dimensions check under DGEList counts/samples and added one associated test, which passed. \r\n\r\nLet me know if this is the right idea, or if I'm missing something, and then I can go fix the genes/counts validation too! \r\n\r\nAddresses part of #38 ","created_at":"2018-07-18T01:25:10Z","updated_at":"2018-07-26T13:35:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2c90de2e3e5d8dbd5b53f35b6b6d2bbcfb63ad4f","assignee":null,"assignees":[],"requested_reviewers":[{"login":"eegk","id":7668622,"node_id":"MDQ6VXNlcjc2Njg2MjI=","avatar_url":"https://avatars1.githubusercontent.com/u/7668622?v=4","gravatar_id":"","url":"https://api.github.com/users/eegk","html_url":"https://github.com/eegk","followers_url":"https://api.github.com/users/eegk/followers","following_url":"https://api.github.com/users/eegk/following{/other_user}","gists_url":"https://api.github.com/users/eegk/gists{/gist_id}","starred_url":"https://api.github.com/users/eegk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eegk/subscriptions","organizations_url":"https://api.github.com/users/eegk/orgs","repos_url":"https://api.github.com/users/eegk/repos","events_url":"https://api.github.com/users/eegk/events{/privacy}","received_events_url":"https://api.github.com/users/eegk/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/r-bioinformatics/edgePy/pulls/39/commits","review_comments_url":"https://api.github.com/repos/r-bioinformatics/edgePy/pulls/39/comments","review_comment_url":"https://api.github.com/repos/r-bioinformatics/edgePy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/r-bioinformatics/edgePy/issues/39/comments","statuses_url":"https://api.github.com/repos/r-bioinformatics/edgePy/statuses/3b5acf560276d3959c77dfe878c8ad5bdf197898","head":{"label":"r-bioinformatics:js_DGE_checks","ref":"js_DGE_checks","sha":"3b5acf560276d3959c77dfe878c8ad5bdf197898","user":{"login":"r-bioinformatics","id":35074305,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MDc0MzA1","avatar_url":"https://avatars0.githubusercontent.com/u/35074305?v=4","gravatar_id":"","url":"https://api.github.com/users/r-bioinformatics","html_url":"https://github.com/r-bioinformatics","followers_url":"https://api.github.com/users/r-bioinformatics/followers","following_url":"https://api.github.com/users/r-bioinformatics/following{/other_user}","gists_url":"https://api.github.com/users/r-bioinformatics/gists{/gist_id}","starred_url":"https://api.github.com/users/r-bioinformatics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r-bioinformatics/subscriptions","organizations_url":"https://api.github.com/users/r-bioinformatics/orgs","repos_url":"https://api.github.com/users/r-bioinformatics/repos","events_url":"https://api.github.com/users/r-bioinformatics/events{/privacy}","received_events_url":"https://api.github.com/users/r-bioinformatics/received_events","type":"Organization","site_admin":false},"repo":{"id":123076976,"node_id":"MDEwOlJlcG9zaXRvcnkxMjMwNzY5NzY=","name":"edgePy","full_name":"r-bioinformatics/edgePy","owner":{"login":"r-bioinformatics","id":35074305,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MDc0MzA1","avatar_url":"https://avatars0.githubusercontent.com/u/35074305?v=4","gravatar_id":"","url":"https://api.github.com/users/r-bioinformatics","html_url":"https://github.com/r-bioinformatics","followers_url":"https://api.github.com/users/r-bioinformatics/followers","following_url":"https://api.github.com/users/r-bioinformatics/following{/other_user}","gists_url":"https://api.github.com/users/r-bioinformatics/gists{/gist_id}","starred_url":"https://api.github.com/users/r-bioinformatics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r-bioinformatics/subscriptions","organizations_url":"https://api.github.com/users/r-bioinformatics/orgs","repos_url":"https://api.github.com/users/r-bioinformatics/repos","events_url":"https://api.github.com/users/r-bioinformatics/events{/privacy}","received_events_url":"https://api.github.com/users/r-bioinformatics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/r-bioinformatics/edgePy","description":"A Python implementation of edgeR for differential expression analysis","fork":false,"url":"https://api.github.com/repos/r-bioinformatics/edgePy","forks_url":"https://api.github.com/repos/r-bioinformatics/edgePy/forks","keys_url":"https://api.github.com/repos/r-bioinformatics/edgePy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/r-bioinformatics/edgePy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/r-bioinformatics/edgePy/teams","hooks_url":"https://api.github.com/repos/r-bioinformatics/edgePy/hooks","issue_events_url":"https://api.github.com/repos/r-bioinformatics/edgePy/issues/events{/number}","events_url":"https://api.github.com/repos/r-bioinformatics/edgePy/events","assignees_url":"https://api.github.com/repos/r-bioinformatics/edgePy/assignees{/user}","branches_url":"https://api.github.com/repos/r-bioinformatics/edgePy/branches{/branch}","tags_url":"https://api.github.com/repos/r-bioinformatics/edgePy/tags","blobs_url":"https://api.github.com/repos/r-bioinformatics/edgePy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/r-bioinformatics/edgePy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/r-bioinformatics/edgePy/git/refs{/sha}","trees_url":"https://api.github.com/repos/r-bioinformatics/edgePy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/r-bioinformatics/edgePy/statuses/{sha}","languages_url":"https://api.github.com/repos/r-bioinformatics/edgePy/languages","stargazers_url":"https://api.github.com/repos/r-bioinformatics/edgePy/stargazers","contributors_url":"https://api.github.com/repos/r-bioinformatics/edgePy/contributors","subscribers_url":"https://api.github.com/repos/r-bioinformatics/edgePy/subscribers","subscription_url":"https://api.github.com/repos/r-bioinformatics/edgePy/subscription","commits_url":"https://api.github.com/repos/r-bioinformatics/edgePy/commits{/sha}","git_commits_url":"https://api.github.com/repos/r-bioinformatics/edgePy/git/commits{/sha}","comments_url":"https://api.github.com/repos/r-bioinformatics/edgePy/comments{/number}","issue_comment_url":"https://api.github.com/repos/r-bioinformatics/edgePy/issues/comments{/number}","contents_url":"https://api.github.com/repos/r-bioinformatics/edgePy/contents/{+path}","compare_url":"https://api.github.com/repos/r-bioinformatics/edgePy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/r-bioinformatics/edgePy/merges","archive_url":"https://api.github.com/repos/r-bioinformatics/edgePy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/r-bioinformatics/edgePy/downloads","issues_url":"https://api.github.com/repos/r-bioinformatics/edgePy/issues{/number}","pulls_url":"https://api.github.com/repos/r-bioinformatics/edgePy/pulls{/number}","milestones_url":"https://api.github.com/repos/r-bioinformatics/edgePy/milestones{/number}","notifications_url":"https://api.github.com/repos/r-bioinformatics/edgePy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/r-bioinformatics/edgePy/labels{/name}","releases_url":"https://api.github.com/repos/r-bioinformatics/edgePy/releases{/id}","deployments_url":"https://api.github.com/repos/r-bioinformatics/edgePy/deployments","created_at":"2018-02-27T05:21:13Z","updated_at":"2018-07-17T02:44:22Z","pushed_at":"2018-07-25T22:29:02Z","git_url":"git://github.com/r-bioinformatics/edgePy.git","ssh_url":"git@github.com:r-bioinformatics/edgePy.git","clone_url":"https://github.com/r-bioinformatics/edgePy.git","svn_url":"https://github.com/r-bioinformatics/edgePy","homepage":"https://edgepy.readthedocs.io","size":11239,"stargazers_count":17,"watchers_count":17,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":3,"open_issues":13,"watchers":17,"default_branch":"master"}},"base":{"label":"r-bioinformatics:master","ref":"master","sha":"6626ab136c080d4d9b0fe036626b0d93cd164e55","user":{"login":"r-bioinformatics","id":35074305,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MDc0MzA1","avatar_url":"https://avatars0.githubusercontent.com/u/35074305?v=4","gravatar_id":"","url":"https://api.github.com/users/r-bioinformatics","html_url":"https://github.com/r-bioinformatics","followers_url":"https://api.github.com/users/r-bioinformatics/followers","following_url":"https://api.github.com/users/r-bioinformatics/following{/other_user}","gists_url":"https://api.github.com/users/r-bioinformatics/gists{/gist_id}","starred_url":"https://api.github.com/users/r-bioinformatics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r-bioinformatics/subscriptions","organizations_url":"https://api.github.com/users/r-bioinformatics/orgs","repos_url":"https://api.github.com/users/r-bioinformatics/repos","events_url":"https://api.github.com/users/r-bioinformatics/events{/privacy}","received_events_url":"https://api.github.com/users/r-bioinformatics/received_events","type":"Organization","site_admin":false},"repo":{"id":123076976,"node_id":"MDEwOlJlcG9zaXRvcnkxMjMwNzY5NzY=","name":"edgePy","full_name":"r-bioinformatics/edgePy","owner":{"login":"r-bioinformatics","id":35074305,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MDc0MzA1","avatar_url":"https://avatars0.githubusercontent.com/u/35074305?v=4","gravatar_id":"","url":"https://api.github.com/users/r-bioinformatics","html_url":"https://github.com/r-bioinformatics","followers_url":"https://api.github.com/users/r-bioinformatics/followers","following_url":"https://api.github.com/users/r-bioinformatics/following{/other_user}","gists_url":"https://api.github.com/users/r-bioinformatics/gists{/gist_id}","starred_url":"https://api.github.com/users/r-bioinformatics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r-bioinformatics/subscriptions","organizations_url":"https://api.github.com/users/r-bioinformatics/orgs","repos_url":"https://api.github.com/users/r-bioinformatics/repos","events_url":"https://api.github.com/users/r-bioinformatics/events{/privacy}","received_events_url":"https://api.github.com/users/r-bioinformatics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/r-bioinformatics/edgePy","description":"A Python implementation of edgeR for differential expression analysis","fork":false,"url":"https://api.github.com/repos/r-bioinformatics/edgePy","forks_url":"https://api.github.com/repos/r-bioinformatics/edgePy/forks","keys_url":"https://api.github.com/repos/r-bioinformatics/edgePy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/r-bioinformatics/edgePy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/r-bioinformatics/edgePy/teams","hooks_url":"https://api.github.com/repos/r-bioinformatics/edgePy/hooks","issue_events_url":"https://api.github.com/repos/r-bioinformatics/edgePy/issues/events{/number}","events_url":"https://api.github.com/repos/r-bioinformatics/edgePy/events","assignees_url":"https://api.github.com/repos/r-bioinformatics/edgePy/assignees{/user}","branches_url":"https://api.github.com/repos/r-bioinformatics/edgePy/branches{/branch}","tags_url":"https://api.github.com/repos/r-bioinformatics/edgePy/tags","blobs_url":"https://api.github.com/repos/r-bioinformatics/edgePy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/r-bioinformatics/edgePy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/r-bioinformatics/edgePy/git/refs{/sha}","trees_url":"https://api.github.com/repos/r-bioinformatics/edgePy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/r-bioinformatics/edgePy/statuses/{sha}","languages_url":"https://api.github.com/repos/r-bioinformatics/edgePy/languages","stargazers_url":"https://api.github.com/repos/r-bioinformatics/edgePy/stargazers","contributors_url":"https://api.github.com/repos/r-bioinformatics/edgePy/contributors","subscribers_url":"https://api.github.com/repos/r-bioinformatics/edgePy/subscribers","subscription_url":"https://api.github.com/repos/r-bioinformatics/edgePy/subscription","commits_url":"https://api.github.com/repos/r-bioinformatics/edgePy/commits{/sha}","git_commits_url":"https://api.github.com/repos/r-bioinformatics/edgePy/git/commits{/sha}","comments_url":"https://api.github.com/repos/r-bioinformatics/edgePy/comments{/number}","issue_comment_url":"https://api.github.com/repos/r-bioinformatics/edgePy/issues/comments{/number}","contents_url":"https://api.github.com/repos/r-bioinformatics/edgePy/contents/{+path}","compare_url":"https://api.github.com/repos/r-bioinformatics/edgePy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/r-bioinformatics/edgePy/merges","archive_url":"https://api.github.com/repos/r-bioinformatics/edgePy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/r-bioinformatics/edgePy/downloads","issues_url":"https://api.github.com/repos/r-bioinformatics/edgePy/issues{/number}","pulls_url":"https://api.github.com/repos/r-bioinformatics/edgePy/pulls{/number}","milestones_url":"https://api.github.com/repos/r-bioinformatics/edgePy/milestones{/number}","notifications_url":"https://api.github.com/repos/r-bioinformatics/edgePy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/r-bioinformatics/edgePy/labels{/name}","releases_url":"https://api.github.com/repos/r-bioinformatics/edgePy/releases{/id}","deployments_url":"https://api.github.com/repos/r-bioinformatics/edgePy/deployments","created_at":"2018-02-27T05:21:13Z","updated_at":"2018-07-17T02:44:22Z","pushed_at":"2018-07-25T22:29:02Z","git_url":"git://github.com/r-bioinformatics/edgePy.git","ssh_url":"git@github.com:r-bioinformatics/edgePy.git","clone_url":"https://github.com/r-bioinformatics/edgePy.git","svn_url":"https://github.com/r-bioinformatics/edgePy","homepage":"https://edgepy.readthedocs.io","size":11239,"stargazers_count":17,"watchers_count":17,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":3,"open_issues":13,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/r-bioinformatics/edgePy/pulls/39"},"html":{"href":"https://github.com/r-bioinformatics/edgePy/pull/39"},"issue":{"href":"https://api.github.com/repos/r-bioinformatics/edgePy/issues/39"},"comments":{"href":"https://api.github.com/repos/r-bioinformatics/edgePy/issues/39/comments"},"review_comments":{"href":"https://api.github.com/repos/r-bioinformatics/edgePy/pulls/39/comments"},"review_comment":{"href":"https://api.github.com/repos/r-bioinformatics/edgePy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/r-bioinformatics/edgePy/pulls/39/commits"},"statuses":{"href":"https://api.github.com/repos/r-bioinformatics/edgePy/statuses/3b5acf560276d3959c77dfe878c8ad5bdf197898"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"clintval"}}