Пример #1
0
def link_to_h2007(tax):
    print '-- Putting families in Hibbett 2007 orders --'
    # 2014-04-13 Romina #40, #60
    for (order_name, family_names) in \
        [('Neozygitales', ['Neozygitaceae']),
         ('Asterinales', ['Asterinaceae']),
         ('Savoryellales', ['Savoryella', 'Ascotaiwania', 'Ascothailandia']), 
         ('Cladochytriales', ['Cladochytriaceae', 'Nowakowskiellaceae', 'Septochytriaceae', 'Endochytriaceae']),
         ('Jaapiales', ['Jaapiaceae']),
         ('Coniocybales', ['Coniocybaceae']),
         ('Hyaloraphidiales', ['Hyaloraphidiaceae']),
         ('Mytilinidiales', ['Mytilinidiaceae', 'Gloniaceae']),
        ]:
        order = tax.maybeTaxon(order_name)
        if order != None:
            for family in family_names:
                order.take(tax.taxon(family))
        else:
            print '*** Missing fungal order', foo[0]

    # 2015-07-13 Romina
    h2007_fam = 'http://figshare.com/articles/Fungal_Classification_2015/1465038'
    some_claims = []
    for (order, families) in \
        [('Talbotiomycetales',['Talbotiomyces calosporus']),
         ('Moniliellales',['Moniliellaceae']),   
         ('Malasseziales',['Malasseziaceae', 'Malassezia']),
         ('Trichotheliales',['Trichotheliaceae', 'Myeloconidiaceae']),
         ('Trichosporonales',['Sporobolomyces ruberrimus']),
         ('Holtermanniales',['Holtermanniella']),
         ('Lepidostromatales',['Lepidostromataceae']),
         ('Atheliales',['Atheliaceae']),
         ('Stereopsidales',['Stereopsidaceae']), 
         ('Septobasidiales',['Septobasidiaceae']),
         ('Symbiotaphrinales',['Symbiotaphrina']),
         ('Caliciales',['Sphaerophoraceae']),
         ('Sarrameanales',['Sarrameanaceae']),
         ('Trapeliales',['Trapeliaceae']),
         ('Halosphaeriales',['Halosphaeriaceae']),
         ('Abrothallales',['Abrothallus']),
         ('Arctomiales',['Arctomiaceae']),
         ('Hymeneliales',['Hymeneliaceae']),
         ('Leprocaulales',['Leprocaulaceae']),
     ]:
        for family in families:
            some_claims.append(Has_child(order, family, h2007_fam))
    make_claims(tax, some_claims)
    # Loxosporales,synonym of Sarrameanales
    make_claim(fungorum,
               Whether_same('Sarrameanales', 'Loxosporales',
                            True, h2007_fam))
Пример #2
0
def link_to_h2007(tax):
    print '-- Putting families in Hibbett 2007 orders --'
    # 2014-04-13 Romina #40, #60
    for (order_name, family_names) in \
        [('Neozygitales', ['Neozygitaceae']),
         ('Asterinales', ['Asterinaceae']),
         ('Savoryellales', ['Savoryella', 'Ascotaiwania', 'Ascothailandia']),
         ('Cladochytriales', ['Cladochytriaceae', 'Nowakowskiellaceae', 'Septochytriaceae', 'Endochytriaceae']),
         ('Jaapiales', ['Jaapiaceae']),
         ('Coniocybales', ['Coniocybaceae']),
         ('Hyaloraphidiales', ['Hyaloraphidiaceae']),
         ('Mytilinidiales', ['Mytilinidiaceae', 'Gloniaceae']),
        ]:
        order = tax.maybeTaxon(order_name)
        if order != None:
            for family in family_names:
                order.take(tax.taxon(family))
        else:
            print '*** Missing fungal order', foo[0]

    # 2015-07-13 Romina
    h2007_fam = 'http://figshare.com/articles/Fungal_Classification_2015/1465038'
    some_claims = []
    for (order, families) in \
        [('Talbotiomycetales',['Talbotiomyces calosporus']),
         ('Moniliellales',['Moniliellaceae']),
         ('Malasseziales',['Malasseziaceae', 'Malassezia']),
         ('Trichotheliales',['Trichotheliaceae', 'Myeloconidiaceae']),
         ('Trichosporonales',['Sporobolomyces ruberrimus']),
         ('Holtermanniales',['Holtermanniella']),
         ('Lepidostromatales',['Lepidostromataceae']),
         ('Atheliales',['Atheliaceae']),
         ('Stereopsidales',['Stereopsidaceae']),
         ('Septobasidiales',['Septobasidiaceae']),
         ('Symbiotaphrinales',['Symbiotaphrina']),
         ('Caliciales',['Sphaerophoraceae']),
         ('Sarrameanales',['Sarrameanaceae']),
         ('Trapeliales',['Trapeliaceae']),
         ('Halosphaeriales',['Halosphaeriaceae']),
         ('Abrothallales',['Abrothallus']),
         ('Arctomiales',['Arctomiaceae']),
         ('Hymeneliales',['Hymeneliaceae']),
         ('Leprocaulales',['Leprocaulaceae']),
     ]:
        for family in families:
            some_claims.append(Has_child(order, family, h2007_fam))
        # Loxosporales,synonym of Sarrameanales
        some_claims.append(
            Whether_same('Sarrameanales', 'Loxosporales', True, h2007_fam))
    make_claims(tax, some_claims)
