{"action":"created","comment":{"url":"https://api.github.com/repos/icgc-dcc/dcc-import/pulls/comments/57264225","id":57264225,"diff_hunk":"@@ -0,0 +1,54 @@\n+/*\n+ * Copyright (c) 2016 The Ontario Institute for Cancer Research. All rights reserved.                             \n+ *                                                                                                               \n+ * This program and the accompanying materials are made available under the terms of the GNU Public License v3.0.\n+ * You should have received a copy of the GNU General Public License along with                                  \n+ * this program. If not, see <http://www.gnu.org/licenses/>.                                                     \n+ *                                                                                                               \n+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY                           \n+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES                          \n+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT                           \n+ * SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,                                \n+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED                          \n+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;                               \n+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER                              \n+ * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN                         \n+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+ */\n+package org.icgc.dcc.imports.gene.thread;\n+\n+import java.io.InputStream;\n+import java.util.Map;\n+\n+import javax.xml.parsers.SAXParser;\n+import javax.xml.parsers.SAXParserFactory;\n+\n+import org.icgc.dcc.imports.gene.reader.XMLHandler;\n+\n+import lombok.NonNull;\n+import lombok.RequiredArgsConstructor;\n+import lombok.SneakyThrows;\n+import lombok.val;\n+\n+@RequiredArgsConstructor\n+public class OutputReader implements Runnable {\n+\n+  @NonNull\n+  private final InputStream in;\n+  @NonNull\n+  private final Map<String, String> summaryMap;\n+\n+  @Override\n+  @SneakyThrows\n+  public void run() {\n+    val factory = SAXParserFactory.newInstance();\n+    factory.setValidating(false);\n+    factory.setFeature(\"http://xml.org/sax/features/validation\", false);\n+    factory.setFeature(\"http://apache.org/xml/features/nonvalidating/load-external-dtd\", false);\n+    val handler = new XMLHandler(summaryMap);\n+\n+    SAXParser saxParser = factory.newSAXParser();","path":"dcc-import-gene/src/main/java/org/icgc/dcc/imports/gene/thread/OutputReader.java","position":50,"original_position":50,"commit_id":"c5ad93575fcec7e95563962137c339c49bfa909a","original_commit_id":"c5ad93575fcec7e95563962137c339c49bfa909a","user":{"login":"btiernay","id":2717578,"avatar_url":"https://avatars.githubusercontent.com/u/2717578?v=3","gravatar_id":"","url":"https://api.github.com/users/btiernay","html_url":"https://github.com/btiernay","followers_url":"https://api.github.com/users/btiernay/followers","following_url":"https://api.github.com/users/btiernay/following{/other_user}","gists_url":"https://api.github.com/users/btiernay/gists{/gist_id}","starred_url":"https://api.github.com/users/btiernay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btiernay/subscriptions","organizations_url":"https://api.github.com/users/btiernay/orgs","repos_url":"https://api.github.com/users/btiernay/repos","events_url":"https://api.github.com/users/btiernay/events{/privacy}","received_events_url":"https://api.github.com/users/btiernay/received_events","type":"User","site_admin":false},"body":"`val`","created_at":"2016-03-24T01:35:49Z","updated_at":"2016-03-24T01:35:49Z","html_url":"https://github.com/icgc-dcc/dcc-import/pull/1#discussion_r57264225","pull_request_url":"https://api.github.com/repos/icgc-dcc/dcc-import/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/icgc-dcc/dcc-import/pulls/comments/57264225"},"html":{"href":"https://github.com/icgc-dcc/dcc-import/pull/1#discussion_r57264225"},"pull_request":{"href":"https://api.github.com/repos/icgc-dcc/dcc-import/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/icgc-dcc/dcc-import/pulls/1","id":61149944,"html_url":"https://github.com/icgc-dcc/dcc-import/pull/1","diff_url":"https://github.com/icgc-dcc/dcc-import/pull/1.diff","patch_url":"https://github.com/icgc-dcc/dcc-import/pull/1.patch","issue_url":"https://api.github.com/repos/icgc-dcc/dcc-import/issues/1","number":1,"state":"open","locked":false,"title":"Feature/new gene model","user":{"login":"andricDu","id":6350043,"avatar_url":"https://avatars.githubusercontent.com/u/6350043?v=3","gravatar_id":"","url":"https://api.github.com/users/andricDu","html_url":"https://github.com/andricDu","followers_url":"https://api.github.com/users/andricDu/followers","following_url":"https://api.github.com/users/andricDu/following{/other_user}","gists_url":"https://api.github.com/users/andricDu/gists{/gist_id}","starred_url":"https://api.github.com/users/andricDu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andricDu/subscriptions","organizations_url":"https://api.github.com/users/andricDu/orgs","repos_url":"https://api.github.com/users/andricDu/repos","events_url":"https://api.github.com/users/andricDu/events{/privacy}","received_events_url":"https://api.github.com/users/andricDu/received_events","type":"User","site_admin":false},"body":"Ready for code review. \r\n\r\nStreams in data from Ensembl and NCBI and constructs HashMaps which it then joins onto the correct Nodes (Gene/Transcript/Exon) as they are constructed from the streamed GTF file. Genes are written to mongo as soon as their construction is done. \r\n\r\nNCBI data is ready by the Gene2Xml binary which is downloaded to a temp dir for use. \r\n\r\nControl flow and calculation in the postProcessTranscript function is largely based on the implementation of heliotrope with necessary changes due to the need to do some computation by hand rather than pulling from table columns. ","created_at":"2016-02-29T21:40:20Z","updated_at":"2016-03-24T01:35:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cddefb01cbbe1e4b25c1cb03e81d781757d6562d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/icgc-dcc/dcc-import/pulls/1/commits","review_comments_url":"https://api.github.com/repos/icgc-dcc/dcc-import/pulls/1/comments","review_comment_url":"https://api.github.com/repos/icgc-dcc/dcc-import/pulls/comments{/number}","comments_url":"https://api.github.com/repos/icgc-dcc/dcc-import/issues/1/comments","statuses_url":"https://api.github.com/repos/icgc-dcc/dcc-import/statuses/c5ad93575fcec7e95563962137c339c49bfa909a","head":{"label":"icgc-dcc:feature/new-gene-model","ref":"feature/new-gene-model","sha":"c5ad93575fcec7e95563962137c339c49bfa909a","user":{"login":"icgc-dcc","id":1508638,"avatar_url":"https://avatars.githubusercontent.com/u/1508638?v=3","gravatar_id":"","url":"https://api.github.com/users/icgc-dcc","html_url":"https://github.com/icgc-dcc","followers_url":"https://api.github.com/users/icgc-dcc/followers","following_url":"https://api.github.com/users/icgc-dcc/following{/other_user}","gists_url":"https://api.github.com/users/icgc-dcc/gists{/gist_id}","starred_url":"https://api.github.com/users/icgc-dcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icgc-dcc/subscriptions","organizations_url":"https://api.github.com/users/icgc-dcc/orgs","repos_url":"https://api.github.com/users/icgc-dcc/repos","events_url":"https://api.github.com/users/icgc-dcc/events{/privacy}","received_events_url":"https://api.github.com/users/icgc-dcc/received_events","type":"Organization","site_admin":false},"repo":{"id":50677343,"name":"dcc-import","full_name":"icgc-dcc/dcc-import","owner":{"login":"icgc-dcc","id":1508638,"avatar_url":"https://avatars.githubusercontent.com/u/1508638?v=3","gravatar_id":"","url":"https://api.github.com/users/icgc-dcc","html_url":"https://github.com/icgc-dcc","followers_url":"https://api.github.com/users/icgc-dcc/followers","following_url":"https://api.github.com/users/icgc-dcc/following{/other_user}","gists_url":"https://api.github.com/users/icgc-dcc/gists{/gist_id}","starred_url":"https://api.github.com/users/icgc-dcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icgc-dcc/subscriptions","organizations_url":"https://api.github.com/users/icgc-dcc/orgs","repos_url":"https://api.github.com/users/icgc-dcc/repos","events_url":"https://api.github.com/users/icgc-dcc/events{/privacy}","received_events_url":"https://api.github.com/users/icgc-dcc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/icgc-dcc/dcc-import","description":"Reference data importers","fork":false,"url":"https://api.github.com/repos/icgc-dcc/dcc-import","forks_url":"https://api.github.com/repos/icgc-dcc/dcc-import/forks","keys_url":"https://api.github.com/repos/icgc-dcc/dcc-import/keys{/key_id}","collaborators_url":"https://api.github.com/repos/icgc-dcc/dcc-import/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/icgc-dcc/dcc-import/teams","hooks_url":"https://api.github.com/repos/icgc-dcc/dcc-import/hooks","issue_events_url":"https://api.github.com/repos/icgc-dcc/dcc-import/issues/events{/number}","events_url":"https://api.github.com/repos/icgc-dcc/dcc-import/events","assignees_url":"https://api.github.com/repos/icgc-dcc/dcc-import/assignees{/user}","branches_url":"https://api.github.com/repos/icgc-dcc/dcc-import/branches{/branch}","tags_url":"https://api.github.com/repos/icgc-dcc/dcc-import/tags","blobs_url":"https://api.github.com/repos/icgc-dcc/dcc-import/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/icgc-dcc/dcc-import/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/icgc-dcc/dcc-import/git/refs{/sha}","trees_url":"https://api.github.com/repos/icgc-dcc/dcc-import/git/trees{/sha}","statuses_url":"https://api.github.com/repos/icgc-dcc/dcc-import/statuses/{sha}","languages_url":"https://api.github.com/repos/icgc-dcc/dcc-import/languages","stargazers_url":"https://api.github.com/repos/icgc-dcc/dcc-import/stargazers","contributors_url":"https://api.github.com/repos/icgc-dcc/dcc-import/contributors","subscribers_url":"https://api.github.com/repos/icgc-dcc/dcc-import/subscribers","subscription_url":"https://api.github.com/repos/icgc-dcc/dcc-import/subscription","commits_url":"https://api.github.com/repos/icgc-dcc/dcc-import/commits{/sha}","git_commits_url":"https://api.github.com/repos/icgc-dcc/dcc-import/git/commits{/sha}","comments_url":"https://api.github.com/repos/icgc-dcc/dcc-import/comments{/number}","issue_comment_url":"https://api.github.com/repos/icgc-dcc/dcc-import/issues/comments{/number}","contents_url":"https://api.github.com/repos/icgc-dcc/dcc-import/contents/{+path}","compare_url":"https://api.github.com/repos/icgc-dcc/dcc-import/compare/{base}...{head}","merges_url":"https://api.github.com/repos/icgc-dcc/dcc-import/merges","archive_url":"https://api.github.com/repos/icgc-dcc/dcc-import/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/icgc-dcc/dcc-import/downloads","issues_url":"https://api.github.com/repos/icgc-dcc/dcc-import/issues{/number}","pulls_url":"https://api.github.com/repos/icgc-dcc/dcc-import/pulls{/number}","milestones_url":"https://api.github.com/repos/icgc-dcc/dcc-import/milestones{/number}","notifications_url":"https://api.github.com/repos/icgc-dcc/dcc-import/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/icgc-dcc/dcc-import/labels{/name}","releases_url":"https://api.github.com/repos/icgc-dcc/dcc-import/releases{/id}","deployments_url":"https://api.github.com/repos/icgc-dcc/dcc-import/deployments","created_at":"2016-01-29T17:03:56Z","updated_at":"2016-02-05T17:59:12Z","pushed_at":"2016-03-23T21:08:48Z","git_url":"git://github.com/icgc-dcc/dcc-import.git","ssh_url":"git@github.com:icgc-dcc/dcc-import.git","clone_url":"https://github.com/icgc-dcc/dcc-import.git","svn_url":"https://github.com/icgc-dcc/dcc-import","homepage":"","size":416,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"base":{"label":"icgc-dcc:develop","ref":"develop","sha":"dc2259414d9d311ca10813f554d221b98d086408","user":{"login":"icgc-dcc","id":1508638,"avatar_url":"https://avatars.githubusercontent.com/u/1508638?v=3","gravatar_id":"","url":"https://api.github.com/users/icgc-dcc","html_url":"https://github.com/icgc-dcc","followers_url":"https://api.github.com/users/icgc-dcc/followers","following_url":"https://api.github.com/users/icgc-dcc/following{/other_user}","gists_url":"https://api.github.com/users/icgc-dcc/gists{/gist_id}","starred_url":"https://api.github.com/users/icgc-dcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icgc-dcc/subscriptions","organizations_url":"https://api.github.com/users/icgc-dcc/orgs","repos_url":"https://api.github.com/users/icgc-dcc/repos","events_url":"https://api.github.com/users/icgc-dcc/events{/privacy}","received_events_url":"https://api.github.com/users/icgc-dcc/received_events","type":"Organization","site_admin":false},"repo":{"id":50677343,"name":"dcc-import","full_name":"icgc-dcc/dcc-import","owner":{"login":"icgc-dcc","id":1508638,"avatar_url":"https://avatars.githubusercontent.com/u/1508638?v=3","gravatar_id":"","url":"https://api.github.com/users/icgc-dcc","html_url":"https://github.com/icgc-dcc","followers_url":"https://api.github.com/users/icgc-dcc/followers","following_url":"https://api.github.com/users/icgc-dcc/following{/other_user}","gists_url":"https://api.github.com/users/icgc-dcc/gists{/gist_id}","starred_url":"https://api.github.com/users/icgc-dcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icgc-dcc/subscriptions","organizations_url":"https://api.github.com/users/icgc-dcc/orgs","repos_url":"https://api.github.com/users/icgc-dcc/repos","events_url":"https://api.github.com/users/icgc-dcc/events{/privacy}","received_events_url":"https://api.github.com/users/icgc-dcc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/icgc-dcc/dcc-import","description":"Reference data importers","fork":false,"url":"https://api.github.com/repos/icgc-dcc/dcc-import","forks_url":"https://api.github.com/repos/icgc-dcc/dcc-import/forks","keys_url":"https://api.github.com/repos/icgc-dcc/dcc-import/keys{/key_id}","collaborators_url":"https://api.github.com/repos/icgc-dcc/dcc-import/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/icgc-dcc/dcc-import/teams","hooks_url":"https://api.github.com/repos/icgc-dcc/dcc-import/hooks","issue_events_url":"https://api.github.com/repos/icgc-dcc/dcc-import/issues/events{/number}","events_url":"https://api.github.com/repos/icgc-dcc/dcc-import/events","assignees_url":"https://api.github.com/repos/icgc-dcc/dcc-import/assignees{/user}","branches_url":"https://api.github.com/repos/icgc-dcc/dcc-import/branches{/branch}","tags_url":"https://api.github.com/repos/icgc-dcc/dcc-import/tags","blobs_url":"https://api.github.com/repos/icgc-dcc/dcc-import/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/icgc-dcc/dcc-import/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/icgc-dcc/dcc-import/git/refs{/sha}","trees_url":"https://api.github.com/repos/icgc-dcc/dcc-import/git/trees{/sha}","statuses_url":"https://api.github.com/repos/icgc-dcc/dcc-import/statuses/{sha}","languages_url":"https://api.github.com/repos/icgc-dcc/dcc-import/languages","stargazers_url":"https://api.github.com/repos/icgc-dcc/dcc-import/stargazers","contributors_url":"https://api.github.com/repos/icgc-dcc/dcc-import/contributors","subscribers_url":"https://api.github.com/repos/icgc-dcc/dcc-import/subscribers","subscription_url":"https://api.github.com/repos/icgc-dcc/dcc-import/subscription","commits_url":"https://api.github.com/repos/icgc-dcc/dcc-import/commits{/sha}","git_commits_url":"https://api.github.com/repos/icgc-dcc/dcc-import/git/commits{/sha}","comments_url":"https://api.github.com/repos/icgc-dcc/dcc-import/comments{/number}","issue_comment_url":"https://api.github.com/repos/icgc-dcc/dcc-import/issues/comments{/number}","contents_url":"https://api.github.com/repos/icgc-dcc/dcc-import/contents/{+path}","compare_url":"https://api.github.com/repos/icgc-dcc/dcc-import/compare/{base}...{head}","merges_url":"https://api.github.com/repos/icgc-dcc/dcc-import/merges","archive_url":"https://api.github.com/repos/icgc-dcc/dcc-import/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/icgc-dcc/dcc-import/downloads","issues_url":"https://api.github.com/repos/icgc-dcc/dcc-import/issues{/number}","pulls_url":"https://api.github.com/repos/icgc-dcc/dcc-import/pulls{/number}","milestones_url":"https://api.github.com/repos/icgc-dcc/dcc-import/milestones{/number}","notifications_url":"https://api.github.com/repos/icgc-dcc/dcc-import/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/icgc-dcc/dcc-import/labels{/name}","releases_url":"https://api.github.com/repos/icgc-dcc/dcc-import/releases{/id}","deployments_url":"https://api.github.com/repos/icgc-dcc/dcc-import/deployments","created_at":"2016-01-29T17:03:56Z","updated_at":"2016-02-05T17:59:12Z","pushed_at":"2016-03-23T21:08:48Z","git_url":"git://github.com/icgc-dcc/dcc-import.git","ssh_url":"git@github.com:icgc-dcc/dcc-import.git","clone_url":"https://github.com/icgc-dcc/dcc-import.git","svn_url":"https://github.com/icgc-dcc/dcc-import","homepage":"","size":416,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/icgc-dcc/dcc-import/pulls/1"},"html":{"href":"https://github.com/icgc-dcc/dcc-import/pull/1"},"issue":{"href":"https://api.github.com/repos/icgc-dcc/dcc-import/issues/1"},"comments":{"href":"https://api.github.com/repos/icgc-dcc/dcc-import/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/icgc-dcc/dcc-import/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/icgc-dcc/dcc-import/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/icgc-dcc/dcc-import/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/icgc-dcc/dcc-import/statuses/c5ad93575fcec7e95563962137c339c49bfa909a"}}}}