{"action":"created","comment":{"url":"https://api.github.com/repos/autodesk-bionano/genome-designer/pulls/comments/50616613","id":50616613,"diff_hunk":"@@ -0,0 +1,60 @@\n+const uuid = require('node-uuid');\n+const csv = require('fast-csv');\n+\n+module.exports = exports = {};\n+\n+exports.importProject = function importProject(csvstr) {\n+  return new Promise((resolve, reject) => {\n+    const proj = {\n+      'id': uuid.v4(),\n+      'metadata': {\n+        'authors': [],\n+        'tags': {},\n+        'version': '',\n+      },\n+      'components': [],\n+    };\n+\n+    const blocks = {};\n+\n+    function appendToProj(data) {\n+      let id, json, name, seq, type, color;\n+\n+      name = data[0];\n+      seq = data[1];\n+      type = data[2];\n+      color = data[3];\n+      id = uuid.v4();\n+      blocks[id] = {","path":"extensions/convert/features/index.js","position":28,"original_position":28,"commit_id":"5d54a8ca93867584ae39da208ba76bb250692af1","original_commit_id":"5d54a8ca93867584ae39da208ba76bb250692af1","user":{"login":"dchandran","id":586734,"avatar_url":"https://avatars.githubusercontent.com/u/586734?v=3","gravatar_id":"","url":"https://api.github.com/users/dchandran","html_url":"https://github.com/dchandran","followers_url":"https://api.github.com/users/dchandran/followers","following_url":"https://api.github.com/users/dchandran/following{/other_user}","gists_url":"https://api.github.com/users/dchandran/gists{/gist_id}","starred_url":"https://api.github.com/users/dchandran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dchandran/subscriptions","organizations_url":"https://api.github.com/users/dchandran/orgs","repos_url":"https://api.github.com/users/dchandran/repos","events_url":"https://api.github.com/users/dchandran/events{/privacy}","received_events_url":"https://api.github.com/users/dchandran/received_events","type":"User","site_admin":false},"body":"See previous note","created_at":"2016-01-23T06:20:44Z","updated_at":"2016-01-23T06:20:44Z","html_url":"https://github.com/autodesk-bionano/genome-designer/pull/208#discussion_r50616613","pull_request_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/pulls/208","_links":{"self":{"href":"https://api.github.com/repos/autodesk-bionano/genome-designer/pulls/comments/50616613"},"html":{"href":"https://github.com/autodesk-bionano/genome-designer/pull/208#discussion_r50616613"},"pull_request":{"href":"https://api.github.com/repos/autodesk-bionano/genome-designer/pulls/208"}}},"pull_request":{"url":"https://api.github.com/repos/autodesk-bionano/genome-designer/pulls/208","id":56659722,"html_url":"https://github.com/autodesk-bionano/genome-designer/pull/208","diff_url":"https://github.com/autodesk-bionano/genome-designer/pull/208.diff","patch_url":"https://github.com/autodesk-bionano/genome-designer/pull/208.patch","issue_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/issues/208","number":208,"state":"open","locked":false,"title":"import, export, and search extensions","user":{"login":"dchandran","id":586734,"avatar_url":"https://avatars.githubusercontent.com/u/586734?v=3","gravatar_id":"","url":"https://api.github.com/users/dchandran","html_url":"https://github.com/dchandran","followers_url":"https://api.github.com/users/dchandran/followers","following_url":"https://api.github.com/users/dchandran/following{/other_user}","gists_url":"https://api.github.com/users/dchandran/gists{/gist_id}","starred_url":"https://api.github.com/users/dchandran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dchandran/subscriptions","organizations_url":"https://api.github.com/users/dchandran/orgs","repos_url":"https://api.github.com/users/dchandran/repos","events_url":"https://api.github.com/users/dchandran/events{/privacy}","received_events_url":"https://api.github.com/users/dchandran/received_events","type":"User","site_admin":false},"body":"The previous merge request (remove-docker-api) needs to go in before this one because it builds on the previous - that should reduce the number of files changed.\r\n\r\n## Features added in this branch\r\ngenbank import/export\r\nfeature file import\r\nsearching NCBI nucleotide database\r\n\r\nAll of the above use the same extensions architecture, which is why they are bundled into one branch.\r\n\r\n### test cases\r\nTest cases are in the test/extensions folder\r\n\r\n## Overview\r\nThere are two categories of extensions introduced in this branch\r\n\r\n### import/export\r\nThese extensions reside in the extensions/convert folder, e.g. extensions/convert/genbank and extensions/convert/features\r\n\r\nEach extension is contained within its own folder and must define a NodeJS module (index.js) that exports one or more of the following functions: importBlock, importProject, exportBlock, exportProject\r\n\r\nTODO: API documentation for each of the above functions. Basically, they all work with the block and project JSONs.\r\n\r\n### search\r\nThese extensions are contained in folders within the extensions/search folder, e.g. extensions/search/nucleotide\r\n\r\nEach search module must define one function: search, which returns a list of blocks and takes a search string and max-returns as arguments.\r\n","created_at":"2016-01-20T20:05:43Z","updated_at":"2016-01-23T06:20:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1c265579212924439cd13c5d04f6182894dbf71e","assignee":{"login":"maxbates","id":3815620,"avatar_url":"https://avatars.githubusercontent.com/u/3815620?v=3","gravatar_id":"","url":"https://api.github.com/users/maxbates","html_url":"https://github.com/maxbates","followers_url":"https://api.github.com/users/maxbates/followers","following_url":"https://api.github.com/users/maxbates/following{/other_user}","gists_url":"https://api.github.com/users/maxbates/gists{/gist_id}","starred_url":"https://api.github.com/users/maxbates/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxbates/subscriptions","organizations_url":"https://api.github.com/users/maxbates/orgs","repos_url":"https://api.github.com/users/maxbates/repos","events_url":"https://api.github.com/users/maxbates/events{/privacy}","received_events_url":"https://api.github.com/users/maxbates/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/pulls/208/commits","review_comments_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/pulls/208/comments","review_comment_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/issues/208/comments","statuses_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/statuses/5d54a8ca93867584ae39da208ba76bb250692af1","head":{"label":"autodesk-bionano:genbank-import-export","ref":"genbank-import-export","sha":"5d54a8ca93867584ae39da208ba76bb250692af1","user":{"login":"autodesk-bionano","id":15031738,"avatar_url":"https://avatars.githubusercontent.com/u/15031738?v=3","gravatar_id":"","url":"https://api.github.com/users/autodesk-bionano","html_url":"https://github.com/autodesk-bionano","followers_url":"https://api.github.com/users/autodesk-bionano/followers","following_url":"https://api.github.com/users/autodesk-bionano/following{/other_user}","gists_url":"https://api.github.com/users/autodesk-bionano/gists{/gist_id}","starred_url":"https://api.github.com/users/autodesk-bionano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autodesk-bionano/subscriptions","organizations_url":"https://api.github.com/users/autodesk-bionano/orgs","repos_url":"https://api.github.com/users/autodesk-bionano/repos","events_url":"https://api.github.com/users/autodesk-bionano/events{/privacy}","received_events_url":"https://api.github.com/users/autodesk-bionano/received_events","type":"Organization","site_admin":false},"repo":{"id":43890900,"name":"genome-designer","full_name":"autodesk-bionano/genome-designer","owner":{"login":"autodesk-bionano","id":15031738,"avatar_url":"https://avatars.githubusercontent.com/u/15031738?v=3","gravatar_id":"","url":"https://api.github.com/users/autodesk-bionano","html_url":"https://github.com/autodesk-bionano","followers_url":"https://api.github.com/users/autodesk-bionano/followers","following_url":"https://api.github.com/users/autodesk-bionano/following{/other_user}","gists_url":"https://api.github.com/users/autodesk-bionano/gists{/gist_id}","starred_url":"https://api.github.com/users/autodesk-bionano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autodesk-bionano/subscriptions","organizations_url":"https://api.github.com/users/autodesk-bionano/orgs","repos_url":"https://api.github.com/users/autodesk-bionano/repos","events_url":"https://api.github.com/users/autodesk-bionano/events{/privacy}","received_events_url":"https://api.github.com/users/autodesk-bionano/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/autodesk-bionano/genome-designer","description":"Genome Designer","fork":false,"url":"https://api.github.com/repos/autodesk-bionano/genome-designer","forks_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/forks","keys_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/teams","hooks_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/hooks","issue_events_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/issues/events{/number}","events_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/events","assignees_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/assignees{/user}","branches_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/branches{/branch}","tags_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/tags","blobs_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/git/refs{/sha}","trees_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/statuses/{sha}","languages_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/languages","stargazers_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/stargazers","contributors_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/contributors","subscribers_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/subscribers","subscription_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/subscription","commits_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/commits{/sha}","git_commits_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/git/commits{/sha}","comments_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/comments{/number}","issue_comment_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/issues/comments{/number}","contents_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/contents/{+path}","compare_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/merges","archive_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/downloads","issues_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/issues{/number}","pulls_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/pulls{/number}","milestones_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/milestones{/number}","notifications_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/labels{/name}","releases_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/releases{/id}","deployments_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/deployments","created_at":"2015-10-08T13:39:22Z","updated_at":"2016-01-12T20:00:24Z","pushed_at":"2016-01-23T04:20:03Z","git_url":"git://github.com/autodesk-bionano/genome-designer.git","ssh_url":"git@github.com:autodesk-bionano/genome-designer.git","clone_url":"https://github.com/autodesk-bionano/genome-designer.git","svn_url":"https://github.com/autodesk-bionano/genome-designer","homepage":"","size":4583,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":40,"forks":3,"open_issues":40,"watchers":3,"default_branch":"master"}},"base":{"label":"autodesk-bionano:master","ref":"master","sha":"b3611a1ce1710d98f4d2b82b4fe0dd93f7c22b34","user":{"login":"autodesk-bionano","id":15031738,"avatar_url":"https://avatars.githubusercontent.com/u/15031738?v=3","gravatar_id":"","url":"https://api.github.com/users/autodesk-bionano","html_url":"https://github.com/autodesk-bionano","followers_url":"https://api.github.com/users/autodesk-bionano/followers","following_url":"https://api.github.com/users/autodesk-bionano/following{/other_user}","gists_url":"https://api.github.com/users/autodesk-bionano/gists{/gist_id}","starred_url":"https://api.github.com/users/autodesk-bionano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autodesk-bionano/subscriptions","organizations_url":"https://api.github.com/users/autodesk-bionano/orgs","repos_url":"https://api.github.com/users/autodesk-bionano/repos","events_url":"https://api.github.com/users/autodesk-bionano/events{/privacy}","received_events_url":"https://api.github.com/users/autodesk-bionano/received_events","type":"Organization","site_admin":false},"repo":{"id":43890900,"name":"genome-designer","full_name":"autodesk-bionano/genome-designer","owner":{"login":"autodesk-bionano","id":15031738,"avatar_url":"https://avatars.githubusercontent.com/u/15031738?v=3","gravatar_id":"","url":"https://api.github.com/users/autodesk-bionano","html_url":"https://github.com/autodesk-bionano","followers_url":"https://api.github.com/users/autodesk-bionano/followers","following_url":"https://api.github.com/users/autodesk-bionano/following{/other_user}","gists_url":"https://api.github.com/users/autodesk-bionano/gists{/gist_id}","starred_url":"https://api.github.com/users/autodesk-bionano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autodesk-bionano/subscriptions","organizations_url":"https://api.github.com/users/autodesk-bionano/orgs","repos_url":"https://api.github.com/users/autodesk-bionano/repos","events_url":"https://api.github.com/users/autodesk-bionano/events{/privacy}","received_events_url":"https://api.github.com/users/autodesk-bionano/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/autodesk-bionano/genome-designer","description":"Genome Designer","fork":false,"url":"https://api.github.com/repos/autodesk-bionano/genome-designer","forks_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/forks","keys_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/teams","hooks_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/hooks","issue_events_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/issues/events{/number}","events_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/events","assignees_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/assignees{/user}","branches_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/branches{/branch}","tags_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/tags","blobs_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/git/refs{/sha}","trees_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/statuses/{sha}","languages_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/languages","stargazers_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/stargazers","contributors_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/contributors","subscribers_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/subscribers","subscription_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/subscription","commits_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/commits{/sha}","git_commits_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/git/commits{/sha}","comments_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/comments{/number}","issue_comment_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/issues/comments{/number}","contents_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/contents/{+path}","compare_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/merges","archive_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/downloads","issues_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/issues{/number}","pulls_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/pulls{/number}","milestones_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/milestones{/number}","notifications_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/labels{/name}","releases_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/releases{/id}","deployments_url":"https://api.github.com/repos/autodesk-bionano/genome-designer/deployments","created_at":"2015-10-08T13:39:22Z","updated_at":"2016-01-12T20:00:24Z","pushed_at":"2016-01-23T04:20:03Z","git_url":"git://github.com/autodesk-bionano/genome-designer.git","ssh_url":"git@github.com:autodesk-bionano/genome-designer.git","clone_url":"https://github.com/autodesk-bionano/genome-designer.git","svn_url":"https://github.com/autodesk-bionano/genome-designer","homepage":"","size":4583,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":40,"forks":3,"open_issues":40,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/autodesk-bionano/genome-designer/pulls/208"},"html":{"href":"https://github.com/autodesk-bionano/genome-designer/pull/208"},"issue":{"href":"https://api.github.com/repos/autodesk-bionano/genome-designer/issues/208"},"comments":{"href":"https://api.github.com/repos/autodesk-bionano/genome-designer/issues/208/comments"},"review_comments":{"href":"https://api.github.com/repos/autodesk-bionano/genome-designer/pulls/208/comments"},"review_comment":{"href":"https://api.github.com/repos/autodesk-bionano/genome-designer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/autodesk-bionano/genome-designer/pulls/208/commits"},"statuses":{"href":"https://api.github.com/repos/autodesk-bionano/genome-designer/statuses/5d54a8ca93867584ae39da208ba76bb250692af1"}}}}