{"action":"created","comment":{"url":"https://api.github.com/repos/fulcrumgenomics/fgbio/pulls/comments/169937400","pull_request_review_id":98539964,"id":169937400,"diff_hunk":"@@ -126,10 +126,19 @@ class ExtractUmisFromBam\n     if (molecularIndexTags.contains(tag)) invalid(s\"$tag specified as single-tag and also per-index tag\")\n   }\n \n-  override def execute(): Unit = {\n-    assert(molecularIndexTags1.length == rs1.molecularBarcodeSegments.length)\n-    rs2.foreach(rs => assert(molecularIndexTags2.length == rs.molecularBarcodeSegments.length))\n+  // Validate that the # of molecular barcodes in the read structure matches the tags\n+  {\n+    def validateMolecularBarcodesInReadStructureAndTag(rs: ReadStructure, tags: Seq[String]): Unit = {","path":"src/main/scala/com/fulcrumgenomics/umi/ExtractUmisFromBam.scala","position":9,"original_position":9,"commit_id":"6a0801e7e70e14244a6cedcce6a2c7c1fff32bd6","original_commit_id":"6a0801e7e70e14244a6cedcce6a2c7c1fff32bd6","user":{"login":"tfenne","id":1609210,"avatar_url":"https://avatars3.githubusercontent.com/u/1609210?v=4","gravatar_id":"","url":"https://api.github.com/users/tfenne","html_url":"https://github.com/tfenne","followers_url":"https://api.github.com/users/tfenne/followers","following_url":"https://api.github.com/users/tfenne/following{/other_user}","gists_url":"https://api.github.com/users/tfenne/gists{/gist_id}","starred_url":"https://api.github.com/users/tfenne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfenne/subscriptions","organizations_url":"https://api.github.com/users/tfenne/orgs","repos_url":"https://api.github.com/users/tfenne/repos","events_url":"https://api.github.com/users/tfenne/events{/privacy}","received_events_url":"https://api.github.com/users/tfenne/received_events","type":"User","site_admin":false},"body":"Not sure if it's clearer or not, but instead of a block with a function you could write something like:\r\n\r\n```scala\r\nfor (stuff <- Seq(Some(rs1, molecularIndexTags1), rs2.map(r => (r, molecularIndexTags2))); (rs, tags) <- stuff) {\r\n  validate(molecularIndexTags1.length == rs.molecularBarcodeSegments.length,\r\n    s\"Read structure '$rs' had '${rs.molecularBarcodeSegments.length}' molecular barcodes\" +\r\n    s\"but '${tags.length}' molecular barcode tags expected (${tags.mkString(\", \")}\")\r\n}\r\n```","created_at":"2018-02-22T12:12:43Z","updated_at":"2018-02-22T12:15:30Z","html_url":"https://github.com/fulcrumgenomics/fgbio/pull/367#discussion_r169937400","pull_request_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/pulls/367","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/fulcrumgenomics/fgbio/pulls/comments/169937400"},"html":{"href":"https://github.com/fulcrumgenomics/fgbio/pull/367#discussion_r169937400"},"pull_request":{"href":"https://api.github.com/repos/fulcrumgenomics/fgbio/pulls/367"}},"in_reply_to_id":169936630},"pull_request":{"url":"https://api.github.com/repos/fulcrumgenomics/fgbio/pulls/367","id":170610985,"html_url":"https://github.com/fulcrumgenomics/fgbio/pull/367","diff_url":"https://github.com/fulcrumgenomics/fgbio/pull/367.diff","patch_url":"https://github.com/fulcrumgenomics/fgbio/pull/367.patch","issue_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/issues/367","number":367,"state":"open","locked":false,"title":"Improve error messages in ExtractUmisFromBam","user":{"login":"nh13","id":846274,"avatar_url":"https://avatars1.githubusercontent.com/u/846274?v=4","gravatar_id":"","url":"https://api.github.com/users/nh13","html_url":"https://github.com/nh13","followers_url":"https://api.github.com/users/nh13/followers","following_url":"https://api.github.com/users/nh13/following{/other_user}","gists_url":"https://api.github.com/users/nh13/gists{/gist_id}","starred_url":"https://api.github.com/users/nh13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nh13/subscriptions","organizations_url":"https://api.github.com/users/nh13/orgs","repos_url":"https://api.github.com/users/nh13/repos","events_url":"https://api.github.com/users/nh13/events{/privacy}","received_events_url":"https://api.github.com/users/nh13/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-02-21T22:51:05Z","updated_at":"2018-02-22T12:15:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a98d9793dd4b88a63d9821d58a0690d756eb5720","assignee":{"login":"tfenne","id":1609210,"avatar_url":"https://avatars3.githubusercontent.com/u/1609210?v=4","gravatar_id":"","url":"https://api.github.com/users/tfenne","html_url":"https://github.com/tfenne","followers_url":"https://api.github.com/users/tfenne/followers","following_url":"https://api.github.com/users/tfenne/following{/other_user}","gists_url":"https://api.github.com/users/tfenne/gists{/gist_id}","starred_url":"https://api.github.com/users/tfenne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfenne/subscriptions","organizations_url":"https://api.github.com/users/tfenne/orgs","repos_url":"https://api.github.com/users/tfenne/repos","events_url":"https://api.github.com/users/tfenne/events{/privacy}","received_events_url":"https://api.github.com/users/tfenne/received_events","type":"User","site_admin":false},"assignees":[{"login":"tfenne","id":1609210,"avatar_url":"https://avatars3.githubusercontent.com/u/1609210?v=4","gravatar_id":"","url":"https://api.github.com/users/tfenne","html_url":"https://github.com/tfenne","followers_url":"https://api.github.com/users/tfenne/followers","following_url":"https://api.github.com/users/tfenne/following{/other_user}","gists_url":"https://api.github.com/users/tfenne/gists{/gist_id}","starred_url":"https://api.github.com/users/tfenne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfenne/subscriptions","organizations_url":"https://api.github.com/users/tfenne/orgs","repos_url":"https://api.github.com/users/tfenne/repos","events_url":"https://api.github.com/users/tfenne/events{/privacy}","received_events_url":"https://api.github.com/users/tfenne/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/pulls/367/commits","review_comments_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/pulls/367/comments","review_comment_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/issues/367/comments","statuses_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/statuses/6a0801e7e70e14244a6cedcce6a2c7c1fff32bd6","head":{"label":"fulcrumgenomics:nh_extract_umis_better_error","ref":"nh_extract_umis_better_error","sha":"6a0801e7e70e14244a6cedcce6a2c7c1fff32bd6","user":{"login":"fulcrumgenomics","id":13546013,"avatar_url":"https://avatars0.githubusercontent.com/u/13546013?v=4","gravatar_id":"","url":"https://api.github.com/users/fulcrumgenomics","html_url":"https://github.com/fulcrumgenomics","followers_url":"https://api.github.com/users/fulcrumgenomics/followers","following_url":"https://api.github.com/users/fulcrumgenomics/following{/other_user}","gists_url":"https://api.github.com/users/fulcrumgenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/fulcrumgenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fulcrumgenomics/subscriptions","organizations_url":"https://api.github.com/users/fulcrumgenomics/orgs","repos_url":"https://api.github.com/users/fulcrumgenomics/repos","events_url":"https://api.github.com/users/fulcrumgenomics/events{/privacy}","received_events_url":"https://api.github.com/users/fulcrumgenomics/received_events","type":"Organization","site_admin":false},"repo":{"id":53011104,"name":"fgbio","full_name":"fulcrumgenomics/fgbio","owner":{"login":"fulcrumgenomics","id":13546013,"avatar_url":"https://avatars0.githubusercontent.com/u/13546013?v=4","gravatar_id":"","url":"https://api.github.com/users/fulcrumgenomics","html_url":"https://github.com/fulcrumgenomics","followers_url":"https://api.github.com/users/fulcrumgenomics/followers","following_url":"https://api.github.com/users/fulcrumgenomics/following{/other_user}","gists_url":"https://api.github.com/users/fulcrumgenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/fulcrumgenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fulcrumgenomics/subscriptions","organizations_url":"https://api.github.com/users/fulcrumgenomics/orgs","repos_url":"https://api.github.com/users/fulcrumgenomics/repos","events_url":"https://api.github.com/users/fulcrumgenomics/events{/privacy}","received_events_url":"https://api.github.com/users/fulcrumgenomics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fulcrumgenomics/fgbio","description":"Tools for working with genomic and high throughput sequencing data.","fork":false,"url":"https://api.github.com/repos/fulcrumgenomics/fgbio","forks_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/forks","keys_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/teams","hooks_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/hooks","issue_events_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/issues/events{/number}","events_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/events","assignees_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/assignees{/user}","branches_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/branches{/branch}","tags_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/tags","blobs_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/git/refs{/sha}","trees_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/statuses/{sha}","languages_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/languages","stargazers_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/stargazers","contributors_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/contributors","subscribers_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/subscribers","subscription_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/subscription","commits_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/commits{/sha}","git_commits_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/git/commits{/sha}","comments_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/comments{/number}","issue_comment_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/issues/comments{/number}","contents_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/contents/{+path}","compare_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/merges","archive_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/downloads","issues_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/issues{/number}","pulls_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/pulls{/number}","milestones_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/milestones{/number}","notifications_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/labels{/name}","releases_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/releases{/id}","deployments_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/deployments","created_at":"2016-03-03T01:44:56Z","updated_at":"2018-02-02T23:06:48Z","pushed_at":"2018-02-22T05:53:10Z","git_url":"git://github.com/fulcrumgenomics/fgbio.git","ssh_url":"git@github.com:fulcrumgenomics/fgbio.git","clone_url":"https://github.com/fulcrumgenomics/fgbio.git","svn_url":"https://github.com/fulcrumgenomics/fgbio","homepage":"http://fulcrumgenomics.github.io/fgbio/","size":7870,"stargazers_count":46,"watchers_count":46,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":33,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":7,"open_issues":33,"watchers":46,"default_branch":"master"}},"base":{"label":"fulcrumgenomics:master","ref":"master","sha":"867b031a66cd1fe1184a9835f4a2cbadbc0b4d9f","user":{"login":"fulcrumgenomics","id":13546013,"avatar_url":"https://avatars0.githubusercontent.com/u/13546013?v=4","gravatar_id":"","url":"https://api.github.com/users/fulcrumgenomics","html_url":"https://github.com/fulcrumgenomics","followers_url":"https://api.github.com/users/fulcrumgenomics/followers","following_url":"https://api.github.com/users/fulcrumgenomics/following{/other_user}","gists_url":"https://api.github.com/users/fulcrumgenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/fulcrumgenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fulcrumgenomics/subscriptions","organizations_url":"https://api.github.com/users/fulcrumgenomics/orgs","repos_url":"https://api.github.com/users/fulcrumgenomics/repos","events_url":"https://api.github.com/users/fulcrumgenomics/events{/privacy}","received_events_url":"https://api.github.com/users/fulcrumgenomics/received_events","type":"Organization","site_admin":false},"repo":{"id":53011104,"name":"fgbio","full_name":"fulcrumgenomics/fgbio","owner":{"login":"fulcrumgenomics","id":13546013,"avatar_url":"https://avatars0.githubusercontent.com/u/13546013?v=4","gravatar_id":"","url":"https://api.github.com/users/fulcrumgenomics","html_url":"https://github.com/fulcrumgenomics","followers_url":"https://api.github.com/users/fulcrumgenomics/followers","following_url":"https://api.github.com/users/fulcrumgenomics/following{/other_user}","gists_url":"https://api.github.com/users/fulcrumgenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/fulcrumgenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fulcrumgenomics/subscriptions","organizations_url":"https://api.github.com/users/fulcrumgenomics/orgs","repos_url":"https://api.github.com/users/fulcrumgenomics/repos","events_url":"https://api.github.com/users/fulcrumgenomics/events{/privacy}","received_events_url":"https://api.github.com/users/fulcrumgenomics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fulcrumgenomics/fgbio","description":"Tools for working with genomic and high throughput sequencing data.","fork":false,"url":"https://api.github.com/repos/fulcrumgenomics/fgbio","forks_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/forks","keys_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/teams","hooks_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/hooks","issue_events_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/issues/events{/number}","events_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/events","assignees_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/assignees{/user}","branches_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/branches{/branch}","tags_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/tags","blobs_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/git/refs{/sha}","trees_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/statuses/{sha}","languages_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/languages","stargazers_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/stargazers","contributors_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/contributors","subscribers_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/subscribers","subscription_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/subscription","commits_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/commits{/sha}","git_commits_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/git/commits{/sha}","comments_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/comments{/number}","issue_comment_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/issues/comments{/number}","contents_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/contents/{+path}","compare_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/merges","archive_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/downloads","issues_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/issues{/number}","pulls_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/pulls{/number}","milestones_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/milestones{/number}","notifications_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/labels{/name}","releases_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/releases{/id}","deployments_url":"https://api.github.com/repos/fulcrumgenomics/fgbio/deployments","created_at":"2016-03-03T01:44:56Z","updated_at":"2018-02-02T23:06:48Z","pushed_at":"2018-02-22T05:53:10Z","git_url":"git://github.com/fulcrumgenomics/fgbio.git","ssh_url":"git@github.com:fulcrumgenomics/fgbio.git","clone_url":"https://github.com/fulcrumgenomics/fgbio.git","svn_url":"https://github.com/fulcrumgenomics/fgbio","homepage":"http://fulcrumgenomics.github.io/fgbio/","size":7870,"stargazers_count":46,"watchers_count":46,"language":"Scala","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":33,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":7,"open_issues":33,"watchers":46,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fulcrumgenomics/fgbio/pulls/367"},"html":{"href":"https://github.com/fulcrumgenomics/fgbio/pull/367"},"issue":{"href":"https://api.github.com/repos/fulcrumgenomics/fgbio/issues/367"},"comments":{"href":"https://api.github.com/repos/fulcrumgenomics/fgbio/issues/367/comments"},"review_comments":{"href":"https://api.github.com/repos/fulcrumgenomics/fgbio/pulls/367/comments"},"review_comment":{"href":"https://api.github.com/repos/fulcrumgenomics/fgbio/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fulcrumgenomics/fgbio/pulls/367/commits"},"statuses":{"href":"https://api.github.com/repos/fulcrumgenomics/fgbio/statuses/6a0801e7e70e14244a6cedcce6a2c7c1fff32bd6"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"tfenne"}}