{"action":"created","comment":{"url":"https://api.github.com/repos/biocore/qiita/pulls/comments/56003125","id":56003125,"diff_hunk":"@@ -1,115 +1,401 @@\n-{% from future.utils import viewitems %}\n-<div>\n-    <p>{% raw dl_path %}</p>\n-</div>\n+<script type=\"text/javascript\">\n+  var network;\n \n-<div>\n-<h3>Update Prep Information</h3>\n-    <p><select id=\"filepath\" value=\"filepath\">\n-    {% for f in files %}\n-      <option value=\"{{f}}\">{{f}}</option>\n-    {% end %}\n-    </select>\n-    {% if not stats %}\n-    <button class=\"btn btn-info btn-sm\" onclick=\"prep_action('create')\">Create</button>\n-    {% else %}\n-    <button class=\"btn btn-info btn-sm\" onclick=\"prep_action('update')\">Update</button>\n-    <button class=\"btn btn-danger btn-sm\" onclick=\"prep_action('delete')\">Delete</button>\n-    {% end %}\n-    </p>\n-</div>\n+  /*\n+   * Function to draw a vis.Network\n+   *\n+   * @param nodes list of nodes\n+   * @param edges list of edges\n+   * @param target div name to draw the netword\n+   * @param on_select_f callback function for the 'select' event in the network nodes\n+   *\n+   * This function creates a new instance of vis.Network and draws the graph\n+   * in the target div\n+   *\n+   */\n+  function draw_graph(nodes, edges, target, on_select_f) {\n+    var container = document.getElementById(target);\n+    container.innerHTML = \"\";\n+    var data = {\n+      nodes: nodes,\n+      edges: edges\n+    };\n+    var options = {\n+      nodes: {\n+        color: '#ffffff',\n+        font: '16px arial black'\n+      },\n+      layout : {\n+        hierarchical: {\n+          direction: \"LR\",\n+          sortMethod: \"directed\",\n+          levelSeparation: 260\n+        }\n+      },\n+      interaction: {\n+        dragNodes: false,\n+        dragView: false,\n+        zoomView: false\n+      }\n+    };\n+    network = new vis.Network(container, data, options);\n \n-<div>\n-<h3>Update Investigation Type</h3>\n-    <p id=\"ena-info\"> Selected investigation type: \n-    <select id=\"ena-ontology\" value=\"ena-ontology\">\n-    <option value=\"\"></option>\n-    {% for o in ontology['ENA'] %}\n-      <option value=\"{{o}}\">{{o}}</option>\n-    {% end %}\n-      <option value=\"Other\">Other</option>\n-    </select></p>\n-\n-    <p id=\"user-ena-info\"> User defined investigation type: \n-    <select id=\"user-ontology\" value=\"user-ontology\">\n-    <option value=\"\"></option>\n-    {% for o in ontology['User'] %}\n-      <option value=\"{{o}}\">{{o}}</option>\n-    {% end %}\n-    <option value=\"New Type\">New Type</option>\n-    </select></p>\n-\n-    <p id=\"new-ena-info\">New user defined term: \n-    <input type=\"textbox\" id=\"new-ontology\" name=\"new-ontology\"></p>\n-\n-    <button class=\"btn btn-info btn-sm\" onclick=\"prep_action('ontology')\">Update</button>\n-</div>\n+    network.on('select', on_select_f);\n+  }\n \n-<div>\n-    <h3>Prep information summary</h3>\n-    <p>There are <strong>{{num_samples}}</strong> samples in this study.</p>\n-</div>\n+  /*\n+   * Function to update the prep information contents\n+   *\n+   * This function executes an AJAX query to modify the contents of the\n+   * prep information and updates the interface accordingly\n+   *\n+   */\n+  function update_prep_information() {\n+    var fp = $(\"#file-selector\").val();\n+    $.ajax({\n+      url: '/prep_template/',\n+      type: 'PATCH',\n+      data: {'op': 'replace', 'path': '/{{prep_id}}/data', 'value': fp},\n+      success: function(data) {\n+        if(data.status == 'error') {\n+          bootstrapAlert(data.message, \"danger\");\n+        }\n+        else {\n+          if(data.status == 'warning') {\n+            bootstrapAlert(data.message.replace(\"\\n\", \"<br/>\"), \"warning\");\n+          }\n+          $(\"#file-selector option[value='\" + fp +\"']\").remove();\n+          $(\"#file-selector\").val(\"\");\n+          $(\"#update-button-div\").hide();\n+        }\n+      }\n+    });\n+  }\n \n-<div class=\"panel panel-default\" id=\"summary\">\n-    <div class=\"panel-heading\">\n-        A summary of the prep information is below.\n-    </div>\n+  /*\n+   *\n+   * Function to create a new ENA investigation type term and update the template\n+   *\n+   * This function executes an AJAX query to add a new user-defined term to the\n+   * ENA ontology, then updates the current prep information to have the newly\n+   * added term and it updates the interface accordingly\n+   *\n+   */\n+  function add_new_investigation_type_term_and_update() {\n+    $.ajax({\n+      url: '/ontology/',\n+      type: 'PATCH',\n+      data: {'op': 'add', 'path': '/ENA/', 'value': $(\"#new-ontology\").val()},\n+      success: function(data) {\n+        if(data.status == 'error') {\n+          bootstrapAlert(data.message,  \"danger\");\n+        }\n+        else {\n+          // Add the new term to the user defined list, mark it as selected,\n+          // clean the text box and hide it\n+          var v = $(\"#new-ontology\").val();\n+          $('#user-ontology option').last().before($('<option>').attr({'value': v}).text(v));\n+          $('#user-ontology').val(v);\n+          $('#new-ontology').val('');\n+          $(\"#new-ena-info\").hide();\n+          update_investigation_type(v);\n+        }\n+      }\n+    });\n+  }\n \n-    <table class=\"table\">\n-    {% for category, summary in viewitems(stats) %}\n-        {% if len(summary) == 1 %}\n-            <tr>\n-                <td colspan=\"2\">\n-                    <b>{{category}}</b>: <tt>{{summary[0][0]}}</tt> is repeated in all rows.\n-                </td>\n-            </tr>\n-        {% elif len(set([row[1] for row in summary])) == 1 %}\n-            <tr>\n-                <td colspan=\"2\">\n-                    <b>{{category}}</b>: All the values in this category are different.\n-                </td>\n-            </tr>\n-        {% else %}\n-            <tr>\n-                <th colspan=\"2\" align=\"center\">{{category}}</th>\n-            </tr>\n-            {% for row in summary %}\n-            <tr>\n-                <td>{{row[0]}}</td>\n-                <td>{{row[1]}}</td>\n-            </tr>\n-            {% end %}\n-        {% end %}\n-    {% end %}\n-    </table>\n-</div>\n+  /*\n+   *\n+   * Updates the investigation type of the prep information\n+   *\n+   * @param value string with the new investigation type value\n+   *\n+   * This function executes an AJAX call to update the investigation type\n+   * of the current prep information\n+   *\n+   */\n+  function update_investigation_type(value) {\n+    // Once we update the investigation_type we can't put it back to undefined\n+    // so remove the empty values\n+    $(\"#ena-ontology option[value='']\").remove();\n+    $(\"#user-ena-info option[value='']\").remove();\n \n-<script type=\"text/javascript\">\n-  function prep_action(act) {\n-    $.post('/study/description/prep_template/', { prep_id: {{prep_id}}, action: act, filepath: $(\"#filepath\").val(), ena: $(\"#ena-ontology\").val(), ena_user: $(\"#user-ontology\").val(), ena_new: $(\"#new-ontology\").val() })\n+    $.ajax({\n+      url: '/prep_template/',\n+      type: 'PATCH',\n+      data: {'op': 'replace', 'path': '/{{prep_id}}/investigation_type', 'value': value},\n+      success: function(data) {\n+        if(data.status == 'error') {\n+          bootstrapAlert(data.message, \"danger\");\n+        }\n+      }\n+    });\n+  }\n+\n+  /*\n+   * Toggle the graph view\n+   *\n+   * Show/hide the graph div and update GUI accordingly\n+   *\n+   */\n+  function toggle_graphs() {\n+    if($(\"#graph-network-div\").css('display') == 'none' ) {\n+      $(\"#graph-network-div\").show();\n+      $(\"#show-hide-btn\").text(\"-\");\n+    } else {\n+      $(\"#graph-network-div\").hide();\n+       $(\"#show-hide-btn\").text(\"+\");\n+    }\n+  }\n+\n+  /*\n+   *\n+   * Load the interface with the artifact graph\n+   *\n+   * This function executes an AJAX call to populate the graph-or-new-artifact-div\n+   * with the interface showing the artifact graph attached to this prep information\n+   *\n+   */\n+  function load_template_graph() {\n+    show_loading(\"graph-or-new-artifact-div\");\n+    $.get(\"/prep/graph/\", {\"prep_id\": {{prep_id}} })\n+      .done(function(data) {\n+        var edges = [];\n+        var nodes = [];\n+\n+        for(i=0; i<data.edge_list.length; i++) {\n+          edges.push({from: data.edge_list[i][0], to: data.edge_list[i][1]});\n+        }\n+        // format nore depth data\n+        for(i=0; i<data.node_labels.length; i++) {\n+          nodes.push({id: data.node_labels[i][0], label: data.node_labels[i][1], shape: 'box'});\n+        }\n+\n+        $(\"#graph-or-new-artifact-div\").html(\"<div class='row'><div class='col-md-12'><h4><a class='btn btn-info' id='show-hide-btn' onclick='toggle_graphs();'>-</a><i> Files network</i></h4></div></div><div class='row'><div class='col-md-12 graph' id='graph-network-div'></div></div>\");\n+        draw_graph(nodes, edges, \"graph-network-div\", function(params) {\n+          if(params.nodes.length === 1) {\n+            var artifact_id = +params.nodes[0];\n+            load_artifact_summary(artifact_id);\n+          }\n+        });\n+      });\n+  }\n+\n+  /*\n+   *\n+   * Load the interface to add an artifact to the prep information\n+   *\n+   * This function executes an AJAX call to populate the graph-or-new-artifact-div\n+   * with the interface needed to add a new artifact to the prep information\n+   *\n+   */\n+  function load_new_artifact() {\n+    show_loading(\"graph-or-new-artifact-div\");\n+    $.get(\"/study/new_artifact/\", {\"study_id\": {{study_id}}, \"prep_template_id\": {{prep_id}} })\n+      .done(function(data) {\n+        $(\"#graph-or-new-artifact-div\").html(data);\n+      });\n+  }\n+\n+  /*\n+   *\n+   * Load the prep information summary table\n+   *\n+   * This function executes an AJAX call to populate the prep-artifact-summary-div\n+   * with a table containing a summary of the prep information\n+   */\n+  function load_information_summary() {\n+    show_loading(\"prep-artifact-summary-div\");\n+    $.get('/study/description/prep_summary/', {'prep_id': {{prep_id}} })\n       .done(function ( data ) {\n-        if(data.status == \"error\") {\n-          bootstrapAlert(\"<p>Error updating prep template</p>\" + data.message, \"danger\", 4000);\n-        } else if(data.status == \"warning\") {\n-          bootstrapAlert(data.message.replace(\"\\n\", \"<br/>\"), \"warning\", 4000);\n-        } else {\n-          bootstrapAlert(data.message.replace(\"\\n\", \"<br/>\"), \"info\", 4000);\n+        $(\"#prep-artifact-summary-div\").html(data);\n+      });\n+  }\n+\n+  /*\n+   * Load the artifact summary page\n+   *\n+   * @param artifact_id integer with the artifact id to load\n+   *\n+   * This function executes an AJAX call to populate the prep-artifact-summary-div\n+   *\n+   */\n+  function load_artifact_summary(artifact_id) {\n+    show_loading(\"prep-artifact-summary-div\");\n+    console.log(\"Load artifact summary \" + artifact_id);\n+  }\n+\n+  /*\n+   * Delete a prep template from the system\n+   *\n+   * @param prep_id The prep template id\n+   *\n+   * This function executes an AJAX call to delete the provided prep template\n+   * and updates the interface accordingly\n+   *\n+   */\n+  function delete_prep_info(prep_id) {\n+    if(confirm(\"Are you sure you want to delete prep template \" + prep_id + \"?\")) {\n+      // Perform the AJAX call to delete\n+      $.ajax({\n+        url: '/prep_template/',\n+        type: 'DELETE',\n+        data: {'prep-template-id': prep_id},\n+        success: function(data) {\n+          if(data.status == 'error') {\n+            bootstrapAlert(data.message, \"danger\");\n+          }\n+          else {\n+            // If success, populate the main div with the study info\n+            // and regenerate the data type menu div (there is one prep less)\n+            populate_main_div(\"/study/description/baseinfo/\", { study_id: {{study_id}} });\n+            populate_data_type_menu_div();\n+          }\n         }\n-        //reload section of the page with new info\n-         fill_prep({{prep_id}})\n-      })\n+      });\n+    }\n   }\n \n   $(document).ready(function () {\n-    $(\"#user-ena-info\").hide();\n-    $(\"#new-ena-info\").hide();\n-    $(\"#ena-info\").change(function ( event ) {\n-        if( $(\"#ena-ontology\").val() == \"Other\" ) { $(\"#user-ena-info\").show(); }\n-        else { $(\"#user-ena-info\").hide(); }\n+    if(\"{{investigation_type}}\" !== \"None\") {\n+      // The prep information already has an investigation type\n+      // Delete the entries from the select that correspond to no values\n+      $(\"#ena-ontology option[value='']\").remove();\n+      $(\"#user-ena-info option[value='']\").remove();\n+      // Update the selects to point to the correct value\n+      var v = $(\"#ena-ontology option[value='{{investigation_type}}']\");\n+      if (v.length == 1) {\n+        // Set the value\n+        $(\"#ena-ontology\").val('{{investigation_type}}');\n+      }\n+      else {\n+        // It is a user defined value\n+        $(\"#user-ena-info\").show();\n+        $(\"#ena-ontology\").val('Other');\n+        $(\"#user-ontology\").val('{{investigation_type}}');\n+      }\n+    }\n+\n+    load_information_summary();\n+    // If the template already have an artifact attached, load the\n+    // artifact graph, otherwise load the page to add a new artifact\n+    if (\"{{artifact_attached}}\" == \"True\") {\n+      load_template_graph();\n+    }\n+    else {\n+      load_new_artifact();\n+    }\n+    // If the file-selector select changes, check if we need to show the update button\n+    $(\"#file-selector\").change(function ( event ) {\n+      if ( $(\"#file-selector\").val() === \"\" ) {\n+        $(\"#update-button-div\").hide();\n+      }\n+      else {\n+        $(\"#update-button-div\").show();\n+      }\n+    });\n+\n+    // If the ena-ontology select changes, check if we need to show the user list\n+    $(\"#ena-ontology\").change(function ( event ) {\n+      var value = $(\"#ena-ontology\").val();\n+      if( value == \"Other\" ) {\n+        $(\"#user-ena-info\").show();\n+        $(\"#user-ena-info\").trigger('change');\n+      }\n+      else {\n+        $(\"#user-ena-info\").hide();\n+        $(\"#new-ena-info\").hide();\n+        update_investigation_type(value);\n+      }\n     });\n+    // If the user-ena-info select changes, check if we need to show the input box\n     $(\"#user-ena-info\").change(function ( event ) {\n-        if( $(\"#user-ontology\").val() == \"New Type\" ) { $(\"#new-ena-info\").show(); }\n-        else { $(\"#new-ena-info\").hide(); }\n+        var value = $(\"#user-ontology\").val();\n+        if( value == \"New Type\" ) {\n+          $(\"#new-ena-info\").show();\n+        }\n+        else {\n+          $(\"#new-ena-info\").hide();\n+          if( value !== \"\" ) {\n+            update_investigation_type(value);\n+          }\n+        }\n     });\n   });\n-</script>\n\\ No newline at end of file\n+</script>\n+\n+<!-- Prep template title and buttons -->\n+<div class=\"row\">\n+  <div class=\"col-md-12\">\n+    <h4>\n+      {{name}} - ID {{prep_id}}\n+      <a class=\"btn btn-default glyphicon glyphicon-download-alt\" href=\"/download/{{download_prep}}\" style=\"word-spacing: -10px;\"> Prep info</a>\n+      <a class=\"btn btn-default glyphicon glyphicon-download-alt\" href=\"/download/{{download_qiime}}\" style=\"word-spacing: -10px;\"> Qiime map</a>\n+      <a class=\"btn btn-danger glyphicon glyphicon-trash\" style=\"word-spacing: -10px;\" onclick=\"delete_prep_info({{prep_id}});\"> Delete</a>\n+    </h4>\n+  </div>\n+</div>\n+\n+<!-- #samples and #columns -->\n+<div class=\"row\">\n+  <div class=\"col-md-12\">\n+    There are <b>{{num_samples}}</b> samples and <b>{{num_columns}}</b> columns in this preparation.\n+  </div>\n+</div>\n+\n+<!-- Update prep template -->\n+<div class=\"row\">\n+  <div class=\"col-md-12\">\n+    <b>Update information:</b>\n+    <select id=\"file-selector\">\n+      <option value=\"\">Choose file...</option>\n+      {% for fp in files %}\n+        <option value=\"{{fp}}\">{{fp}}</option>","path":"qiita_pet/templates/study_ajax/prep_summary.html","position":454,"original_position":454,"commit_id":"990dc149d26ed57754630e0bb95701f26da502dc","original_commit_id":"990dc149d26ed57754630e0bb95701f26da502dc","user":{"login":"antgonza","id":2014559,"avatar_url":"https://avatars.githubusercontent.com/u/2014559?v=3","gravatar_id":"","url":"https://api.github.com/users/antgonza","html_url":"https://github.com/antgonza","followers_url":"https://api.github.com/users/antgonza/followers","following_url":"https://api.github.com/users/antgonza/following{/other_user}","gists_url":"https://api.github.com/users/antgonza/gists{/gist_id}","starred_url":"https://api.github.com/users/antgonza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antgonza/subscriptions","organizations_url":"https://api.github.com/users/antgonza/orgs","repos_url":"https://api.github.com/users/antgonza/repos","events_url":"https://api.github.com/users/antgonza/events{/privacy}","received_events_url":"https://api.github.com/users/antgonza/received_events","type":"User","site_admin":false},"body":"I think space will do it, which is allowed by the upload. We could change this behavior in the uploader. Wanna open an issue?  ","created_at":"2016-03-14T13:56:37Z","updated_at":"2016-03-14T13:56:37Z","html_url":"https://github.com/biocore/qiita/pull/1683#discussion_r56003125","pull_request_url":"https://api.github.com/repos/biocore/qiita/pulls/1683","_links":{"self":{"href":"https://api.github.com/repos/biocore/qiita/pulls/comments/56003125"},"html":{"href":"https://github.com/biocore/qiita/pull/1683#discussion_r56003125"},"pull_request":{"href":"https://api.github.com/repos/biocore/qiita/pulls/1683"}}},"pull_request":{"url":"https://api.github.com/repos/biocore/qiita/pulls/1683","id":62584927,"html_url":"https://github.com/biocore/qiita/pull/1683","diff_url":"https://github.com/biocore/qiita/pull/1683.diff","patch_url":"https://github.com/biocore/qiita/pull/1683.patch","issue_url":"https://api.github.com/repos/biocore/qiita/issues/1683","number":1683,"state":"open","locked":false,"title":"Refactoring the refactor (III): prep summary","user":{"login":"josenavas","id":2501478,"avatar_url":"https://avatars.githubusercontent.com/u/2501478?v=3","gravatar_id":"","url":"https://api.github.com/users/josenavas","html_url":"https://github.com/josenavas","followers_url":"https://api.github.com/users/josenavas/followers","following_url":"https://api.github.com/users/josenavas/following{/other_user}","gists_url":"https://api.github.com/users/josenavas/gists{/gist_id}","starred_url":"https://api.github.com/users/josenavas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josenavas/subscriptions","organizations_url":"https://api.github.com/users/josenavas/orgs","repos_url":"https://api.github.com/users/josenavas/repos","events_url":"https://api.github.com/users/josenavas/events{/privacy}","received_events_url":"https://api.github.com/users/josenavas/received_events","type":"User","site_admin":false},"body":"Depends on #1680, so review/merge that one first\r\n\r\nThis PR refactors the prep information summary page and integrates the artifact creation in this page. ","created_at":"2016-03-11T18:44:29Z","updated_at":"2016-03-14T13:56:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"84463be92b81b473904107da4622f0ddbbbc6802","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/biocore/qiita/pulls/1683/commits","review_comments_url":"https://api.github.com/repos/biocore/qiita/pulls/1683/comments","review_comment_url":"https://api.github.com/repos/biocore/qiita/pulls/comments{/number}","comments_url":"https://api.github.com/repos/biocore/qiita/issues/1683/comments","statuses_url":"https://api.github.com/repos/biocore/qiita/statuses/990dc149d26ed57754630e0bb95701f26da502dc","head":{"label":"josenavas:artifact-study-pages-prep-artifact-integration","ref":"artifact-study-pages-prep-artifact-integration","sha":"990dc149d26ed57754630e0bb95701f26da502dc","user":{"login":"josenavas","id":2501478,"avatar_url":"https://avatars.githubusercontent.com/u/2501478?v=3","gravatar_id":"","url":"https://api.github.com/users/josenavas","html_url":"https://github.com/josenavas","followers_url":"https://api.github.com/users/josenavas/followers","following_url":"https://api.github.com/users/josenavas/following{/other_user}","gists_url":"https://api.github.com/users/josenavas/gists{/gist_id}","starred_url":"https://api.github.com/users/josenavas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josenavas/subscriptions","organizations_url":"https://api.github.com/users/josenavas/orgs","repos_url":"https://api.github.com/users/josenavas/repos","events_url":"https://api.github.com/users/josenavas/events{/privacy}","received_events_url":"https://api.github.com/users/josenavas/received_events","type":"User","site_admin":false},"repo":{"id":13527677,"name":"QiiTa","full_name":"josenavas/QiiTa","owner":{"login":"josenavas","id":2501478,"avatar_url":"https://avatars.githubusercontent.com/u/2501478?v=3","gravatar_id":"","url":"https://api.github.com/users/josenavas","html_url":"https://github.com/josenavas","followers_url":"https://api.github.com/users/josenavas/followers","following_url":"https://api.github.com/users/josenavas/following{/other_user}","gists_url":"https://api.github.com/users/josenavas/gists{/gist_id}","starred_url":"https://api.github.com/users/josenavas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josenavas/subscriptions","organizations_url":"https://api.github.com/users/josenavas/orgs","repos_url":"https://api.github.com/users/josenavas/repos","events_url":"https://api.github.com/users/josenavas/events{/privacy}","received_events_url":"https://api.github.com/users/josenavas/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/josenavas/QiiTa","description":"QiiTa databasing effort","fork":true,"url":"https://api.github.com/repos/josenavas/QiiTa","forks_url":"https://api.github.com/repos/josenavas/QiiTa/forks","keys_url":"https://api.github.com/repos/josenavas/QiiTa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/josenavas/QiiTa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/josenavas/QiiTa/teams","hooks_url":"https://api.github.com/repos/josenavas/QiiTa/hooks","issue_events_url":"https://api.github.com/repos/josenavas/QiiTa/issues/events{/number}","events_url":"https://api.github.com/repos/josenavas/QiiTa/events","assignees_url":"https://api.github.com/repos/josenavas/QiiTa/assignees{/user}","branches_url":"https://api.github.com/repos/josenavas/QiiTa/branches{/branch}","tags_url":"https://api.github.com/repos/josenavas/QiiTa/tags","blobs_url":"https://api.github.com/repos/josenavas/QiiTa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/josenavas/QiiTa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/josenavas/QiiTa/git/refs{/sha}","trees_url":"https://api.github.com/repos/josenavas/QiiTa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/josenavas/QiiTa/statuses/{sha}","languages_url":"https://api.github.com/repos/josenavas/QiiTa/languages","stargazers_url":"https://api.github.com/repos/josenavas/QiiTa/stargazers","contributors_url":"https://api.github.com/repos/josenavas/QiiTa/contributors","subscribers_url":"https://api.github.com/repos/josenavas/QiiTa/subscribers","subscription_url":"https://api.github.com/repos/josenavas/QiiTa/subscription","commits_url":"https://api.github.com/repos/josenavas/QiiTa/commits{/sha}","git_commits_url":"https://api.github.com/repos/josenavas/QiiTa/git/commits{/sha}","comments_url":"https://api.github.com/repos/josenavas/QiiTa/comments{/number}","issue_comment_url":"https://api.github.com/repos/josenavas/QiiTa/issues/comments{/number}","contents_url":"https://api.github.com/repos/josenavas/QiiTa/contents/{+path}","compare_url":"https://api.github.com/repos/josenavas/QiiTa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/josenavas/QiiTa/merges","archive_url":"https://api.github.com/repos/josenavas/QiiTa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/josenavas/QiiTa/downloads","issues_url":"https://api.github.com/repos/josenavas/QiiTa/issues{/number}","pulls_url":"https://api.github.com/repos/josenavas/QiiTa/pulls{/number}","milestones_url":"https://api.github.com/repos/josenavas/QiiTa/milestones{/number}","notifications_url":"https://api.github.com/repos/josenavas/QiiTa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/josenavas/QiiTa/labels{/name}","releases_url":"https://api.github.com/repos/josenavas/QiiTa/releases{/id}","deployments_url":"https://api.github.com/repos/josenavas/QiiTa/deployments","created_at":"2013-10-12T19:29:32Z","updated_at":"2015-05-05T22:50:05Z","pushed_at":"2016-03-14T13:20:22Z","git_url":"git://github.com/josenavas/QiiTa.git","ssh_url":"git@github.com:josenavas/QiiTa.git","clone_url":"https://github.com/josenavas/QiiTa.git","svn_url":"https://github.com/josenavas/QiiTa","homepage":null,"size":129560,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"biocore:artifact-study-pages","ref":"artifact-study-pages","sha":"ef83464889d2e9b303b4128b5eb4ed6178f83fb9","user":{"login":"biocore","id":6241857,"avatar_url":"https://avatars.githubusercontent.com/u/6241857?v=3","gravatar_id":"","url":"https://api.github.com/users/biocore","html_url":"https://github.com/biocore","followers_url":"https://api.github.com/users/biocore/followers","following_url":"https://api.github.com/users/biocore/following{/other_user}","gists_url":"https://api.github.com/users/biocore/gists{/gist_id}","starred_url":"https://api.github.com/users/biocore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biocore/subscriptions","organizations_url":"https://api.github.com/users/biocore/orgs","repos_url":"https://api.github.com/users/biocore/repos","events_url":"https://api.github.com/users/biocore/events{/privacy}","received_events_url":"https://api.github.com/users/biocore/received_events","type":"Organization","site_admin":false},"repo":{"id":13131245,"name":"qiita","full_name":"biocore/qiita","owner":{"login":"biocore","id":6241857,"avatar_url":"https://avatars.githubusercontent.com/u/6241857?v=3","gravatar_id":"","url":"https://api.github.com/users/biocore","html_url":"https://github.com/biocore","followers_url":"https://api.github.com/users/biocore/followers","following_url":"https://api.github.com/users/biocore/following{/other_user}","gists_url":"https://api.github.com/users/biocore/gists{/gist_id}","starred_url":"https://api.github.com/users/biocore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biocore/subscriptions","organizations_url":"https://api.github.com/users/biocore/orgs","repos_url":"https://api.github.com/users/biocore/repos","events_url":"https://api.github.com/users/biocore/events{/privacy}","received_events_url":"https://api.github.com/users/biocore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/biocore/qiita","description":"Qiita - A QIIME databasing effort","fork":false,"url":"https://api.github.com/repos/biocore/qiita","forks_url":"https://api.github.com/repos/biocore/qiita/forks","keys_url":"https://api.github.com/repos/biocore/qiita/keys{/key_id}","collaborators_url":"https://api.github.com/repos/biocore/qiita/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/biocore/qiita/teams","hooks_url":"https://api.github.com/repos/biocore/qiita/hooks","issue_events_url":"https://api.github.com/repos/biocore/qiita/issues/events{/number}","events_url":"https://api.github.com/repos/biocore/qiita/events","assignees_url":"https://api.github.com/repos/biocore/qiita/assignees{/user}","branches_url":"https://api.github.com/repos/biocore/qiita/branches{/branch}","tags_url":"https://api.github.com/repos/biocore/qiita/tags","blobs_url":"https://api.github.com/repos/biocore/qiita/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/biocore/qiita/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/biocore/qiita/git/refs{/sha}","trees_url":"https://api.github.com/repos/biocore/qiita/git/trees{/sha}","statuses_url":"https://api.github.com/repos/biocore/qiita/statuses/{sha}","languages_url":"https://api.github.com/repos/biocore/qiita/languages","stargazers_url":"https://api.github.com/repos/biocore/qiita/stargazers","contributors_url":"https://api.github.com/repos/biocore/qiita/contributors","subscribers_url":"https://api.github.com/repos/biocore/qiita/subscribers","subscription_url":"https://api.github.com/repos/biocore/qiita/subscription","commits_url":"https://api.github.com/repos/biocore/qiita/commits{/sha}","git_commits_url":"https://api.github.com/repos/biocore/qiita/git/commits{/sha}","comments_url":"https://api.github.com/repos/biocore/qiita/comments{/number}","issue_comment_url":"https://api.github.com/repos/biocore/qiita/issues/comments{/number}","contents_url":"https://api.github.com/repos/biocore/qiita/contents/{+path}","compare_url":"https://api.github.com/repos/biocore/qiita/compare/{base}...{head}","merges_url":"https://api.github.com/repos/biocore/qiita/merges","archive_url":"https://api.github.com/repos/biocore/qiita/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/biocore/qiita/downloads","issues_url":"https://api.github.com/repos/biocore/qiita/issues{/number}","pulls_url":"https://api.github.com/repos/biocore/qiita/pulls{/number}","milestones_url":"https://api.github.com/repos/biocore/qiita/milestones{/number}","notifications_url":"https://api.github.com/repos/biocore/qiita/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/biocore/qiita/labels{/name}","releases_url":"https://api.github.com/repos/biocore/qiita/releases{/id}","deployments_url":"https://api.github.com/repos/biocore/qiita/deployments","created_at":"2013-09-26T18:50:43Z","updated_at":"2016-01-31T22:47:34Z","pushed_at":"2016-03-14T13:52:42Z","git_url":"git://github.com/biocore/qiita.git","ssh_url":"git@github.com:biocore/qiita.git","clone_url":"https://github.com/biocore/qiita.git","svn_url":"https://github.com/biocore/qiita","homepage":"http://qiita.microbio.me","size":130263,"stargazers_count":25,"watchers_count":25,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":322,"forks":28,"open_issues":322,"watchers":25,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/biocore/qiita/pulls/1683"},"html":{"href":"https://github.com/biocore/qiita/pull/1683"},"issue":{"href":"https://api.github.com/repos/biocore/qiita/issues/1683"},"comments":{"href":"https://api.github.com/repos/biocore/qiita/issues/1683/comments"},"review_comments":{"href":"https://api.github.com/repos/biocore/qiita/pulls/1683/comments"},"review_comment":{"href":"https://api.github.com/repos/biocore/qiita/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/biocore/qiita/pulls/1683/commits"},"statuses":{"href":"https://api.github.com/repos/biocore/qiita/statuses/990dc149d26ed57754630e0bb95701f26da502dc"}}}}