GitHub PullRequestReviewCommentEvent at 2014-10-01 13:13:38
Repository: adam
Actor: fnothaft
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/bigdatagenomics/adam/pulls/comments/18276839","id":18276839,"diff_hunk":"@@ -211,7 +195,33 @@ class ADAMContext(val sc: SparkContext) extends Serializable with Logging {\n       if (projection.isDefined) {\n         log.warn(\"Projection is ignored when loading a BAM file\")\n       }\n-      val reads = adamBamLoad(filePath).asInstanceOf[RDD[T]]\n+      val reads = ADAMAlignmentRecordContext.adamBamLoad(sc, filePath).asInstanceOf[RDD[T]]\n+      if (predicate.isDefined) {\n+        val predicateClass = predicate.get\n+        val filter = predicateClass.newInstance()\n+        filter(reads)\n+      } else {\n+        reads\n+      }\n+    } else if (filePath.endsWith(\".ifq\") && classOf[AlignmentRecord].isAssignableFrom(manifest[T].runtimeClass)) {\n+\n+      if (projection.isDefined) {\n+        log.warn(\"Projection is ignored when loading an interleaved FASTQ file\")\n+      }\n+      val reads = ADAMAlignmentRecordContext.adamInterleavedFastqLoad(sc, filePath).asInstanceOf[RDD[T]]\n+      if (predicate.isDefined) {\n+        val predicateClass = predicate.get\n+        val filter = predicateClass.newInstance()\n+        filter(reads)\n+      } else {\n+        reads\n+      }\n+    } else if (filePath.endsWith(\".fq\") && classOf[AlignmentRecord].isAssignableFrom(manifest[T].runtimeClass)) {","path":"adam-core/src/main/scala/org/bdgenomics/adam/rdd/ADAMContext.scala","position":58,"original_position":58,"commit_id":"806814f7162d741490564b758b634fb1b2566498","original_commit_id":"806814f7162d741490564b758b634fb1b2566498","user":{"login":"fnothaft","id":3752466,"avatar_url":"https://avatars.githubusercontent.com/u/3752466?v=2","gravatar_id":"","url":"https://api.github.com/users/fnothaft","html_url":"https://github.com/fnothaft","followers_url":"https://api.github.com/users/fnothaft/followers","following_url":"https://api.github.com/users/fnothaft/following{/other_user}","gists_url":"https://api.github.com/users/fnothaft/gists{/gist_id}","starred_url":"https://api.github.com/users/fnothaft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fnothaft/subscriptions","organizations_url":"https://api.github.com/users/fnothaft/orgs","repos_url":"https://api.github.com/users/fnothaft/repos","events_url":"https://api.github.com/users/fnothaft/events{/privacy}","received_events_url":"https://api.github.com/users/fnothaft/received_events","type":"User","site_admin":false},"body":"Yes, good point.","created_at":"2014-10-01T13:13:38Z","updated_at":"2014-10-01T13:13:38Z","html_url":"https://github.com/bigdatagenomics/adam/pull/385#discussion_r18276839","pull_request_url":"https://api.github.com/repos/bigdatagenomics/adam/pulls/385","_links":{"self":{"href":"https://api.github.com/repos/bigdatagenomics/adam/pulls/comments/18276839"},"html":{"href":"https://github.com/bigdatagenomics/adam/pull/385#discussion_r18276839"},"pull_request":{"href":"https://api.github.com/repos/bigdatagenomics/adam/pulls/385"}}},"pull_request":{"url":"https://api.github.com/repos/bigdatagenomics/adam/pulls/385","id":21338859,"html_url":"https://github.com/bigdatagenomics/adam/pull/385","diff_url":"https://github.com/bigdatagenomics/adam/pull/385.diff","patch_url":"https://github.com/bigdatagenomics/adam/pull/385.patch","issue_url":"https://api.github.com/repos/bigdatagenomics/adam/issues/385","number":385,"state":"open","locked":false,"title":"[ADAM-384] Adds import from FASTQ.","user":{"login":"fnothaft","id":3752466,"avatar_url":"https://avatars.githubusercontent.com/u/3752466?v=2","gravatar_id":"","url":"https://api.github.com/users/fnothaft","html_url":"https://github.com/fnothaft","followers_url":"https://api.github.com/users/fnothaft/followers","following_url":"https://api.github.com/users/fnothaft/following{/other_user}","gists_url":"https://api.github.com/users/fnothaft/gists{/gist_id}","starred_url":"https://api.github.com/users/fnothaft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fnothaft/subscriptions","organizations_url":"https://api.github.com/users/fnothaft/orgs","repos_url":"https://api.github.com/users/fnothaft/repos","events_url":"https://api.github.com/users/fnothaft/events{/privacy}","received_events_url":"https://api.github.com/users/fnothaft/received_events","type":"User","site_admin":false},"body":"Resolves #384. Adds:\r\n\r\n* Load from \"single ended\" FASTQ\r\n* Load from interleaved FASTQ\r\n* Load from non-interleaved paired end (two file) FASTQ\r\n\r\nLoad from single ended FASTQ and interleaved FASTQ are handled seamlessly by the ADAMContext.adamLoad method. Since paired ended (but non-interleaved) data requires two file paths, I haven't added it into adamLoad; thus, it sits on its own.\r\n\r\nI wrote our own FASTQ input format instead of using the one in Hadoop-BAM; theirs is only compatible with Hadoop 1, performs unnecessary parsing, and doesn't seem to pick splits correctly anyways. The SingleFastqInputFormat is _almost_ a direct copy of the InterleavedFastqInputFormat, which we've tested pretty well on clusters.","created_at":"2014-09-17T00:46:18Z","updated_at":"2014-10-01T13:13:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ef26f79fa5e71a08f083cdccaf94adf6a33fe861","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bigdatagenomics/adam/pulls/385/commits","review_comments_url":"https://api.github.com/repos/bigdatagenomics/adam/pulls/385/comments","review_comment_url":"https://api.github.com/repos/bigdatagenomics/adam/pulls/comments/{number}","comments_url":"https://api.github.com/repos/bigdatagenomics/adam/issues/385/comments","statuses_url":"https://api.github.com/repos/bigdatagenomics/adam/statuses/806814f7162d741490564b758b634fb1b2566498","head":{"label":"fnothaft:fastq-input","ref":"fastq-input","sha":"806814f7162d741490564b758b634fb1b2566498","user":{"login":"fnothaft","id":3752466,"avatar_url":"https://avatars.githubusercontent.com/u/3752466?v=2","gravatar_id":"","url":"https://api.github.com/users/fnothaft","html_url":"https://github.com/fnothaft","followers_url":"https://api.github.com/users/fnothaft/followers","following_url":"https://api.github.com/users/fnothaft/following{/other_user}","gists_url":"https://api.github.com/users/fnothaft/gists{/gist_id}","starred_url":"https://api.github.com/users/fnothaft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fnothaft/subscriptions","organizations_url":"https://api.github.com/users/fnothaft/orgs","repos_url":"https://api.github.com/users/fnothaft/repos","events_url":"https://api.github.com/users/fnothaft/events{/privacy}","received_events_url":"https://api.github.com/users/fnothaft/received_events","type":"User","site_admin":false},"repo":{"id":16842658,"name":"adam","full_name":"fnothaft/adam","owner":{"login":"fnothaft","id":3752466,"avatar_url":"https://avatars.githubusercontent.com/u/3752466?v=2","gravatar_id":"","url":"https://api.github.com/users/fnothaft","html_url":"https://github.com/fnothaft","followers_url":"https://api.github.com/users/fnothaft/followers","following_url":"https://api.github.com/users/fnothaft/following{/other_user}","gists_url":"https://api.github.com/users/fnothaft/gists{/gist_id}","starred_url":"https://api.github.com/users/fnothaft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fnothaft/subscriptions","organizations_url":"https://api.github.com/users/fnothaft/orgs","repos_url":"https://api.github.com/users/fnothaft/repos","events_url":"https://api.github.com/users/fnothaft/events{/privacy}","received_events_url":"https://api.github.com/users/fnothaft/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fnothaft/adam","description":"A genomics processing engine and specialized file format built using Apache Avro, Apache Spark and Parquet. Apache 2 licensed.","fork":true,"url":"https://api.github.com/repos/fnothaft/adam","forks_url":"https://api.github.com/repos/fnothaft/adam/forks","keys_url":"https://api.github.com/repos/fnothaft/adam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fnothaft/adam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fnothaft/adam/teams","hooks_url":"https://api.github.com/repos/fnothaft/adam/hooks","issue_events_url":"https://api.github.com/repos/fnothaft/adam/issues/events{/number}","events_url":"https://api.github.com/repos/fnothaft/adam/events","assignees_url":"https://api.github.com/repos/fnothaft/adam/assignees{/user}","branches_url":"https://api.github.com/repos/fnothaft/adam/branches{/branch}","tags_url":"https://api.github.com/repos/fnothaft/adam/tags","blobs_url":"https://api.github.com/repos/fnothaft/adam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fnothaft/adam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fnothaft/adam/git/refs{/sha}","trees_url":"https://api.github.com/repos/fnothaft/adam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fnothaft/adam/statuses/{sha}","languages_url":"https://api.github.com/repos/fnothaft/adam/languages","stargazers_url":"https://api.github.com/repos/fnothaft/adam/stargazers","contributors_url":"https://api.github.com/repos/fnothaft/adam/contributors","subscribers_url":"https://api.github.com/repos/fnothaft/adam/subscribers","subscription_url":"https://api.github.com/repos/fnothaft/adam/subscription","commits_url":"https://api.github.com/repos/fnothaft/adam/commits{/sha}","git_commits_url":"https://api.github.com/repos/fnothaft/adam/git/commits{/sha}","comments_url":"https://api.github.com/repos/fnothaft/adam/comments{/number}","issue_comment_url":"https://api.github.com/repos/fnothaft/adam/issues/comments/{number}","contents_url":"https://api.github.com/repos/fnothaft/adam/contents/{+path}","compare_url":"https://api.github.com/repos/fnothaft/adam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fnothaft/adam/merges","archive_url":"https://api.github.com/repos/fnothaft/adam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fnothaft/adam/downloads","issues_url":"https://api.github.com/repos/fnothaft/adam/issues{/number}","pulls_url":"https://api.github.com/repos/fnothaft/adam/pulls{/number}","milestones_url":"https://api.github.com/repos/fnothaft/adam/milestones{/number}","notifications_url":"https://api.github.com/repos/fnothaft/adam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fnothaft/adam/labels{/name}","releases_url":"https://api.github.com/repos/fnothaft/adam/releases{/id}","created_at":"2014-02-14T16:25:30Z","updated_at":"2014-06-24T16:52:53Z","pushed_at":"2014-09-30T04:41:28Z","git_url":"git://github.com/fnothaft/adam.git","ssh_url":"git@github.com:fnothaft/adam.git","clone_url":"https://github.com/fnothaft/adam.git","svn_url":"https://github.com/fnothaft/adam","homepage":"","size":5481,"stargazers_count":0,"watchers_count":0,"language":"Scala","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":"bigdatagenomics:master","ref":"master","sha":"b30678fbe78e038f6d44f883f66fe03d53a555a4","user":{"login":"bigdatagenomics","id":5839438,"avatar_url":"https://avatars.githubusercontent.com/u/5839438?v=2","gravatar_id":"","url":"https://api.github.com/users/bigdatagenomics","html_url":"https://github.com/bigdatagenomics","followers_url":"https://api.github.com/users/bigdatagenomics/followers","following_url":"https://api.github.com/users/bigdatagenomics/following{/other_user}","gists_url":"https://api.github.com/users/bigdatagenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/bigdatagenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bigdatagenomics/subscriptions","organizations_url":"https://api.github.com/users/bigdatagenomics/orgs","repos_url":"https://api.github.com/users/bigdatagenomics/repos","events_url":"https://api.github.com/users/bigdatagenomics/events{/privacy}","received_events_url":"https://api.github.com/users/bigdatagenomics/received_events","type":"Organization","site_admin":false},"repo":{"id":14541530,"name":"adam","full_name":"bigdatagenomics/adam","owner":{"login":"bigdatagenomics","id":5839438,"avatar_url":"https://avatars.githubusercontent.com/u/5839438?v=2","gravatar_id":"","url":"https://api.github.com/users/bigdatagenomics","html_url":"https://github.com/bigdatagenomics","followers_url":"https://api.github.com/users/bigdatagenomics/followers","following_url":"https://api.github.com/users/bigdatagenomics/following{/other_user}","gists_url":"https://api.github.com/users/bigdatagenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/bigdatagenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bigdatagenomics/subscriptions","organizations_url":"https://api.github.com/users/bigdatagenomics/orgs","repos_url":"https://api.github.com/users/bigdatagenomics/repos","events_url":"https://api.github.com/users/bigdatagenomics/events{/privacy}","received_events_url":"https://api.github.com/users/bigdatagenomics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bigdatagenomics/adam","description":"A genomics processing engine and specialized file format built using Apache Avro, Apache Spark and Parquet. Apache 2 licensed.","fork":false,"url":"https://api.github.com/repos/bigdatagenomics/adam","forks_url":"https://api.github.com/repos/bigdatagenomics/adam/forks","keys_url":"https://api.github.com/repos/bigdatagenomics/adam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bigdatagenomics/adam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bigdatagenomics/adam/teams","hooks_url":"https://api.github.com/repos/bigdatagenomics/adam/hooks","issue_events_url":"https://api.github.com/repos/bigdatagenomics/adam/issues/events{/number}","events_url":"https://api.github.com/repos/bigdatagenomics/adam/events","assignees_url":"https://api.github.com/repos/bigdatagenomics/adam/assignees{/user}","branches_url":"https://api.github.com/repos/bigdatagenomics/adam/branches{/branch}","tags_url":"https://api.github.com/repos/bigdatagenomics/adam/tags","blobs_url":"https://api.github.com/repos/bigdatagenomics/adam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bigdatagenomics/adam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bigdatagenomics/adam/git/refs{/sha}","trees_url":"https://api.github.com/repos/bigdatagenomics/adam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bigdatagenomics/adam/statuses/{sha}","languages_url":"https://api.github.com/repos/bigdatagenomics/adam/languages","stargazers_url":"https://api.github.com/repos/bigdatagenomics/adam/stargazers","contributors_url":"https://api.github.com/repos/bigdatagenomics/adam/contributors","subscribers_url":"https://api.github.com/repos/bigdatagenomics/adam/subscribers","subscription_url":"https://api.github.com/repos/bigdatagenomics/adam/subscription","commits_url":"https://api.github.com/repos/bigdatagenomics/adam/commits{/sha}","git_commits_url":"https://api.github.com/repos/bigdatagenomics/adam/git/commits{/sha}","comments_url":"https://api.github.com/repos/bigdatagenomics/adam/comments{/number}","issue_comment_url":"https://api.github.com/repos/bigdatagenomics/adam/issues/comments/{number}","contents_url":"https://api.github.com/repos/bigdatagenomics/adam/contents/{+path}","compare_url":"https://api.github.com/repos/bigdatagenomics/adam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bigdatagenomics/adam/merges","archive_url":"https://api.github.com/repos/bigdatagenomics/adam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bigdatagenomics/adam/downloads","issues_url":"https://api.github.com/repos/bigdatagenomics/adam/issues{/number}","pulls_url":"https://api.github.com/repos/bigdatagenomics/adam/pulls{/number}","milestones_url":"https://api.github.com/repos/bigdatagenomics/adam/milestones{/number}","notifications_url":"https://api.github.com/repos/bigdatagenomics/adam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bigdatagenomics/adam/labels{/name}","releases_url":"https://api.github.com/repos/bigdatagenomics/adam/releases{/id}","created_at":"2013-11-19T23:47:57Z","updated_at":"2014-09-18T05:05:37Z","pushed_at":"2014-09-29T15:38:01Z","git_url":"git://github.com/bigdatagenomics/adam.git","ssh_url":"git@github.com:bigdatagenomics/adam.git","clone_url":"https://github.com/bigdatagenomics/adam.git","svn_url":"https://github.com/bigdatagenomics/adam","homepage":"http://bdgenomics.org/","size":58008,"stargazers_count":143,"watchers_count":143,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":46,"mirror_url":null,"open_issues_count":45,"forks":46,"open_issues":45,"watchers":143,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bigdatagenomics/adam/pulls/385"},"html":{"href":"https://github.com/bigdatagenomics/adam/pull/385"},"issue":{"href":"https://api.github.com/repos/bigdatagenomics/adam/issues/385"},"comments":{"href":"https://api.github.com/repos/bigdatagenomics/adam/issues/385/comments"},"review_comments":{"href":"https://api.github.com/repos/bigdatagenomics/adam/pulls/385/comments"},"review_comment":{"href":"https://api.github.com/repos/bigdatagenomics/adam/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/bigdatagenomics/adam/pulls/385/commits"},"statuses":{"href":"https://api.github.com/repos/bigdatagenomics/adam/statuses/806814f7162d741490564b758b634fb1b2566498"}}}}