def doSilva(): silva = taxonomies.loadSilva() # - Deal with parent/child homonyms in SILVA - # Arbitrary choices here to eliminate ambiguities down the road when NCBI gets merged. # (If the homonym is retained, then the merge algorithm will have no # way to choose between them, and refuse to match either. It will # then create a third homonym.) # Note order dependence between the following two silva.taxon('Intramacronucleata','Intramacronucleata').rename('Intramacronucleata inf.') silva.taxon('Spirotrichea','Intramacronucleata inf.').rename('Spirotrichea inf.') silva.taxon('Cyanobacteria','Bacteria').rename('Cyanobacteria sup.') silva.taxon('Actinobacteria','Bacteria').rename('Actinobacteria sup.') silva.taxon('Acidobacteria','Bacteria').rename('Acidobacteria sup.') silva.taxon('Ochromonas','Ochromonadales').rename('Ochromonas sup.') silva.taxon('Tetrasphaera','Tetrasphaera').rename('Tetrasphaera inf.') # SILVA's placement of Rozella as a sibling of Fungi is contradicted # by Hibbett 2007, which puts it under Fungi. Hibbett gets priority. # We make the change to SILVA to prevent Nucletmycea from being # labeled 'tattered'. silva.taxon('Fungi').take(silva.taxon('Rozella')) # 2014-04-12 Rick Ree #58 and #48 - make them match NCBI silva.taxon('Arthrobacter Sp. PF2M5').rename('Arthrobacter sp. PF2M5') silva.taxon('Halolamina sp. wsy15-h1').rename('Halolamina sp. WSY15-H1') # RR #55 - this is a silva/ncbi homonym silva.taxon('vesicomya').rename('Vesicomya') # From Laura and Dail on 5 Feb 2014 # https://groups.google.com/forum/#!topic/opentreeoflife/a69fdC-N6pY silva.taxon('Diatomea').rename('Bacillariophyta') # https://github.com/OpenTreeOfLife/reference-taxonomy/issues/30 # https://github.com/OpenTreeOfLife/feedback/issues/5 for name in ['GAL08', 'GOUTA4', 'JL-ETNP-Z39', 'Kazan-3B-28', 'LD1-PA38', 'MVP-21', 'NPL-UPA2', 'OC31', 'RsaHF231', 'S2R-29', 'SBYG-2791', 'SM2F11', 'WCHB1-60', 'T58', 'LKM74', 'LEMD255', 'CV1-B1-93', 'H1-10', 'H26-1', 'M1-18D08', 'D4P07G08', 'DH147-EKD10', 'LG25-05', 'NAMAKO-1', 'RT5iin25', 'SA1-3C06', 'DH147-EKD23']: silva.taxon(name).elide() #maybe just hide instead ? # - Deal with division alignment issues - ott.notSame(silva.taxon('Ctenophora', 'Coscinodiscophytina'), skel.taxon('Ctenophora')) ott.markDivisions(silva) taxonomies.checkDivisions(silva) ott.absorb(silva) return silva
# Requires python.security.respectJavaAccessibility = false # on java command line or in .jython from org.opentreeoflife.taxa import Taxonomy from org.opentreeoflife.smasher import UnionTaxonomy, HomonymReport union = UnionTaxonomy() skel = Taxonomy.getTaxonomy('tax/skel/', 'skel') union.setSkeleton(skel) def report(tax, tag): union.markDivisionsFromSkeleton(tax, skel) HomonymReport.homonymReport(tax, 'reports/' + tag + '-homonym-report.tsv') if True: ott = Taxonomy.getTaxonomy('tax/ott/', 'ott') report(ott, 'ott') else: import taxonomies report(taxonomies.loadSilva(), 'silva') report(taxonomies.loadH2007(), 'h2007') report(taxonomies.loadFung(), 'worms') report(taxonomies.loadFung(), 'if') report(taxonomies.loadNcbi(), 'ncbi') report(taxonomies.loadGbif(), 'gbif') report(taxonomies.loadIrmng(), 'irmng')
from org.opentreeoflife.smasher import Taxonomy from org.opentreeoflife.smasher import Reportx import taxonomies ott = Taxonomy.newTaxonomy() skel = Taxonomy.getTaxonomy('tax/skel/', 'skel') ott.setSkeleton(skel) def report(tax, tag): ott.markDivisions(tax) # Reportx.bogotypes(tax) taxonomies.checkDivisions(tax) Reportx.report(tax, tag + '-mrca-report.tsv') if True: report(taxonomies.loadIrmng(), 'irmng') else: silva = taxonomies.loadSilva() ott.notSame(silva.taxon('Ctenophora', 'Coscinodiscophytina'), skel.taxon('Ctenophora')) report(silva, 'silva') report(taxonomies.loadH2007(), 'h2007') report(taxonomies.loadFung(), 'if') report(taxonomies.loadNcbi(), 'ncbi') report(taxonomies.loadGbif(), 'gbif') report(taxonomies.loadIrmng(), 'irmng') report(taxonomies.loadOtt(), 'ott')