Esempio n. 1
0
def get_taxonomy_results():
    """Get list of taxonomy results.

    This function returns the  description about the possible results
    accessible via the taxon portal. Each taxonomy result is described with a
    short description"""
    taxo_results = enasearch.get_taxonomy_results(verbose=False)
    print_simple_dict(taxo_results)
Esempio n. 2
0
def test_get_taxonomy_results():
    """Test get_taxonomy_results function"""
    results = enasearch.get_taxonomy_results(verbose=False)
    exp_taxo_results = [
        'sequence_release', 'sequence_update', 'coding_release',
        'coding_update', 'noncoding_release', 'noncoding_update',
        'sample', 'study', 'analysis', 'analysis_study', 'read_run',
        'read_experiment', 'read_study', 'read_trace']
    assert cmp(results.keys(), exp_taxo_results)
Esempio n. 3
0
def write_taxonomy_results():
    """
    Write the possible taxonomy results
    """
    s = '%s<xml name="taxonomy_results">\n' % (spaces)
    fields = enasearch.get_taxonomy_results(verbose=False)
    for f in fields:
        s += '%s<option value="%s">%s</option>\n' % (2 * spaces, f, fields[f]['description'])
    s += '%s</xml>\n' % (spaces)
    return s
Esempio n. 4
0
def get_taxonomy_results():
    """ Return the list of taxonomy results in ENA """
    taxo_results = enasearch.get_taxonomy_results(verbose=False)
    print_simple_dict(taxo_results)