{"action":"created","comment":{"url":"https://api.github.com/repos/biocore/WGS-HGT/pulls/comments/39430335","id":39430335,"diff_hunk":"@@ -0,0 +1,981 @@\n+#!/usr/bin/python\n+\n+# ----------------------------------------------------------------------------\n+# Copyright (c) 2015--, The WGS-HGT Development Team.\n+#\n+# Distributed under the terms of the Modified BSD License.\n+#\n+# The full license is in the file COPYING.txt, distributed with this software.\n+# ----------------------------------------------------------------------------\n+\n+\"\"\" Implement Distance Method for HGT detection based on algorithm described\n+    in:\n+        Wei. X et al., \"A Distance-Based Method for Detecting HGT in Whole\n+        Genomes\", International Symposium on Bioinformatics Research and\n+        Applications (ISBRA), 2008, pages 26-37\n+\n+    The workflow follows the algorithm:\n+    1. For each gene in target genome,\n+        i.    BLAST sequence against all other genes in the reference genomes;\n+        ii.   Go to step 3 if gene has more than threshold number of homologs\n+              (min-num-homologs), otherwise go to next gene in target genome;\n+        iii.  Compute multiple sequence alignment on homolog genes using\n+              CLUSTAL;\n+        iv.   Compute pairwise distance matrix using PHYLIP's protdist\n+              function and Z-score normalize the set of pairwise distances\n+              for each gene family and species;\n+        v.    Add distance matrix for all pairwise distances into global\n+              distance matrix storing results for all genes\n+\n+    2. Cluster gene families by species,\n+        vi.   Compute all species sets (sets of genes whose orthologs are\n+              detectable in exactly the same subset of the considered\n+              species);\n+        vii.  Cluster genes to each core species set cluster using the Hamming\n+              distance clustering algorithm;\n+        viii. Run outlier detection algorithm on each cluster (paragraph 2\n+              of section 'Detecting Outlier Genes' in original paper)\n+\"\"\"\n+\n+import sys\n+import click\n+import numpy\n+import operator\n+import threading\n+import subprocess\n+import traceback\n+import shlex\n+from os import listdir\n+from os.path import join, splitext, basename\n+from itertools import imap\n+\n+from skbio.parse.sequences import parse_fasta\n+\n+\n+class Command(object):\n+    \"\"\"\n+    Enables to run subprocess commands in a different thread\n+    with TIMEOUT option.\n+\n+    Based on jcollado's solution:\n+    http://stackoverflow.com/questions/1191374/subprocess-with-timeout/4825933#4825933\n+    https://gist.github.com/kirpit/1306188\n+    \"\"\"\n+    command = None\n+    process = None\n+    status = None\n+    output, error = '', ''\n+\n+    def __init__(self, command):\n+        if isinstance(command, basestring):\n+            command = shlex.split(command)\n+        self.command = command\n+\n+    def run(self, timeout=None, **kwargs):\n+        \"\"\" Run a command then return: (status, output, error). \"\"\"\n+        def target(**kwargs):\n+            try:\n+                self.process = subprocess.Popen(self.command, **kwargs)\n+                self.output, self.error = self.process.communicate()\n+                self.status = self.process.returncode\n+            except:\n+                self.error = traceback.format_exc()\n+                self.status = -1\n+        # default stdout and stderr\n+        if 'stdout' not in kwargs:\n+            kwargs['stdout'] = subprocess.PIPE\n+        if 'stderr' not in kwargs:\n+            kwargs['stderr'] = subprocess.PIPE\n+        # thread\n+        thread = threading.Thread(target=target, kwargs=kwargs)\n+        thread.start()\n+        thread.join(timeout)\n+        if thread.is_alive():\n+            self.process.terminate()\n+            thread.join()\n+        return self.status, self.output, self.error\n+\n+\n+def hamming(str1, str2):\n+    \"Compute the Hamming distance between two strings\"\n+    assert len(str1) == len(str2)\n+    ne = operator.ne\n+    return sum(imap(ne, str1, str2))\n+\n+\n+def preprocess_data(working_dir,\n+                    target_proteomes_dir,\n+                    verbose=False):\n+    \"\"\" Map each gene to sudo name (ex. 1_1 for species 1, gene 1) for easier\n+    output comparison and the 10 character name limitation in PHYLIP output.\n+    This format is limited up to 9999 species and 99999 genes per species.\n+\n+    Parameters\n+    ----------\n+    working_dir:  string\n+      path to working directory\n+    target_proteomes_dir: string\n+      path to directory holding proteomes for all target organisms\n+    verbose: boolean, optional\n+      output details about the running processes of this function\n+\n+    Returns\n+    -------\n+    gene_map: dictionary\n+      \"two-way\" dictionary storing gene names as keys and their pseudo\n+      names as values, and vica versa\n+    ref_db: dictionary\n+      dictionary storing FASTA label as key and sequence as value for the\n+      reference databases\n+    species: integer\n+      the number of species in the reference databases\n+    \"\"\"\n+    gene_map = {}\n+    ref_db = {}\n+    if verbose:\n+        sys.stdout.write(\"Target organism\\tNumber of genes\\n\")\n+    # each file contains genes for species\n+    species = 0\n+    for _file in listdir(target_proteomes_dir):\n+        if verbose:\n+            sys.stdout.write(\"%s. %s\\t\" % (species+1, basename(_file)))\n+        with open(join(target_proteomes_dir, _file), 'rb') as readfile:\n+            gene = 0\n+            for label, seq in parse_fasta(readfile):\n+                label = label.split()[0]\n+                ref_db[label] = seq\n+                sudo_label = \"%s_%s\" % (species, gene)\n+                gene_map[label] = sudo_label\n+                gene_map[sudo_label] = label\n+                gene += 1\n+        if verbose:\n+            sys.stdout.write(\"%s\\n\" % gene)\n+        species += 1\n+    return gene_map, ref_db, species\n+\n+\n+def launch_blast(query_proteome_fp,\n+                 ref_fp,\n+                 working_dir,\n+                 e_value=10e-20,\n+                 threads=1,\n+                 debug=False):\n+    \"\"\" Launch BLASTp given a query proteome and a reference database of\n+    proteomes.\n+\n+    Parameters\n+    ----------\n+    query_proteome_fp: string\n+      filepath to query proteome\n+    ref_fp: string\n+      filepath to reference proteome\n+    working_dir: string\n+      working directory path\n+    e_value: float, optional\n+      the cutoff E-value for BLASTP results\n+    threads: integer\n+      number of threads to use for running BLASTP\n+    debug: boolean\n+      if True, run function in debug mode\n+\n+    Returns\n+    -------\n+    out_file_fp: string\n+      filepath to tabular alignment file output by\n+      BLASTP\n+    \"\"\"\n+    db_file_fp = join(working_dir, \"%s\" % basename(ref_fp))\n+    # build blast database\n+    makeblastdb_command = [\"makeblastdb\",\n+                           \"-in\", ref_fp,\n+                           \"-out\", db_file_fp,\n+                           \"-dbtype\", \"prot\"]\n+    proc = subprocess.Popen(makeblastdb_command,\n+                            stdout=subprocess.PIPE,\n+                            stderr=subprocess.PIPE,\n+                            close_fds=True)\n+    proc.wait()\n+    stdout, stderr = proc.communicate()\n+    if (stderr and debug):\n+        print \"[DEBUG] %s\\n\" % stderr\n+\n+    # launch blast\n+    out_file_fp = join(\n+        working_dir, \"%s.blast\" % basename(splitext(query_proteome_fp)[0]))\n+    blastp_command = [\"blastp\",\n+                      \"-db\", db_file_fp,\n+                      \"-query\", query_proteome_fp,\n+                      \"-evalue\", str(e_value),\n+                      \"-num_threads\", str(threads),\n+                      \"-outfmt\", \"6 std qcovs\",\n+                      \"-task\", \"blastp\",\n+                      \"-out\", out_file_fp]\n+    proc = subprocess.Popen(blastp_command,\n+                            stdout=subprocess.PIPE,\n+                            stderr=subprocess.PIPE,\n+                            close_fds=True)\n+    proc.wait()\n+    stdout, stderr = proc.communicate()\n+    if (stderr and debug):\n+        print \"[DEBUG] %s\\n\" % stderr\n+\n+    return out_file_fp\n+\n+\n+def parse_blast(alignments_fp,\n+                hits,\n+                gene_map,\n+                debug=False):\n+    \"\"\" Parse BLASTp alignment file into a dictionary where the keys are the\n+    queries and the values are all the reference sequences to which the query\n+    mapped with E-value cutoff score.\n+\n+    Parameters\n+    ----------\n+    alignments_fp: string\n+      filepath to tabular alignment file output by BLASTP\n+    hits: dictionary\n+      dictionary storing query (gene) names as keys and the best aligning\n+      reference sequences as values (one alignment per reference sequence)\n+    gene_map: dictionary\n+      \"two-way\" dictionary storing gene names as keys and their pseudo\n+      names as values, and vica versa\n+    debug: boolean\n+      if True, run function in debug mode\n+    \"\"\"\n+    # read blastp results\n+    with open(alignments_fp, 'U') as alignments_f:\n+        for line in alignments_f:\n+            if debug:\n+                sys.stdout.write(\"[DEBUG] %s\" % line)\n+            line = line.split()\n+            query = line[0]\n+            ref = line[1]\n+            if query not in hits:\n+                hits[query] = [ref]\n+            else:\n+                # check that the query mapped to a different species\n+                # since we only want the best homolog per species\n+                current_species = gene_map[ref].split('_')[0]\n+                add_alignment = True\n+                for gene in hits[query]:\n+                    species = gene_map[gene].split('_')[0]\n+                    if species == current_species:\n+                        add_alignment = False\n+                        break\n+                if add_alignment:\n+                    hits[query].append(ref)\n+\n+\n+def launch_msa(fasta_in_fp,\n+               clustal_command_fp,\n+               gene_map,\n+               ref_db,\n+               hits,\n+               query,\n+               timeout):\n+    \"\"\" Create multiple sequence alignments for all gene othologs\n+    using Clustalw.\n+\n+    Parameters\n+    ----------\n+    fasta_in_fp: string\n+      filepath to FASTA file of protein sequences to use as input to\n+      Clustalw\n+    clustal_command_fp: string\n+      filepath to Clustalw command (interactive)\n+    gene_map: dictionary\n+      \"two-way\" dictionary storing gene names as keys and their pseudo\n+      names as values, and vica versa\n+    ref_db: dictionary\n+      dictionary storing FASTA label as key and sequence as value for the\n+      reference databases\n+    hits: dictionary\n+      dictionary storing query (gene) names as keys and the best aligning\n+      reference sequences as values (one alignment per reference sequence)\n+    query: string\n+      query gene name\n+    timeout: integer\n+      number of seconds to allow Clustalw to run before terminating the\n+      process\n+    \"\"\"\n+    with open(fasta_in_fp, 'w') as in_f:\n+        sorted(hits[query])\n+        for ref in hits[query]:\n+            in_f.write(\">%s\\n%s\\n\" % (gene_map[ref], ref_db[ref]))\n+\n+    with open(clustal_command_fp, 'U') as clustal_command_f:\n+        clustalw_command = Command(\"clustalw\")\n+        status, output, error = clustalw_command.run(\n+            timeout=timeout,\n+            stdin=clustal_command_f,\n+            close_fds=True)\n+        if status < 0:\n+            sys.stdout.write(\n+                \"status: %s\\noutput: %s\\terror: %s\\t\" % (\n+                    status, output, error))\n+\n+\n+def compute_distances(phylip_command_fp,\n+                      warnings=False):\n+    \"\"\" Compute distances between each pair of sequences in MSA (multiple\n+        sequence alignment) using PHYLIP's protdist function.\n+\n+        Parameters\n+        ----------\n+        phylip_command_fp: string\n+          filepath to the PHYLIP command (interactive)\n+        warnings: boolean, optional\n+          print warnings output by PHYLIP\n+    \"\"\"\n+    with open(phylip_command_fp, 'U') as phylip_command_f:\n+        proc = subprocess.Popen(\"protdist\",\n+                                stdin=phylip_command_f,\n+                                stdout=subprocess.PIPE,\n+                                stderr=subprocess.PIPE,\n+                                close_fds=True)\n+        proc.wait()\n+        stdout, stderr = proc.communicate()\n+        if stderr and warnings:\n+            print stderr\n+\n+\n+def normalize_distances(phylip_fp,\n+                        full_distance_matrix,\n+                        num_species,\n+                        full_distance_matrix_offset,\n+                        species_set_dict,\n+                        gene_bitvector_map,\n+                        debug=False):\n+    \"\"\" This function parses the output file of PHYLIP's protdist function\n+    containing the distance matrix, Z-score normalizes the set of pairwise\n+    distances between the gene in a species and all other species and stores\n+    the results in a separate array.\n+\n+    Each normalized distance matrix is then sorted by species name and added\n+    to the complete array storing distance matrices for all genes. In\n+    addition, a list of missing species (species which did not include a\n+    certain gene) is also maintained and used for setting nan's in array cells\n+    which represent those species.\n+\n+    Below is an example of a parsed distance matrix\n+    for 3 genes and 3 species:\n+        0         1         2        (genes)\n+    0_0 nan       nan       nan\n+    0_1 0.53099   0.878855  0.83673\n+    0_2 0.642856  1.083039  1.083039\n+    1_0 0.300297  0.300297  0.702003\n+    1_1 nan       nan       nan\n+    1_2 0.399722  0.379156  0.356543\n+    2_0 0.53099   0.53099   0.83673\n+    2_1 0.399722  0.399722  0.356543\n+    2_2 nan       nan       nan\n+\n+    (species pairs)\n+\n+    Example of Z-score normalized distance matrix from\n+    above:\n+        0            1           2          (genes)\n+    0_0 nan          nan         nan\n+    0_1 -1.40548346  0.83861735  0.56686611\n+    0_2 -1.41421356  0.70710678  0.70710678\n+    1_0 -0.70710678 -0.70710678  1.41421356\n+    1_1 nan          nan         nan\n+    1_2 1.20493966   0.03869341 -1.24363308\n+    2_0 -0.70710678 -0.70710678  1.41421356\n+    2_1 0.70710678   0.70710678 -1.41421356\n+    2_2 nan          nan         nan\n+\n+    (species pairs)\n+\n+    Parameters\n+    ----------\n+    phylip_fp: string\n+        filepath to distance matrix output by PHYLIP's protdist function\n+    full_distance_matrix: dictionary\n+        complete distance matrix for pairwise alignments between all species\n+        for every gene\n+    num_species: integer\n+        number of species in the reference database\n+    full_distance_matrix_offset: integer\n+        the index offset for elements in full_distance_matrix where to write\n+        the next array\n+    species_set_dict: dictionary\n+        dictionary containing the binary indicator vectors as keys and the\n+        number of genes with identical species set represented by the binary\n+        vectors as values\n+    gene_bitvector_map: list\n+        list containing the binary indicator vector for each query gene\n+    debug: boolean\n+        if True, run function in debug mode\n+    \"\"\"\n+    # assume a pairwise alignment exists for all species\n+    missing_species = [str(x) for x in range(0, num_species)]\n+    # scan through file and remove species that exist\n+    # from missing_species list\n+    with open(phylip_fp, 'U') as phylip_f:\n+        for line in phylip_f:\n+            alignment_dist = line.strip().split()\n+            if len(alignment_dist) == 1:\n+                continue\n+            if not line.startswith(' '):\n+                species = line.split()[0].split('_')[0]\n+                missing_species.remove(species)\n+\n+    # scan through file again, collecting alignment","path":"distance-method/distance_method.py","position":425,"original_position":425,"commit_id":"c390dd193118c00a7c5737fb67b54cd33b9e1ad3","original_commit_id":"c390dd193118c00a7c5737fb67b54cd33b9e1ad3","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":"Got it, thanks for the explanation. What about creating the full placeholder before reading and only updating the values that are in the file?","created_at":"2015-09-14T18:40:33Z","updated_at":"2015-09-14T18:40:33Z","html_url":"https://github.com/biocore/WGS-HGT/pull/1#discussion_r39430335","pull_request_url":"https://api.github.com/repos/biocore/WGS-HGT/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/biocore/WGS-HGT/pulls/comments/39430335"},"html":{"href":"https://github.com/biocore/WGS-HGT/pull/1#discussion_r39430335"},"pull_request":{"href":"https://api.github.com/repos/biocore/WGS-HGT/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/biocore/WGS-HGT/pulls/1","id":44699500,"html_url":"https://github.com/biocore/WGS-HGT/pull/1","diff_url":"https://github.com/biocore/WGS-HGT/pull/1.diff","patch_url":"https://github.com/biocore/WGS-HGT/pull/1.patch","issue_url":"https://api.github.com/repos/biocore/WGS-HGT/issues/1","number":1,"state":"open","locked":false,"title":"The Distance Method HGT detection algorithm implemented in python","user":{"login":"ekopylova","id":6933444,"avatar_url":"https://avatars.githubusercontent.com/u/6933444?v=3","gravatar_id":"","url":"https://api.github.com/users/ekopylova","html_url":"https://github.com/ekopylova","followers_url":"https://api.github.com/users/ekopylova/followers","following_url":"https://api.github.com/users/ekopylova/following{/other_user}","gists_url":"https://api.github.com/users/ekopylova/gists{/gist_id}","starred_url":"https://api.github.com/users/ekopylova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekopylova/subscriptions","organizations_url":"https://api.github.com/users/ekopylova/orgs","repos_url":"https://api.github.com/users/ekopylova/repos","events_url":"https://api.github.com/users/ekopylova/events{/privacy}","received_events_url":"https://api.github.com/users/ekopylova/received_events","type":"User","site_admin":false},"body":"Implementation of the Distance Method for HGT detection based on algorithm described in:\r\n        Wei. X et al., \"A Distance-Based Method for Detecting HGT in Whole\r\n        Genomes\", International Symposium on Bioinformatics Research and\r\n        Applications (ISBRA), 2008, pages 26-37\r\n\r\n    The workflow follows the algorithm:\r\n    1. For each gene in target genome,\r\n        i.    BLAST sequence against all other genes in the reference genomes;\r\n        ii.   Go to step 3 if gene has more than threshold number of homologs\r\n              (min-num-homologs), otherwise go to next gene in target genome;\r\n        iii.  Compute multiple sequence alignment on homolog genes using\r\n              CLUSTAL;\r\n        iv.   Compute pairwise distance matrix using PHYLIP's protdist\r\n              function and Z-score normalize the set of pairwise distances\r\n              for each gene family and species;\r\n        v.    Add distance matrix for all pairwise distances into global\r\n              distance matrix storing results for all genes\r\n\r\n    2. Cluster gene families by species,\r\n        vi.   Compute all species sets (sets of genes whose orthologs are\r\n              detectable in exactly the same subset of the considered\r\n              species);\r\n        vii.  Cluster genes to each core species set cluster using the Hamming\r\n              distance clustering algorithm;\r\n        viii. Run outlier detection algorithm on each cluster (paragraph 2\r\n              of section 'Detecting Outlier Genes' in original paper)","created_at":"2015-09-10T18:03:21Z","updated_at":"2015-09-14T18:40:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c5767fb9464745bbcc28428169360feef31b69fe","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/biocore/WGS-HGT/pulls/1/commits","review_comments_url":"https://api.github.com/repos/biocore/WGS-HGT/pulls/1/comments","review_comment_url":"https://api.github.com/repos/biocore/WGS-HGT/pulls/comments{/number}","comments_url":"https://api.github.com/repos/biocore/WGS-HGT/issues/1/comments","statuses_url":"https://api.github.com/repos/biocore/WGS-HGT/statuses/c390dd193118c00a7c5737fb67b54cd33b9e1ad3","head":{"label":"ekopylova:distance_method","ref":"distance_method","sha":"c390dd193118c00a7c5737fb67b54cd33b9e1ad3","user":{"login":"ekopylova","id":6933444,"avatar_url":"https://avatars.githubusercontent.com/u/6933444?v=3","gravatar_id":"","url":"https://api.github.com/users/ekopylova","html_url":"https://github.com/ekopylova","followers_url":"https://api.github.com/users/ekopylova/followers","following_url":"https://api.github.com/users/ekopylova/following{/other_user}","gists_url":"https://api.github.com/users/ekopylova/gists{/gist_id}","starred_url":"https://api.github.com/users/ekopylova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekopylova/subscriptions","organizations_url":"https://api.github.com/users/ekopylova/orgs","repos_url":"https://api.github.com/users/ekopylova/repos","events_url":"https://api.github.com/users/ekopylova/events{/privacy}","received_events_url":"https://api.github.com/users/ekopylova/received_events","type":"User","site_admin":false},"repo":{"id":42261137,"name":"WGS-HGT","full_name":"ekopylova/WGS-HGT","owner":{"login":"ekopylova","id":6933444,"avatar_url":"https://avatars.githubusercontent.com/u/6933444?v=3","gravatar_id":"","url":"https://api.github.com/users/ekopylova","html_url":"https://github.com/ekopylova","followers_url":"https://api.github.com/users/ekopylova/followers","following_url":"https://api.github.com/users/ekopylova/following{/other_user}","gists_url":"https://api.github.com/users/ekopylova/gists{/gist_id}","starred_url":"https://api.github.com/users/ekopylova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekopylova/subscriptions","organizations_url":"https://api.github.com/users/ekopylova/orgs","repos_url":"https://api.github.com/users/ekopylova/repos","events_url":"https://api.github.com/users/ekopylova/events{/privacy}","received_events_url":"https://api.github.com/users/ekopylova/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ekopylova/WGS-HGT","description":"Workflow for detecting genome-wide horizontal gene transfers","fork":true,"url":"https://api.github.com/repos/ekopylova/WGS-HGT","forks_url":"https://api.github.com/repos/ekopylova/WGS-HGT/forks","keys_url":"https://api.github.com/repos/ekopylova/WGS-HGT/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ekopylova/WGS-HGT/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ekopylova/WGS-HGT/teams","hooks_url":"https://api.github.com/repos/ekopylova/WGS-HGT/hooks","issue_events_url":"https://api.github.com/repos/ekopylova/WGS-HGT/issues/events{/number}","events_url":"https://api.github.com/repos/ekopylova/WGS-HGT/events","assignees_url":"https://api.github.com/repos/ekopylova/WGS-HGT/assignees{/user}","branches_url":"https://api.github.com/repos/ekopylova/WGS-HGT/branches{/branch}","tags_url":"https://api.github.com/repos/ekopylova/WGS-HGT/tags","blobs_url":"https://api.github.com/repos/ekopylova/WGS-HGT/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ekopylova/WGS-HGT/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ekopylova/WGS-HGT/git/refs{/sha}","trees_url":"https://api.github.com/repos/ekopylova/WGS-HGT/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ekopylova/WGS-HGT/statuses/{sha}","languages_url":"https://api.github.com/repos/ekopylova/WGS-HGT/languages","stargazers_url":"https://api.github.com/repos/ekopylova/WGS-HGT/stargazers","contributors_url":"https://api.github.com/repos/ekopylova/WGS-HGT/contributors","subscribers_url":"https://api.github.com/repos/ekopylova/WGS-HGT/subscribers","subscription_url":"https://api.github.com/repos/ekopylova/WGS-HGT/subscription","commits_url":"https://api.github.com/repos/ekopylova/WGS-HGT/commits{/sha}","git_commits_url":"https://api.github.com/repos/ekopylova/WGS-HGT/git/commits{/sha}","comments_url":"https://api.github.com/repos/ekopylova/WGS-HGT/comments{/number}","issue_comment_url":"https://api.github.com/repos/ekopylova/WGS-HGT/issues/comments{/number}","contents_url":"https://api.github.com/repos/ekopylova/WGS-HGT/contents/{+path}","compare_url":"https://api.github.com/repos/ekopylova/WGS-HGT/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ekopylova/WGS-HGT/merges","archive_url":"https://api.github.com/repos/ekopylova/WGS-HGT/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ekopylova/WGS-HGT/downloads","issues_url":"https://api.github.com/repos/ekopylova/WGS-HGT/issues{/number}","pulls_url":"https://api.github.com/repos/ekopylova/WGS-HGT/pulls{/number}","milestones_url":"https://api.github.com/repos/ekopylova/WGS-HGT/milestones{/number}","notifications_url":"https://api.github.com/repos/ekopylova/WGS-HGT/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ekopylova/WGS-HGT/labels{/name}","releases_url":"https://api.github.com/repos/ekopylova/WGS-HGT/releases{/id}","created_at":"2015-09-10T17:55:21Z","updated_at":"2015-08-24T19:43:04Z","pushed_at":"2015-09-10T19:07:07Z","git_url":"git://github.com/ekopylova/WGS-HGT.git","ssh_url":"git@github.com:ekopylova/WGS-HGT.git","clone_url":"https://github.com/ekopylova/WGS-HGT.git","svn_url":"https://github.com/ekopylova/WGS-HGT","homepage":null,"size":94,"stargazers_count":0,"watchers_count":0,"language":null,"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:master","ref":"master","sha":"a729bbf9ee750f4aacaea16ce13d87a68972208c","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":41323398,"name":"WGS-HGT","full_name":"biocore/WGS-HGT","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/WGS-HGT","description":"Workflow for detecting genome-wide horizontal gene transfers","fork":false,"url":"https://api.github.com/repos/biocore/WGS-HGT","forks_url":"https://api.github.com/repos/biocore/WGS-HGT/forks","keys_url":"https://api.github.com/repos/biocore/WGS-HGT/keys{/key_id}","collaborators_url":"https://api.github.com/repos/biocore/WGS-HGT/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/biocore/WGS-HGT/teams","hooks_url":"https://api.github.com/repos/biocore/WGS-HGT/hooks","issue_events_url":"https://api.github.com/repos/biocore/WGS-HGT/issues/events{/number}","events_url":"https://api.github.com/repos/biocore/WGS-HGT/events","assignees_url":"https://api.github.com/repos/biocore/WGS-HGT/assignees{/user}","branches_url":"https://api.github.com/repos/biocore/WGS-HGT/branches{/branch}","tags_url":"https://api.github.com/repos/biocore/WGS-HGT/tags","blobs_url":"https://api.github.com/repos/biocore/WGS-HGT/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/biocore/WGS-HGT/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/biocore/WGS-HGT/git/refs{/sha}","trees_url":"https://api.github.com/repos/biocore/WGS-HGT/git/trees{/sha}","statuses_url":"https://api.github.com/repos/biocore/WGS-HGT/statuses/{sha}","languages_url":"https://api.github.com/repos/biocore/WGS-HGT/languages","stargazers_url":"https://api.github.com/repos/biocore/WGS-HGT/stargazers","contributors_url":"https://api.github.com/repos/biocore/WGS-HGT/contributors","subscribers_url":"https://api.github.com/repos/biocore/WGS-HGT/subscribers","subscription_url":"https://api.github.com/repos/biocore/WGS-HGT/subscription","commits_url":"https://api.github.com/repos/biocore/WGS-HGT/commits{/sha}","git_commits_url":"https://api.github.com/repos/biocore/WGS-HGT/git/commits{/sha}","comments_url":"https://api.github.com/repos/biocore/WGS-HGT/comments{/number}","issue_comment_url":"https://api.github.com/repos/biocore/WGS-HGT/issues/comments{/number}","contents_url":"https://api.github.com/repos/biocore/WGS-HGT/contents/{+path}","compare_url":"https://api.github.com/repos/biocore/WGS-HGT/compare/{base}...{head}","merges_url":"https://api.github.com/repos/biocore/WGS-HGT/merges","archive_url":"https://api.github.com/repos/biocore/WGS-HGT/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/biocore/WGS-HGT/downloads","issues_url":"https://api.github.com/repos/biocore/WGS-HGT/issues{/number}","pulls_url":"https://api.github.com/repos/biocore/WGS-HGT/pulls{/number}","milestones_url":"https://api.github.com/repos/biocore/WGS-HGT/milestones{/number}","notifications_url":"https://api.github.com/repos/biocore/WGS-HGT/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/biocore/WGS-HGT/labels{/name}","releases_url":"https://api.github.com/repos/biocore/WGS-HGT/releases{/id}","created_at":"2015-08-24T19:43:04Z","updated_at":"2015-08-24T19:43:04Z","pushed_at":"2015-09-10T19:07:07Z","git_url":"git://github.com/biocore/WGS-HGT.git","ssh_url":"git@github.com:biocore/WGS-HGT.git","clone_url":"https://github.com/biocore/WGS-HGT.git","svn_url":"https://github.com/biocore/WGS-HGT","homepage":null,"size":144,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/biocore/WGS-HGT/pulls/1"},"html":{"href":"https://github.com/biocore/WGS-HGT/pull/1"},"issue":{"href":"https://api.github.com/repos/biocore/WGS-HGT/issues/1"},"comments":{"href":"https://api.github.com/repos/biocore/WGS-HGT/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/biocore/WGS-HGT/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/biocore/WGS-HGT/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/biocore/WGS-HGT/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/biocore/WGS-HGT/statuses/c390dd193118c00a7c5737fb67b54cd33b9e1ad3"}}}}