Пример #3
0
def patch_gbif(gbif):
    # - Touch-up -

    # Rod Page blogged about this one
    # http://iphylo.blogspot.com/2014/03/gbif-liverwort-taxonomy-broken.html
    gbif.taxon('Jungermanniales','Marchantiophyta').absorb(gbif.taxon('Jungermanniales','Bryophyta'))

    # Joseph 2013-07-23 https://github.com/OpenTreeOfLife/opentree/issues/62
    # GBIF has two copies of Myospalax
    gbif.taxon('6006429').absorb(gbif.taxon('2439119'))

    # RR 2014-04-12 #47
    gbif.taxon('Drake-brockmania').absorb(gbif.taxon('Drake-Brockmania'))
    # RR #50 - this one is in NCBI, see above
    gbif.taxon('Saxofridericia').absorb(gbif.taxon('4930834')) #Saxo-Fridericia
    # RR #57 - the genus is in NCBI, see above
    gbif.taxon('Solms-laubachia').absorb(gbif.taxon('4908941')) #Solms-Laubachia
    gbif.taxon('Solms-laubachia pulcherrima').absorb(gbif.taxon('Solms-Laubachia pulcherrima'))

    # RR #45
    gbif.taxon('Cyrto-hypnum').absorb(gbif.taxon('4907605'))

    # 2014-04-13 JAR noticed while grepping
    claims = [
        Whether_same('Chryso-Hypnum', 'Chryso-hypnum', True),
        Whether_same('Drepano-Hypnum', 'Drepano-hypnum', True),
        Whether_same('Complanato-Hypnum', 'Complanato-hypnum', True),
        Whether_same('Leptorrhyncho-Hypnum', 'Leptorrhyncho-hypnum', True),
        Whether_same('Trichoderma viride', 'Hypocrea rufa', True,
                     'https://github.com/OpenTreeOfLife/reference-taxonomy/issues/86'),  # Type
        Whether_same('Hypocrea', With_ancestor('Trichoderma', 'Hypocrea rufa'), True,
                     'https://github.com/OpenTreeOfLife/reference-taxonomy/issues/86'),  # Type
        
        # Doug Soltis 2015-02-17 https://github.com/OpenTreeOfLife/feedback/issues/59 
        # http://dx.doi.org/10.1016/0034-6667(95)00105-0
        Whether_extant('Timothyia', False, 'https://github.com/OpenTreeOfLife/feedback/issues/59'),

    ]
    make_claims(gbif, claims)
    # See new versions above
    # gbif.taxon('Chryso-hypnum').absorb(gbif.taxon('Chryso-Hypnum'))
    # gbif.taxon('Complanato-Hypnum').rename('Complanato-hypnum')
    # gbif.taxon('Leptorrhyncho-Hypnum').rename('Leptorrhyncho-hypnum')

    # https://github.com/OpenTreeOfLife/reference-taxonomy/issues/86
    # Romina 2014-04-09
    # GBIF has both Hypocrea and Trichoderma.  And it has four Trichoderma synonyms...
    # pick the one that contains bogo-type Hypocrea rufa
    # See new versions above
    # gbif.taxon('Trichoderma viride').rename('Hypocrea rufa')  # Type
    # gbif.taxon('Hypocrea').absorb(gbif.taxonThatContains('Trichoderma', 'Hypocrea rufa'))

    # 2014-04-21 RR
    # https://github.com/OpenTreeOfLife/reference-taxonomy/issues/45
    for epithet in ['cylindraceum',
                    'lepidoziaceum',
                    'intermedium',
                    'espinosae',
                    'pseudoinvolvens',
                    'arzobispoae',
                    'sharpii',
                    'frontinoae',
                    'atlanticum',
                    'stevensii',
                    'brachythecium']:
        claim = Whether_same('Cyrto-Hypnum ' + epithet, 'Cyrto-hypnum ' + epithet, True,
                             'https://github.com/OpenTreeOfLife/reference-taxonomy/issues/45')
        claim.make_true(gbif)
        # was gbif.taxon('Cyrto-hypnum ' + epithet).absorb(gbif.taxon('Cyrto-Hypnum ' + epithet))

    # JAR 2014-04-23 Noticed while perusing silva/gbif conflicts
    gbif.taxon('Ebriaceae').synonym('Ebriacea')
    gbif.taxon('Acanthocystidae').absorb(gbif.taxon('Acanthocistidae'))
    gbif.taxon('Dinophyta').synonym('Dinoflagellata')

    # JAR 2014-06-29 stumbled on this while trying out new alignment
    # methods and examining troublesome homonym Bullacta exarata.
    # GBIF obviously puts it in the wrong place, see description at
    # http://www.gbif.org/species/4599744 (it's a snail, not a shrimp).
    bex = gbif.taxon('Bullacta exarata', 'Atyidae')
    bec = gbif.taxon('Bullacta ecarata', 'Atyidae')
    if bex != None and bec != None:
        bex.absorb(bec)
        bex.detach()

    # Yan Wong 2014-12-16 https://github.com/OpenTreeOfLife/reference-taxonomy/issues/116
    for name in ['Griphopithecus', 'Asiadapis',
                 'Lomorupithecus', 'Marcgodinotius', 'Muangthanhinius',
                 'Plesiopithecus', 'Suratius', 'Killikaike blakei', 'Rissoina bonneti',
                 # 'Mycosphaeroides'  - gone
             ]:
        claim = Whether_extant(name, False, 'https://github.com/OpenTreeOfLife/reference-taxonomy/issues/116')
        claim.make_true(gbif)

    # JAR 2014-07-18  - get rid of Helophorus duplication
    # GBIF 3263442 = Helophorus Fabricius, 1775, from CoL
    #    in 6985 = Helophoridae Leach, 1815
    # GBIF 6757656 = Helophorus Leach, from IRMNG homonym list
    #    in 7829 = Hydraenidae Mulsant, 1844
    #  ('Helophorus', 'Helophoridae') ('Helophorus', 'Hydraenidae')
    gbif.taxon('3263442').absorb(gbif.taxon('6757656'))

    # JAR 2015-06-27  there are two Myospalax myospalax
    # The one in Spalacidae is the right one, Myospalacinae is the wrong one
    # (according to NCBI)
    # Probably should clean up the whole genus
    # 2439121 = Myospalax myospalax (Laxmann, 1773) from CoL
    gbif.taxon('2439121').absorb(gbif.taxon('6075534'))

    # 4010070	pg_1378	Gelidiellaceae	gbif:8998  -- ok, paraphyletic

    # https://github.com/OpenTreeOfLife/feedback/issues/64
    gbif.taxon('Plagiomene').extinct()

    # https://github.com/OpenTreeOfLife/feedback/issues/65
    gbif.taxon('Worlandia').extinct()

    tip = gbif.taxon('6101461') # ('Tipuloidea', 'Hemiptera') gbif:6101461 - extinct
    if tip != None:
        tip.prune("about:blank#this-homonym-is-causing-too-much-trouble")

    oph = gbif.taxon('4872240')  # ('Ophiurina', 'Ophiurinidae') gbif:4872240 - extinct
    if oph != None:
        oph.prune("about:blank#this-homonym-is-causing-too-much-trouble")

    # 2015-07-25 Extra Dipteras are confusing new division logic.  Barren genus
    gbif.taxon('3230674').prune(this_source)

    # 2015-09-11 https://github.com/OpenTreeOfLife/feedback/issues/72
    gbif.taxon('Myeladaphus').extinct()

    # 2015-09-11 https://github.com/OpenTreeOfLife/feedback/issues/78
    gbif.taxon('Oxyprinichthys').extinct()

    # 2015-09-11 https://github.com/OpenTreeOfLife/feedback/issues/82
    gbif.taxon('Tarsius thailandica').extinct()

    return gbif
