GitHub PullRequestReviewCommentEvent at 2014-07-28 20:12:43
Repository: scikit-bio
Actor: wasade
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/biocore/scikit-bio/pulls/comments/15487309","id":15487309,"diff_hunk":"@@ -0,0 +1,871 @@\n+r\"\"\"\n+E-utilities core objects (:mod:`skbio.db.ncbi`)\n+===============================================\n+\n+.. currentmodule:: skbio.db.ncbi\n+\n+EUtils [1]_. is a web service offered by the NCBI to access the sequence,\n+literature and other databases by a special format of URLs. This module offers\n+an interface to construct the URLs and retrieve the results in text format.\n+\n+Classes\n+-------\n+\n+.. autosummary::\n+   :toctree: generated/\n+\n+   EFetch\n+   ELink\n+   ESearch\n+   EUtils\n+\n+References\n+----------\n+.. [1] http://www.ncbi.nih.gov/entrez/eutils\n+\n+\"\"\"\n+from __future__ import absolute_import, division, print_function\n+\n+# ----------------------------------------------------------------------------\n+# Copyright (c) 2013--, scikit-bio 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+from time import sleep\n+from xml.dom.minidom import parseString\n+from xml.etree.ElementTree import parse\n+\n+from future.utils import PY3\n+from future.utils.six import StringIO\n+\n+from skbio.core.exception import QueryNotFoundError\n+from skbio.db.base import (URLGetter,\n+                           make_lists_of_expanded_slices_of_set_size,\n+                           make_lists_of_accessions_of_set_size)\n+from skbio.parse.record_finder import DelimitedRecordFinder\n+\n+# py3k compatibility\n+if PY3:\n+    strip = str.strip\n+else:\n+    from string import strip\n+\n+# eutils_base='http://eutils.ncbi.nlm.nih.gov/entrez/eutils'\n+EUTILS_BASE_URL = 'http://www.ncbi.nlm.nih.gov/entrez/eutils'\n+\n+# EUtils requires a tool and and email address\n+DEFAULT_TOOL_STRING = 'scikit-bio'\n+DEFAULT_EMAIL_ADDRESS = 'yoshiki.vazquezbaeza@colorado.edu'\n+\n+# databases last updated 7/22/05\n+VALID_DATABASES = dict.fromkeys([\"pubmed\", \"protein\", \"nucleotide\",\n+                                 \"structure\", \"genome\", \"books\",\n+                                 \"cancerchromosomes\", \"cdd\", \"domains\", \"gene\",\n+                                 \"genomeprj\", \"gensat\", \"geo\", \"gds\",\n+                                 \"homologene\", \"journals\", \"mesh\",\n+                                 \"ncbisearch\", \"nlmcatalog\", \"omim\", \"pmc\",\n+                                 \"popset\", \"probe\", \"pcassay\", \"pccompound\",\n+                                 \"pcsubstance\", \"snp\", \"taxonomy\", \"unigene\",\n+                                 \"unists\"])\n+\n+# RETTYPES last updated 7/22/05 somehow, I don't think we'll be writing parsers\n+# for all these...\n+# WARNING BY RK 4/13/09: THESE RETTYPES ARE HIGHLY MISLEADING AND NO LONGER\n+# WORK. See this URL for the list of \"official\" rettypes, which is highly\n+# incomplete and has some important omissions (e.g. rettype 'gi' is missing but\n+# is the \"official\" replacement for 'GiList'):\n+# http://eutils.ncbi.nlm.nih.gov/entrez/query/static/efetchseq_help.html In\n+# particular, use gb or gp for GenBank or GenPept, use gi for GiList, use fasta\n+# for FASTA, and several other changes.  Until we get a complete accounting of\n+# what all the changes are, treat the rettypes below with extreme caution and\n+# experiment in the interpreter.\n+RETTYPES = {}\n+RETTYPES['pubmed'] = ('DocSum Brief Abstract Citation MEDLINE XML uilist '\n+                      'ExternalLink ASN1 pubmed_pubmed pubmed_pubmed_refs '\n+                      'pubmed_books_refs pubmed_cancerchromosomes pubmed_cdd '\n+                      'pubmed_domains pubmed_gds pubmed_gene pubmed_gene_rif '\n+                      'pubmed_genome pubmed_genomeprj pubmed_gensat pubmed_geo'\n+                      ' pubmed_homologene pubmed_nucleotide pubmed_omim '\n+                      ' pubmed_pcassay pubmed_pccompound '\n+                      'pubmed_pccompound_mesh '\n+                      'pubmed_pcsubstance pubmed_pcsubstance_mesh pubmed_pmc '\n+                      'pubmed_pmc_refs pubmed_popset '\n+                      'pubmed_probe pubmed_protein '\n+                      'pubmed_snp pubmed_structure '\n+                      'pubmed_unigene pubmed_unists')\n+\n+RETTYPES['protein'] = ('DocSum ASN1 FASTA XML GenPept GiList graph fasta_xml '\n+                       'igp_xml gpc_xml ExternalLink protein_protein '\n+                       'protein_cdd protein_domains protein_gene protein_genom'\n+                       'e protein_genomeprj protein_homologene '\n+                       'protein_nucleotide protein_nucleotide_mgc protein_omim'\n+                       ' protein_pcassay protein_pccompound protein_pcsubstanc'\n+                       'e protein_pmc protein_popset protein_pubmed protein_sn'\n+                       'p protein_snp_genegenotype protein_structure '\n+                       'protein_taxonomy protein_unigene')\n+\n+RETTYPES['nucleotide'] = ('DocSum ASN1 FASTA XML GenBank GiList graph '\n+                          'fasta_xml gb_xml gbc_xml ExternalLink '\n+                          'nucleotide_comp_nucleotide nucleotide_nucleotide '\n+                          'nucleotide_nucleotide_comp '\n+                          'nucleotide_nucleotide_mrna nucleotide_comp_genome '\n+                          'nucleotide_gene nucleotide_genome '\n+                          'nucleotide_genome_samespecies nucleotide_gensat '\n+                          'nucleotide_geo nucleotide_homologene '\n+                          'nucleotide_mrna_genome nucleotide_omim '\n+                          'nucleotide_pcassay nucleotide_pccompound '\n+                          'nucleotide_pcsubstance nucleotide_pmc '\n+                          'nucleotide_popset nucleotide_probe '\n+                          'nucleotide_protein nucleotide_pubmed nucleotide_snp'\n+                          ' nucleotide_snp_genegenotype nucleotide_structure'\n+                          ' nucleotide_taxonomy nucleotide_unigene '\n+                          'nucleotide_unists')\n+\n+RETTYPES['structure'] = ('DocSum Brief Structure Summary uilist ExternalLink'\n+                         ' structure_domains structure_genome '\n+                         'structure_nucleotide structure_omim '\n+                         'structure_pcassay structure_pccompound '\n+                         'structure_pcsubstance structure_pmc '\n+                         'structure_protein structure_pubmed structure_snp '\n+                         'structure_taxonomy')\n+\n+RETTYPES['genome'] = ('DocSum ASN1 GenBank XML ExternalLink genome_genomeprj '\n+                      'genome_nucleotide genome_nucleotide_comp '\n+                      'genome_nucleotide_mrna genome_nucleotide_samespecies '\n+                      'genome_omim genome_pmc genome_protein genome_pubmed '\n+                      'genome_structure genome_taxonomy')\n+\n+RETTYPES['books'] = ('DocSum Brief Books books_gene books_omim books_pmc_refs '\n+                     'books_pubmed_refs')\n+\n+RETTYPES['cancerchromosomes'] = ('DocSum SkyCghDetails SkyCghCommon '\n+                                 'SkyCghCommonVerbose '\n+                                 'cancerchromosomes_cancerchromosomes_casecell'\n+                                 ' cancerchromosomes_cancerchromosomes_cellca'\n+                                 'se cancerchromosomes_cancerchromosomes_cytoc'\n+                                 'gh cancerchromosomes_cancerchromosomes_cytoc'\n+                                 'lincgh cancerchromosomes_cancerchromosomes_'\n+                                 'cytoclinsky cancerchromosomes_cancerchromos'\n+                                 'omes_cytodiagcgh cancerchromosomes_cancerch'\n+                                 'romosomes_cytodiagsky cancerchromosomes_can'\n+                                 'cerchromosomes_cytosky cancerchromosomes_ca'\n+                                 'ncerchromosomes_diag cancerchromosomes_canc'\n+                                 'erchromosomes_textual cancerchromosomes_pmc'\n+                                 ' cancerchromosomes_pubmed')\n+\n+RETTYPES['cdd'] = ('DocSum Brief uilist cdd_cdd_fused cdd_cdd_related '\n+                   'cdd_gene cdd_homologene cdd_pmc cdd_protein cdd_pubmed '\n+                   'cdd_taxonomy')\n+\n+RETTYPES['domains'] = ('DocSum Brief uilist domains_domains_new domains_pmc '\n+                       'domains_protein domains_pubmed domains_structure '\n+                       'domains_taxonomy')\n+\n+RETTYPES['gene'] = ('Default DocSum Brief ASN.1 XML Graphics gene_table uilist'\n+                    ' ExternalLink gene_books gene_cdd gene_gensat gene_geo '\n+                    'gene_homologene gene_nucleotide gene_nucleotide_mgc '\n+                    'gene_omim gene_pmc gene_probe gene_protein gene_pubmed '\n+                    'gene_pubmed_rif gene_snp gene_snp_genegenotype '\n+                    'gene_taxonomy gene_unigene gene_unists')\n+\n+RETTYPES['genomeprj'] = ('DocSum Brief Overview genomeprj_genomeprj '\n+                         'genomeprj_genome genomeprj_nucleotide '\n+                         'genomeprj_nucleotide_mrna genomeprj_nucleotide_orga'\n+                         'nella genomeprj_nucleotide_wgs genomeprj_pmc '\n+                         'genomeprj_popset genomeprj_protein genomeprj_pubmed '\n+                         'genomeprj_taxonomy')\n+\n+RETTYPES['gensat'] = ('Group Detail DocSum Brief gensat_gensat gensat_gene '\n+                      'gensat_geo gensat_nucleotide gensat_pmc gensat_pubmed '\n+                      'gensat_taxonomy gensat_unigene')\n+\n+RETTYPES['geo'] = ('DocSum Brief ExternalLink geo_geo_homologs geo_geo_prof '\n+                   'geo_geo_seq geo_gds geo_gene geo_gensat geo_homologene '\n+                   'geo_nucleotide geo_omim geo_pmc geo_pubmed geo_taxonomy '\n+                   'geo_unigene')\n+\n+RETTYPES['gds'] = ('DocSum Brief gds_gds gds_geo gds_pmc gds_pubmed '\n+                   'gds_taxonomy')\n+\n+RETTYPES['homologene'] = ('DocSum Brief HomoloGene AlignmentScores '\n+                          'MultipleAlignment ASN1 XML FASTA '\n+                          'homologene_homologene homologene_cdd '\n+                          'homologene_gene homologene_geo homologene_nucleoti'\n+                          'de homologene_omim homologene_pmc homologene_prote'\n+                          'in homologene_pubmed homologene_snp homologene_snp'\n+                          '_genegenotype homologene_taxonomy '\n+                          'homologene_unigene')\n+\n+RETTYPES['journals'] = ('DocSum full journals_PubMed journals_Protein '\n+                        'journals_Nucleotide journals_Genome journals_Popset '\n+                        'journals_PMC journals_nlmcatalog')\n+\n+RETTYPES['mesh'] = 'Full DocSum Brief mesh_PubMed'\n+\n+RETTYPES['ncbisearch'] = 'DocSum Brief Home+Page+View ncbisearch_ncbisearch'\n+\n+RETTYPES['nlmcatalog'] = 'Brief DocSum XML Expanded Full Subject ExternalLink'\n+\n+RETTYPES['omim'] = ('DocSum Detailed Synopsis Variants ASN1 XML ExternalLink '\n+                    'omim_omim omim_books omim_gene omim_genome omim_geo '\n+                    'omim_homologene omim_nucleotide omim_pmc omim_protein '\n+                    'omim_pubmed omim_snp omim_snp_genegenotype omim_structure'\n+                    ' omim_unigene omim_unists')\n+\n+RETTYPES['pmc'] = ('DocSum Brief XML TxTree pmc_books_refs '\n+                   'pmc_cancerchromosomes pmc_cdd pmc_domains pmc_gds pmc_gene'\n+                   ' pmc_genome pmc_genomeprj pmc_gensat pmc_geo '\n+                   'pmc_homologene pmc_nucleotide pmc_omim pmc_pccompound '\n+                   'pmc_pcsubstance pmc_popset pmc_protein pmc_pubmed '\n+                   'pmc_refs_pubmed pmc_snp pmc_structure pmc_taxonomy '\n+                   'pmc_unists')\n+\n+RETTYPES['popset'] = ('DocSum PS ASN1 XML GiList ExternalLink TxTree '\n+                      'popset_genomeprj popset_nucleotide popset_protein '\n+                      'popset_pubmed popset_taxonomy')\n+\n+RETTYPES['probe'] = ('DocSum Brief ASN1 XML Probe probe_probe probe_gene '\n+                     'probe_nucleotide probe_pubmed probe_taxonomy')\n+\n+RETTYPES['pcassay'] = ('DocSum Brief uilist pcassay_nucleotide '\n+                       'pcassay_pccompound pcassay_pccompound_active '\n+                       'pcassay_pccompound_inactive pcassay_pcsubstance '\n+                       'pcassay_pcsubstance_active '\n+                       'pcassay_pcsubstance_inactive pcassay_protein '\n+                       'pcassay_pubmed pcassay_structure')\n+\n+RETTYPES['pccompound'] = ('Brief DocSum PROP SYNONYMS pc_fetch '\n+                          'pccompound_pccompound_pulldown '\n+                          'pccompound_pccompound_sameanytautomer_pulldown '\n+                          'pccompound_pccompound_sameconnectivity_pulldown '\n+                          'pccompound_pccompound_sameisotopic_pulldown '\n+                          'pccompound_pccompound_samestereochem_pulldown '\n+                          'pccompound_nucleotide pccompound_pcassay '\n+                          'pccompound_pcassay_active '\n+                          'pccompound_pcassay_inactive pccompound_pcsubstance '\n+                          'pccompound_pmc pccompound_protein pccompound_pubmed'\n+                          ' pccompound_pubmed_mesh pccompound_structure')\n+\n+RETTYPES['pcsubstance'] = ('Brief DocSum PROP SYNONYMS pc_fetch IDLIST '\n+                           'pcsubstance_pcsubstance_pulldown '\n+                           'pcsubstance_pcsubstance_same_pulldown '\n+                           'pcsubstance_pcsubstance_sameanytautomer_pulldown '\n+                           'pcsubstance_pcsubstance_sameconnectivity_pulldow '\n+                           'pcsubstance_pcsubstance_sameisotopic_pulldown '\n+                           'pcsubstance_pcsubstance_samestereochem_pulldown '\n+                           'pcsubstance_mesh pcsubstance_nucleotide '\n+                           'pcsubstance_pcassay pcsubstance_pcassay_active '\n+                           'pcsubstance_pcassay_inactive '\n+                           'pcsubstance_pccompound pcsubstance_pmc '\n+                           'pcsubstance_protein pcsubstance_pubmed '\n+                           'pcsubstance_pubmed_mesh pcsubstance_structure')\n+\n+RETTYPES['snp'] = ('DocSum Brief FLT ASN1 XML FASTA RSR ssexemplar CHR FREQXML'\n+                   ' GENB GEN GENXML DocSet Batch uilist GbExp ExternalLink '\n+                   'MergeStatus snp_snp_genegenotype snp_gene snp_homologene '\n+                   'snp_nucleotide snp_omim snp_pmc snp_protein snp_pubmed '\n+                   'snp_structure snp_taxonomy snp_unigene snp_unists')\n+\n+RETTYPES['taxonomy'] = ('DocSum Brief TxUidList TxInfo XML TxTree ExternalLink'\n+                        ' taxonomy_protein taxonomy_nucleotide '\n+                        'taxonomy_structure taxonomy_genome taxonomy_gene '\n+                        'taxonomy_cdd taxonomy_domains taxonomy_gds '\n+                        'taxonomy_genomeprj taxonomy_gensat '\n+                        'taxonomy_homologene taxonomy_pmc taxonomy_popset '\n+                        'taxonomy_probe taxonomy_pubmed taxonomy_snp '\n+                        'taxonomy_unigene taxonomy_unists')\n+\n+RETTYPES['unigene'] = ('DocSum Brief ExternalLink unigene_unigene '\n+                       'unigene_unigene_expression unigene_unigene_homologous '\n+                       'unigene_gene unigene_gensat unigene_geo '\n+                       'unigene_homologene unigene_nucleotide '\n+                       'unigene_nucleotide_mgc unigene_omim unigene_protein '\n+                       'unigene_pubmed unigene_snp unigene_snp_genegenotype '\n+                       'unigene_taxonomy unigene_unists')\n+\n+RETTYPES['unists'] = ('DocSum Brief ExternalLink unists_gene unists_nucleotide'\n+                      ' unists_omim unists_pmc unists_pubmed unists_snp '\n+                      'unists_taxonomy unists_unigene')\n+\n+# convert into dict of known rettypes for efficient lookups -- don't want to\n+# scan list every time.\n+for key, val in RETTYPES.items():\n+    RETTYPES[key] = dict.fromkeys(val.split())\n+\n+\n+class ESearch(URLGetter):\n+\n+    \"\"\"URLGetter subclass that uses the `esearch` operator\n+\n+    Performs an `esearch` operation, getting a list of ids from an arbitrary\n+    query.\n+\n+    References\n+    ----------\n+    .. [1] http://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.ESearch\n+\n+    See Also\n+    --------\n+    skbio.db.base.URLGetter\n+\n+    \"\"\"\n+    printed_fields = dict.fromkeys(['db', 'usehistory', 'term', 'retmax',\n+                                   'retstart', 'tool', 'email'])\n+    defaults = {'db': 'nucleotide', 'usehistory': 'y', 'retmax': 1000,\n+                'tool': DEFAULT_TOOL_STRING, 'email': DEFAULT_EMAIL_ADDRESS}\n+    base_url = EUTILS_BASE_URL + '/esearch.fcgi?'\n+\n+\n+class EFetch(URLGetter):\n+\n+    \"\"\"URLGetter subclass that uses the `efetch` operator\n+\n+    Performs an `efetch` operation, getting a list of ids from an arbitrary\n+    query.\n+\n+    References\n+    ----------\n+    .. [1] http://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.EFetch\n+\n+    See Also\n+    --------\n+    skbio.db.base.URLGetter\n+\n+    \"\"\"\n+    printed_fields = dict.fromkeys(['db', 'rettype', 'retmode', 'query_key',\n+                                    'WebEnv', 'retmax', 'retstart', 'id',\n+                                    'tool', 'email'])\n+    defaults = {'retmode': 'text', 'rettype': 'fasta', 'db': 'nucleotide',\n+                'retstart': 0, 'retmax': 100, 'tool': DEFAULT_TOOL_STRING,\n+                'email': DEFAULT_EMAIL_ADDRESS}\n+    base_url = EUTILS_BASE_URL + '/efetch.fcgi?'\n+\n+\n+class ELink(URLGetter):\n+\n+    \"\"\"URLGetter subclass that uses the `elink` operator\n+\n+    Performs an `elink` operation, getting a list of ids from an arbitrary\n+    query (operates on databases that are linked together).\n+\n+    References\n+    ----------\n+    .. [1] http://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.ELink\n+\n+    See Also\n+    --------\n+    skbio.db.base.URLGetter\n+\n+    \"\"\"\n+    printed_fields = dict.fromkeys(['db', 'id', 'reldate',\n+                                    'mindate', 'maxdate', 'datetype',\n+                                    'term', 'retmode', 'db',\n+                                    'dbfrom', 'WebEnv', 'query_key',\n+                                    'holding', 'cmd', 'tool',\n+                                    'email'])\n+    defaults = {'tool': DEFAULT_TOOL_STRING,\n+                'email': DEFAULT_EMAIL_ADDRESS}\n+    base_url = EUTILS_BASE_URL + '/elink.fcgi?'\n+\n+\n+class ESearchResult(object):\n+\n+    \"\"\"Container object for results retrieved on EUtils\n+\n+    Notes\n+    -----\n+    This class is intended to be used internally ESearch.\n+\n+    \"\"\"\n+\n+    def __init__(self, **kwargs):\n+        self.__dict__.update(kwargs)\n+\n+    def __str__(self):\n+        return str(self.__dict__)\n+\n+\n+def _id_list_constructor(id_list_node):\n+    \"\"\"Takes an id_list xml node and converts it into list of ids as strings\"\"\"\n+    return [_str_constructor(n) for n in id_list_node.childNodes\n+            if n.nodeType != n.TEXT_NODE]\n+\n+\n+def _int_constructor(node):\n+    \"\"\"Makes an int out of node's first textnode child.\"\"\"\n+    return int(node.firstChild.data)\n+\n+\n+def _str_constructor(node):\n+    \"\"\"Makes an str out of node's first textnode child.\"\"\"\n+    return str(node.firstChild.data)\n+\n+# the following are the only keys we explicitly handle now:\n+# (note difference in capitalization from parameters passed in)\n+ESEARCH_CONSTRUCTORS = {\n+    'Count': _int_constructor,\n+    'RetMax': _int_constructor,\n+    'RetStart': _int_constructor,\n+    'QueryKey': _int_constructor,\n+    'WebEnv': _str_constructor,\n+    'IdList': _id_list_constructor}\n+\n+\n+def _esearch_result_parser(result_as_string):\n+    \"\"\"Parses an ESearch result. Returns ESearchResult object\n+\n+    Parameters\n+    ----------\n+    result_as_string : str\n+        the string to be parsed\n+\n+    Returns\n+    -------\n+    ESearchResult\n+        object representation of the parsed string\n+    \"\"\"\n+\n+    if '414 Request-URI Too Large' in result_as_string:\n+        raise ValueError(\"Tried to pass too large an URI:\\n\", result_as_string)\n+\n+    doc = parseString(result_as_string)\n+\n+    # assume one query result -- may need to fix\n+    query = doc.childNodes[-1]\n+    result = {}\n+\n+    for n in query.childNodes:\n+\n+        # skip top-level text nodes\n+        if n.nodeType == n.TEXT_NODE:\n+            continue\n+        name = str(n.tagName)  # who cares about unicode anyway...\n+        if name in ESEARCH_CONSTRUCTORS:\n+            result[name] = ESEARCH_CONSTRUCTORS[name](n)\n+        else:  # just keep the data if we don't know what it is\n+            result[name] = n.toxml()\n+    return ESearchResult(**result)\n+\n+\n+def _elink_result_parser(text):\n+    \"\"\"Gets the linked ids out of a single ELink result.\n+\n+    Does not use the XML parser because of problems with long results.\n+    Only handles cases where there is a single set of links between\n+    databases.\n+    \"\"\"\n+    result = []\n+    in_links = False\n+    for line in text.splitlines():\n+        line = str(line)  # py3k compatibility\n+        if '<LinkName>' in line:\n+            in_links = True\n+        elif in_links and ('<Id>' in line):\n+            try:\n+                # expect line of form <Id>xxxx</Id>: want xxxx\n+                result.append(line.split('>', 1)[1].rsplit('<', 1)[0])\n+            except (IndexError, TypeError):\n+                pass\n+        elif '</LinkSetDb>' in line:  # end of block\n+            break\n+    return result\n+\n+\n+class EUtils(object):\n+\n+    \"\"\"Retrieves records from NCBI using the Entrez utilities\n+\n+    Parameters\n+    ----------\n+    fp : str, optional\n+        The file path where results are written to. Defaults to ``None``.\n+    wait : float, optional\n+        Seconds to wait between fetching operations. Defaults to `0.5`.\n+    retmax : int, optional\n+        Maximum number of records per query. Defaults to `100`.\n+    url_limit : int, optional\n+        Limits the URL ESearch term size. Defaults to `400`.\n+    verbose : bool, optional\n+        Sets whether or not debugging information will be printed to standard\n+        output. Defaults to ``False``.\n+    max_recs : int, optional\n+        Total maximum number of records to retrieve. Defaults to None i. e. all\n+        records will be returned.\n+\n+    See Also\n+    --------\n+    EFetch\n+    ELink\n+    ESearch\n+    skbio.db.base.URLGetter\n+\n+    Examples\n+    --------\n+    >>> from skbio.db.ncbi import EUtils\n+    >>> eu = EUtils(db='pubmed', rettype='brief')\n+    >>> res = eu['PyCogent']\n+    >>> print(res.read()) # doctest: +ELLIPSIS\n+    <BLANKLINE>\n+    1...[PubMed]\n+    <BLANKLINE>\n+    <BLANKLINE>\n+    2...[PubMed - indexed for MEDLINE]\n+    <BLANKLINE>\n+    <BLANKLINE>\n+    3...[PubMed - indexed for MEDLINE]\n+    <BLANKLINE>\n+    <BLANKLINE>\n+\n+\n+    References\n+    ----------\n+    .. [1] http://www.ncbi.nlm.nih.gov/books/NBK25499/\n+    \"\"\"\n+\n+    def __init__(self, fp=None, wait=0.5, retmax=100, url_limit=400,\n+                 verbose=False, max_recs=None, **kwargs):\n+        self.__dict__.update(kwargs)\n+        self.fp = fp\n+        self.wait = wait\n+        self.retmax = retmax\n+        self.url_limit = url_limit\n+        self.max_recs = max_recs\n+        self.verbose = verbose\n+        self.term = None\n+\n+        # adjust retmax if max_recs is set: no point getting more records\n+        if max_recs is not None and max_recs < retmax:\n+            self.retmax = max_recs\n+\n+    def __getitem__(self, query):\n+        \"\"\"Gets a query from NCBI. Assumes lists are lists of accessions.\n+\n+        Returns\n+        -------\n+        file-like\n+            Returns a handle to the result (either in memory or file on disk).\n+\n+        Notes\n+        -----\n+        The result is not guaranteed to contain any data.\n+\n+        ..shownumpydoc\n+        \"\"\"\n+        # check if it's a slice\n+        if isinstance(query, slice):\n+            queries = make_lists_of_expanded_slices_of_set_size(query)\n+            return self.grab_data(queries)\n+\n+        # check if it's a list -- if so, delimit with ' '\n+        if isinstance(query, list) or isinstance(query, tuple):\n+            queries = make_lists_of_accessions_of_set_size(query)\n+            return self.grab_data(queries)\n+\n+        # most likey a general set of search terms\n+        # e.g. '9606[taxid] OR 28901[taxid]' . So just return.\n+        return self.grab_data([query])\n+\n+    def grab_data(self, queries):\n+        \"\"\"Iterates through list of search terms and combines results.\n+\n+        This will mostly only apply when the user wants to download thosands of\n+        sequences via accessions. This will supersede the GenBank URL length\n+        limit. So, we break up the accession list into sets of `400` terms per\n+        list.\n+\n+        Parameters\n+        ----------\n+        queries : list of list objects\n+            list of lists of accession lists/query items\n+\n+        Notes\n+        -----\n+\n+        If you *really* have more than 300-400 terms similar to a query. The\n+        results will not be what you want anyway due do the limitations of the\n+        `esearch` URL length at GenBank. You'll just end up returning sets of\n+        results from the broken up word based search terms.\n+        \"\"\"\n+        # figure out where to put the data\n+        if self.fp:\n+            result = open(self.fp, 'w')\n+        else:\n+            result = StringIO()\n+\n+        for query in queries:\n+            self.term = query\n+            search_query = ESearch(**self.__dict__)\n+\n+            # don't want the ids, just want to post search\n+            search_query.retmax = 0\n+            if self.verbose:\n+                print('SEARCH QUERY:')\n+                print(str(search_query))\n+            cookie = search_query.read()\n+            if self.verbose:\n+                print('COOKIE:')\n+                print(repr(cookie))\n+            search_result = _esearch_result_parser(cookie)\n+            if self.verbose:\n+                print('SEARCH RESULT:')\n+                print(search_result)\n+            try:\n+                self.query_key = search_result.QueryKey\n+                self.WebEnv = search_result.WebEnv\n+            except AttributeError:\n+                # The query_key and/or WebEnv not Found!\n+                # GenBank occiasionally does not return these when user\n+                # attempts to only fetch data by Accession or UID. So we just\n+                # move on to extract UID list directly from the search result\n+                try:\n+                    self.id = ','.join(search_result.IdList)\n+                except AttributeError:\n+                    raise QueryNotFoundError(\n+                        \"WebEnv or query_key not Found! Query %s returned no \"\n+                        \"results.\\nURL was:\\n%s\" %\n+                        (repr(query), str(search_query)))\n+\n+            count = search_result.Count\n+\n+            # wrap the fetch in a loop so we get all the results\n+            fetch_query = EFetch(**self.__dict__)\n+            curr_rec = 0\n+            # check if we need to get additional ids\n+\n+            if self.max_recs:  # cut off at max_recs if set\n+                count = min(count, self.max_recs)\n+                retmax = min(self.retmax, self.max_recs)\n+            else:\n+                retmax = self.retmax\n+\n+            while curr_rec < count:\n+                # do the fetch\n+                if count - curr_rec < self.retmax:\n+                    fetch_query.retmax = count - curr_rec\n+                fetch_query.retstart = curr_rec\n+                if self.verbose:\n+                    print('FETCH QUERY')\n+                    print('CURR REC:', curr_rec, 'COUNT:', count)\n+                    print(str(fetch_query))\n+                # return the result of the fetch\n+                curr = str(fetch_query.read())\n+                result.write(curr)\n+                if not curr.endswith('\\n'):\n+                    result.write('\\n')\n+                curr_rec += retmax\n+                sleep(self.wait)\n+\n+        # clean up after retrieval\n+        if self.fp:\n+            result.close()\n+            return open(self.fp, 'r')\n+        else:\n+            result.seek(0)\n+            return result\n+\n+\n+# The following are convenience wrappers for some of the above functionality\n+def _get_primary_ids(term, retmax=100, max_recs=None, **kwargs):\n+    \"\"\"Gets primary ids from query.\"\"\"\n+    search_result = None\n+    records_got = 0\n+    if max_recs:\n+        retmax = min(retmax, max_recs)\n+    search_query = ESearch(term=term, retmax=retmax, **kwargs)\n+    while True:\n+        cookie = search_query.read()\n+        if search_result is None:\n+            search_result = _esearch_result_parser(cookie)\n+        else:\n+            search_result.IdList.extend(_esearch_result_parser(cookie).IdList)\n+        # set the query key and WebEnv\n+        search_query.query_key = search_result.QueryKey\n+        search_query.WebEnv = search_result.WebEnv\n+\n+        # if more results than retmax, keep adding results\n+        if max_recs:\n+            recs_to_get = min(max_recs, search_result.Count)\n+        else:\n+            recs_to_get = search_result.Count\n+        records_got += retmax\n+        if records_got >= recs_to_get:\n+            break\n+        elif recs_to_get - records_got < retmax:\n+            search_query.retmax = recs_to_get - records_got\n+        search_query.retstart = records_got\n+    return search_result.IdList\n+\n+\n+def _ids_to_taxon_ids(ids, db='nucleotide'):\n+    \"\"\"Converts primary ids to taxon ids\"\"\"\n+    link = ELink(id=' '.join(ids), db='taxonomy', dbfrom=db, DEBUG=True)\n+    return _elink_result_parser(link.read())\n+\n+\n+def _get_between_tags(line):\n+    \"\"\"\"Returns portion of line between xml tags.\"\"\"\n+    return line.split('>', 1)[1].rsplit('<', 1)[0]\n+\n+\n+def _taxon_lineage_extractor(lines):\n+    \"\"\"Extracts lineage from taxonomy record lines, not incl. species.\"\"\"\n+    for line in lines:\n+        if '<Lineage>' in line:\n+            # expect line of form <Lineage>xxxx</Lineage> where xxxx semicolon-\n+            # delimited\n+            between_tags = line.split('>', 1)[1].rsplit('<', 1)[0]\n+            yield [strip(element) for element in between_tags.split(';')]\n+\n+TAXON_RECORD_FINDER = DelimitedRecordFinder('</Taxon>', constructor=None,\n+                                            strict=False)\n+\n+\n+def _get_taxid_name_lineage(rec):\n+    \"\"\"Returns taxon id, name, and lineage from single xml taxon record.\"\"\"\n+    tax_tag = '  <TaxId>'\n+    name_tag = '  <ScientificName>'\n+    lineage_tag = '  <Lineage>'\n+    taxid = name = lineage = None\n+    for line in rec:\n+        if line.startswith(tax_tag):\n+            taxid = _get_between_tags(line)\n+        elif line.startswith(name_tag):\n+            name = _get_between_tags(line)\n+        elif line.startswith(lineage_tag):\n+            lineage = [strip(e) for e in _get_between_tags(line).split(';')]\n+    return taxid, name, lineage","path":"skbio/db/ncbi.py","position":739,"original_position":739,"commit_id":"47c4954946ed4f4f43c0f4a1f87cd8ffc0566900","original_commit_id":"47c4954946ed4f4f43c0f4a1f87cd8ffc0566900","user":{"login":"wasade","id":474290,"avatar_url":"https://avatars.githubusercontent.com/u/474290?","gravatar_id":"e45f3417df9a660f87d6e11f21d7f02a","url":"https://api.github.com/users/wasade","html_url":"https://github.com/wasade","followers_url":"https://api.github.com/users/wasade/followers","following_url":"https://api.github.com/users/wasade/following{/other_user}","gists_url":"https://api.github.com/users/wasade/gists{/gist_id}","starred_url":"https://api.github.com/users/wasade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wasade/subscriptions","organizations_url":"https://api.github.com/users/wasade/orgs","repos_url":"https://api.github.com/users/wasade/repos","events_url":"https://api.github.com/users/wasade/events{/privacy}","received_events_url":"https://api.github.com/users/wasade/received_events","type":"User","site_admin":false},"body":"Wow... sorry, scratch that. Didn't see the multi variable definition there...","created_at":"2014-07-28T20:12:43Z","updated_at":"2014-07-28T20:12:43Z","html_url":"https://github.com/biocore/scikit-bio/pull/538#discussion_r15487309","pull_request_url":"https://api.github.com/repos/biocore/scikit-bio/pulls/538","_links":{"self":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/comments/15487309"},"html":{"href":"https://github.com/biocore/scikit-bio/pull/538#discussion_r15487309"},"pull_request":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/538"}}},"pull_request":{"url":"https://api.github.com/repos/biocore/scikit-bio/pulls/538","id":18317991,"html_url":"https://github.com/biocore/scikit-bio/pull/538","diff_url":"https://github.com/biocore/scikit-bio/pull/538.diff","patch_url":"https://github.com/biocore/scikit-bio/pull/538.patch","issue_url":"https://api.github.com/repos/biocore/scikit-bio/issues/538","number":538,"state":"open","title":"First pass of EUtils ⚠️ (not ready for merge) ⚠️","user":{"login":"ElDeveloper","id":375307,"avatar_url":"https://avatars.githubusercontent.com/u/375307?","gravatar_id":"5ee33edf9eb551a3756365466dd91075","url":"https://api.github.com/users/ElDeveloper","html_url":"https://github.com/ElDeveloper","followers_url":"https://api.github.com/users/ElDeveloper/followers","following_url":"https://api.github.com/users/ElDeveloper/following{/other_user}","gists_url":"https://api.github.com/users/ElDeveloper/gists{/gist_id}","starred_url":"https://api.github.com/users/ElDeveloper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElDeveloper/subscriptions","organizations_url":"https://api.github.com/users/ElDeveloper/orgs","repos_url":"https://api.github.com/users/ElDeveloper/repos","events_url":"https://api.github.com/users/ElDeveloper/events{/privacy}","received_events_url":"https://api.github.com/users/ElDeveloper/received_events","type":"User","site_admin":false},"body":"This ports over all the code that we had in cogent.db, I have explicitly left\nout the submodules related to RFam and PDB. I've also ported over the super\nawesome tutorial that exercises a lot of the functionality in this module.\n\nThe few things that I can think of for immediate improvements are:\n\n- Unit Tests\n- Organization (there are far too many private functions).\n\nFor now I want to see how we are doing in coverage for these modules and make\nsure that everything is Kosher.\n\nIt would be great if someone could take a pass at it.","created_at":"2014-07-12T21:29:11Z","updated_at":"2014-07-28T20:12:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"db586440a2a2d89ca4f30e1c698048ba2cf8196b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/biocore/scikit-bio/pulls/538/commits","review_comments_url":"https://api.github.com/repos/biocore/scikit-bio/pulls/538/comments","review_comment_url":"https://api.github.com/repos/biocore/scikit-bio/pulls/comments/{number}","comments_url":"https://api.github.com/repos/biocore/scikit-bio/issues/538/comments","statuses_url":"https://api.github.com/repos/biocore/scikit-bio/statuses/47c4954946ed4f4f43c0f4a1f87cd8ffc0566900","head":{"label":"ElDeveloper:issue-225","ref":"issue-225","sha":"47c4954946ed4f4f43c0f4a1f87cd8ffc0566900","user":{"login":"ElDeveloper","id":375307,"avatar_url":"https://avatars.githubusercontent.com/u/375307?","gravatar_id":"5ee33edf9eb551a3756365466dd91075","url":"https://api.github.com/users/ElDeveloper","html_url":"https://github.com/ElDeveloper","followers_url":"https://api.github.com/users/ElDeveloper/followers","following_url":"https://api.github.com/users/ElDeveloper/following{/other_user}","gists_url":"https://api.github.com/users/ElDeveloper/gists{/gist_id}","starred_url":"https://api.github.com/users/ElDeveloper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElDeveloper/subscriptions","organizations_url":"https://api.github.com/users/ElDeveloper/orgs","repos_url":"https://api.github.com/users/ElDeveloper/repos","events_url":"https://api.github.com/users/ElDeveloper/events{/privacy}","received_events_url":"https://api.github.com/users/ElDeveloper/received_events","type":"User","site_admin":false},"repo":{"id":15595852,"name":"biolopy","full_name":"ElDeveloper/biolopy","owner":{"login":"ElDeveloper","id":375307,"avatar_url":"https://avatars.githubusercontent.com/u/375307?","gravatar_id":"5ee33edf9eb551a3756365466dd91075","url":"https://api.github.com/users/ElDeveloper","html_url":"https://github.com/ElDeveloper","followers_url":"https://api.github.com/users/ElDeveloper/followers","following_url":"https://api.github.com/users/ElDeveloper/following{/other_user}","gists_url":"https://api.github.com/users/ElDeveloper/gists{/gist_id}","starred_url":"https://api.github.com/users/ElDeveloper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElDeveloper/subscriptions","organizations_url":"https://api.github.com/users/ElDeveloper/orgs","repos_url":"https://api.github.com/users/ElDeveloper/repos","events_url":"https://api.github.com/users/ElDeveloper/events{/privacy}","received_events_url":"https://api.github.com/users/ElDeveloper/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ElDeveloper/biolopy","description":"Tools for biological data analysis in python.","fork":true,"url":"https://api.github.com/repos/ElDeveloper/biolopy","forks_url":"https://api.github.com/repos/ElDeveloper/biolopy/forks","keys_url":"https://api.github.com/repos/ElDeveloper/biolopy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ElDeveloper/biolopy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ElDeveloper/biolopy/teams","hooks_url":"https://api.github.com/repos/ElDeveloper/biolopy/hooks","issue_events_url":"https://api.github.com/repos/ElDeveloper/biolopy/issues/events{/number}","events_url":"https://api.github.com/repos/ElDeveloper/biolopy/events","assignees_url":"https://api.github.com/repos/ElDeveloper/biolopy/assignees{/user}","branches_url":"https://api.github.com/repos/ElDeveloper/biolopy/branches{/branch}","tags_url":"https://api.github.com/repos/ElDeveloper/biolopy/tags","blobs_url":"https://api.github.com/repos/ElDeveloper/biolopy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ElDeveloper/biolopy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ElDeveloper/biolopy/git/refs{/sha}","trees_url":"https://api.github.com/repos/ElDeveloper/biolopy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ElDeveloper/biolopy/statuses/{sha}","languages_url":"https://api.github.com/repos/ElDeveloper/biolopy/languages","stargazers_url":"https://api.github.com/repos/ElDeveloper/biolopy/stargazers","contributors_url":"https://api.github.com/repos/ElDeveloper/biolopy/contributors","subscribers_url":"https://api.github.com/repos/ElDeveloper/biolopy/subscribers","subscription_url":"https://api.github.com/repos/ElDeveloper/biolopy/subscription","commits_url":"https://api.github.com/repos/ElDeveloper/biolopy/commits{/sha}","git_commits_url":"https://api.github.com/repos/ElDeveloper/biolopy/git/commits{/sha}","comments_url":"https://api.github.com/repos/ElDeveloper/biolopy/comments{/number}","issue_comment_url":"https://api.github.com/repos/ElDeveloper/biolopy/issues/comments/{number}","contents_url":"https://api.github.com/repos/ElDeveloper/biolopy/contents/{+path}","compare_url":"https://api.github.com/repos/ElDeveloper/biolopy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ElDeveloper/biolopy/merges","archive_url":"https://api.github.com/repos/ElDeveloper/biolopy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ElDeveloper/biolopy/downloads","issues_url":"https://api.github.com/repos/ElDeveloper/biolopy/issues{/number}","pulls_url":"https://api.github.com/repos/ElDeveloper/biolopy/pulls{/number}","milestones_url":"https://api.github.com/repos/ElDeveloper/biolopy/milestones{/number}","notifications_url":"https://api.github.com/repos/ElDeveloper/biolopy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ElDeveloper/biolopy/labels{/name}","releases_url":"https://api.github.com/repos/ElDeveloper/biolopy/releases{/id}","created_at":"2014-01-02T22:53:46Z","updated_at":"2014-07-09T14:57:41Z","pushed_at":"2014-07-25T00:53:19Z","git_url":"git://github.com/ElDeveloper/biolopy.git","ssh_url":"git@github.com:ElDeveloper/biolopy.git","clone_url":"https://github.com/ElDeveloper/biolopy.git","svn_url":"https://github.com/ElDeveloper/biolopy","homepage":"https://github.com/biocore/bipy","size":17714,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"89fae842b052918b4532efad0a2cfdfcde2f2414","user":{"login":"biocore","id":6241857,"avatar_url":"https://avatars.githubusercontent.com/u/6241857?","gravatar_id":null,"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":15168264,"name":"scikit-bio","full_name":"biocore/scikit-bio","owner":{"login":"biocore","id":6241857,"avatar_url":"https://avatars.githubusercontent.com/u/6241857?","gravatar_id":null,"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/scikit-bio","description":"Core objects, functions and statistics for working with biological data in Python.","fork":false,"url":"https://api.github.com/repos/biocore/scikit-bio","forks_url":"https://api.github.com/repos/biocore/scikit-bio/forks","keys_url":"https://api.github.com/repos/biocore/scikit-bio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/biocore/scikit-bio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/biocore/scikit-bio/teams","hooks_url":"https://api.github.com/repos/biocore/scikit-bio/hooks","issue_events_url":"https://api.github.com/repos/biocore/scikit-bio/issues/events{/number}","events_url":"https://api.github.com/repos/biocore/scikit-bio/events","assignees_url":"https://api.github.com/repos/biocore/scikit-bio/assignees{/user}","branches_url":"https://api.github.com/repos/biocore/scikit-bio/branches{/branch}","tags_url":"https://api.github.com/repos/biocore/scikit-bio/tags","blobs_url":"https://api.github.com/repos/biocore/scikit-bio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/biocore/scikit-bio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/biocore/scikit-bio/git/refs{/sha}","trees_url":"https://api.github.com/repos/biocore/scikit-bio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/biocore/scikit-bio/statuses/{sha}","languages_url":"https://api.github.com/repos/biocore/scikit-bio/languages","stargazers_url":"https://api.github.com/repos/biocore/scikit-bio/stargazers","contributors_url":"https://api.github.com/repos/biocore/scikit-bio/contributors","subscribers_url":"https://api.github.com/repos/biocore/scikit-bio/subscribers","subscription_url":"https://api.github.com/repos/biocore/scikit-bio/subscription","commits_url":"https://api.github.com/repos/biocore/scikit-bio/commits{/sha}","git_commits_url":"https://api.github.com/repos/biocore/scikit-bio/git/commits{/sha}","comments_url":"https://api.github.com/repos/biocore/scikit-bio/comments{/number}","issue_comment_url":"https://api.github.com/repos/biocore/scikit-bio/issues/comments/{number}","contents_url":"https://api.github.com/repos/biocore/scikit-bio/contents/{+path}","compare_url":"https://api.github.com/repos/biocore/scikit-bio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/biocore/scikit-bio/merges","archive_url":"https://api.github.com/repos/biocore/scikit-bio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/biocore/scikit-bio/downloads","issues_url":"https://api.github.com/repos/biocore/scikit-bio/issues{/number}","pulls_url":"https://api.github.com/repos/biocore/scikit-bio/pulls{/number}","milestones_url":"https://api.github.com/repos/biocore/scikit-bio/milestones{/number}","notifications_url":"https://api.github.com/repos/biocore/scikit-bio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/biocore/scikit-bio/labels{/name}","releases_url":"https://api.github.com/repos/biocore/scikit-bio/releases{/id}","created_at":"2013-12-13T16:24:41Z","updated_at":"2014-07-28T19:42:13Z","pushed_at":"2014-07-28T16:36:06Z","git_url":"git://github.com/biocore/scikit-bio.git","ssh_url":"git@github.com:biocore/scikit-bio.git","clone_url":"https://github.com/biocore/scikit-bio.git","svn_url":"https://github.com/biocore/scikit-bio","homepage":"http://scikit-bio.org","size":34053,"stargazers_count":56,"watchers_count":56,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":30,"mirror_url":null,"open_issues_count":70,"forks":30,"open_issues":70,"watchers":56,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/538"},"html":{"href":"https://github.com/biocore/scikit-bio/pull/538"},"issue":{"href":"https://api.github.com/repos/biocore/scikit-bio/issues/538"},"comments":{"href":"https://api.github.com/repos/biocore/scikit-bio/issues/538/comments"},"review_comments":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/538/comments"},"review_comment":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/biocore/scikit-bio/pulls/538/commits"},"statuses":{"href":"https://api.github.com/repos/biocore/scikit-bio/statuses/47c4954946ed4f4f43c0f4a1f87cd8ffc0566900"}}}}