Пример #4
0
def patch_gbif(gbif):
    # - Touch-up -

    # Rod Page blogged about this one
    # http://iphylo.blogspot.com/2014/03/gbif-liverwort-taxonomy-broken.html
    gbif.taxon('Jungermanniales', 'Marchantiophyta').absorb(
        gbif.taxon('Jungermanniales', 'Bryophyta'))

    # Joseph 2013-07-23 https://github.com/OpenTreeOfLife/opentree/issues/62
    # GBIF has two copies of Myospalax
    gbif.taxon('6006429').absorb(gbif.taxon('2439119'))

    # RR 2014-04-12 #47
    gbif.taxon('Drake-brockmania').absorb(gbif.taxon('Drake-Brockmania'))
    # RR #50 - this one is in NCBI, see above
    gbif.taxon('Saxofridericia').absorb(
        gbif.taxon('4930834'))  #Saxo-Fridericia
    # RR #57 - the genus is in NCBI, see above
    gbif.taxon('Solms-laubachia').absorb(
        gbif.taxon('4908941'))  #Solms-Laubachia
    gbif.taxon('Solms-laubachia pulcherrima').absorb(
        gbif.taxon('Solms-Laubachia pulcherrima'))

    # RR #45
    gbif.taxon('Cyrto-hypnum').absorb(gbif.taxon('4907605'))

    # 2014-04-13 JAR noticed while grepping
    claims = [
        Whether_same('Chryso-Hypnum', 'Chryso-hypnum', True),
        Whether_same('Drepano-Hypnum', 'Drepano-hypnum', True),
        Whether_same('Complanato-Hypnum', 'Complanato-hypnum', True),
        Whether_same('Leptorrhyncho-Hypnum', 'Leptorrhyncho-hypnum', True),
        Whether_same(
            'Trichoderma viride', 'Hypocrea rufa', True,
            'https://github.com/OpenTreeOfLife/reference-taxonomy/issues/86'
        ),  # Type
        Whether_same(
            'Hypocrea', With_ancestor('Trichoderma', 'Hypocrea rufa'), True,
            'https://github.com/OpenTreeOfLife/reference-taxonomy/issues/86'
        ),  # Type

        # Doug Soltis 2015-02-17 https://github.com/OpenTreeOfLife/feedback/issues/59
        # http://dx.doi.org/10.1016/0034-6667(95)00105-0
        Whether_extant('Timothyia', False,
                       'https://github.com/OpenTreeOfLife/feedback/issues/59'),
    ]
    make_claims(gbif, claims)
    # See new versions above
    # gbif.taxon('Chryso-hypnum').absorb(gbif.taxon('Chryso-Hypnum'))
    # gbif.taxon('Complanato-Hypnum').rename('Complanato-hypnum')
    # gbif.taxon('Leptorrhyncho-Hypnum').rename('Leptorrhyncho-hypnum')

    # https://github.com/OpenTreeOfLife/reference-taxonomy/issues/86
    # Romina 2014-04-09
    # GBIF has both Hypocrea and Trichoderma.  And it has four Trichoderma synonyms...
    # pick the one that contains bogo-type Hypocrea rufa
    # See new versions above
    # gbif.taxon('Trichoderma viride').rename('Hypocrea rufa')  # Type
    # gbif.taxon('Hypocrea').absorb(gbif.taxonThatContains('Trichoderma', 'Hypocrea rufa'))

    # 2014-04-21 RR
    # https://github.com/OpenTreeOfLife/reference-taxonomy/issues/45
    for epithet in [
            'cylindraceum', 'lepidoziaceum', 'intermedium', 'espinosae',
            'pseudoinvolvens', 'arzobispoae', 'sharpii', 'frontinoae',
            'atlanticum', 'stevensii', 'brachythecium'
    ]:
        claim = Whether_same(
            'Cyrto-Hypnum ' + epithet, 'Cyrto-hypnum ' + epithet, True,
            'https://github.com/OpenTreeOfLife/reference-taxonomy/issues/45')
        claim.make_true(gbif)
        # was gbif.taxon('Cyrto-hypnum ' + epithet).absorb(gbif.taxon('Cyrto-Hypnum ' + epithet))

    # JAR 2014-04-23 Noticed while perusing silva/gbif conflicts
    gbif.taxon('Ebriaceae').synonym('Ebriacea')
    gbif.taxon('Acanthocystidae').absorb(gbif.taxon('Acanthocistidae'))
    gbif.taxon('Dinophyta').synonym('Dinoflagellata')

    # JAR 2014-06-29 stumbled on this while trying out new alignment
    # methods and examining troublesome homonym Bullacta exarata.
    # GBIF obviously puts it in the wrong place, see description at
    # http://www.gbif.org/species/4599744 (it's a snail, not a shrimp).
    bex = gbif.taxon('Bullacta exarata', 'Atyidae')
    bec = gbif.taxon('Bullacta ecarata', 'Atyidae')
    if bex != None and bec != None:
        bex.absorb(bec)
        bex.detach()

    # Yan Wong 2014-12-16 https://github.com/OpenTreeOfLife/reference-taxonomy/issues/116
    for name in [
            'Griphopithecus',
            'Asiadapis',
            'Lomorupithecus',
            'Marcgodinotius',
            'Muangthanhinius',
            'Plesiopithecus',
            'Suratius',
            'Killikaike blakei',
            'Rissoina bonneti',
            # 'Mycosphaeroides'  - gone
    ]:
        claim = Whether_extant(
            name, False,
            'https://github.com/OpenTreeOfLife/reference-taxonomy/issues/116')
        claim.make_true(gbif)

    # JAR 2014-07-18  - get rid of Helophorus duplication
    # GBIF 3263442 = Helophorus Fabricius, 1775, from CoL
    #    in 6985 = Helophoridae Leach, 1815
    # GBIF 6757656 = Helophorus Leach, from IRMNG homonym list
    #    in 7829 = Hydraenidae Mulsant, 1844
    #  ('Helophorus', 'Helophoridae') ('Helophorus', 'Hydraenidae')
    gbif.taxon('3263442').absorb(gbif.taxon('6757656'))

    # JAR 2015-06-27  there are two Myospalax myospalax
    # The one in Spalacidae is the right one, Myospalacinae is the wrong one
    # (according to NCBI)
    # Probably should clean up the whole genus
    # 2439121 = Myospalax myospalax (Laxmann, 1773) from CoL
    gbif.taxon('2439121').absorb(gbif.taxon('6075534'))

    # 4010070	pg_1378	Gelidiellaceae	gbif:8998  -- ok, paraphyletic

    # https://github.com/OpenTreeOfLife/feedback/issues/64
    gbif.taxon('Plagiomene').extinct()

    # https://github.com/OpenTreeOfLife/feedback/issues/65
    gbif.taxon('Worlandia').extinct()

    tip = gbif.taxon(
        '6101461')  # ('Tipuloidea', 'Hemiptera') gbif:6101461 - extinct
    if tip != None:
        tip.prune("about:blank#this-homonym-is-causing-too-much-trouble")

    oph = gbif.taxon(
        '4872240')  # ('Ophiurina', 'Ophiurinidae') gbif:4872240 - extinct
    if oph != None:
        oph.prune("about:blank#this-homonym-is-causing-too-much-trouble")

    # 2015-07-25 Extra Dipteras are confusing new division logic.  Barren genus
    gbif.taxon('3230674').prune(this_source)

    # 2015-09-11 https://github.com/OpenTreeOfLife/feedback/issues/72
    gbif.taxon('Myeladaphus').extinct()

    # 2015-09-11 https://github.com/OpenTreeOfLife/feedback/issues/78
    gbif.taxon('Oxyprinichthys').extinct()

    # 2015-09-11 https://github.com/OpenTreeOfLife/feedback/issues/82
    gbif.taxon('Tarsius thailandica').extinct()

    return gbif