def prepare_irmng(ott): irmng = taxonomies.load_irmng() ott.addSource(irmng) irmng.taxon('Viruses').hide() # Fungi suppressed at David Hibbett's request irmng.taxon('Fungi').hideDescendantsToRank('species') # Microbes suppressed at Laura Katz's request irmng.taxon('Bacteria','life').hideDescendants() irmng.taxon('Archaea','life').hideDescendants() ott.same(ott.taxon('Veronica', 'Plantaginaceae'), irmng.taxon('1381293')) # ott:648853 # genus Tipuloidea (not superfamily) ott:5708808 = gbif:6101461 # Taken care of in assemble_ott.py: # ott.same(ott.taxon('Tipuloidea', 'Dicondylia'), irmng.taxon('1170022')) # IRMNG has four Tetrasphaeras. ott.same(ott.taxon('Tetrasphaera','Intrasporangiaceae'), irmng.taxon('Tetrasphaera','Intrasporangiaceae')) ott.same(ott.taxon('Gorkadinium','Dinophyceae'), irmng.taxon('Gorkadinium','Dinophyceae')) # JAR 2014-04-18 attempt to resolve ambiguous alignment of # Trichosporon in IF and IRMNG based on common parent and member # Trichosporon in IF = if:10296 genus in Trichosporonaceae ott.same(irmng.taxon('Trichosporon'), ott.taxon('Trichosporon', 'Trichosporonaceae')) # JAR 2014-04-24 false match # tests pass ott.notSame(irmng.taxon('Protaspis', 'Chordata'), ott.taxon('Protaspis', 'Cercozoa')) # JAR 2014-04-18 while investigating hidden status of Coscinodiscus radiatus # tests ott.notSame(irmng.taxon('Coscinodiscus', 'Porifera'), ott.taxon('Coscinodiscus', 'Stramenopiles')) # https://github.com/OpenTreeOfLife/feedback/issues/45 # IRMNG has Choanoflagellida < Zoomastigophora < Sarcomastigophora < Protozoa # might be better to look for something it contains ott.same(irmng.taxon('Choanoflagellida', 'Zoomastigophora'), ott.taxon('Choanoflagellida', 'Eukaryota')) # probably not needed ott.same(ott.taxon('Ciliophora', 'Alveolata'), irmng.taxon('239')) # in Protista # Gone away... # ott.same(ott.taxon('Ciliophora', 'Ascomycota'), irmng.taxon('Ciliophora', 'Ascomycota')) # Could force this to not match the arthropod. But much easier just to delete it. irmng.taxon('Morganella', 'Brachiopoda').prune(this_source) # ... .notSame(ott.taxon('Morganella', 'Arthropoda')) # 2015-09-10 Inclusion test failing ott.notSame(irmng.taxon('Retaria', 'Brachiopoda'), # irmng:1340611 ott.taxon('Retaria', 'Rhizaria')) # 2015-09-10 Inclusion test failing ott.notSame(irmng.taxon('Campanella', 'Cnidaria'), # irmng:1289625 ott.taxon('Campanella', 'SAR')) return irmng
# One-off script prepared to provide data to David Hibbett and Romina Gazis. # Lists numbers of species in each fungal order. from org.opentreeoflife.taxa import Taxonomy import csv, sys from taxonomies import load_fung, load_ncbi, load_gbif, load_irmng taxonomies = [('fung', load_fung(), 'Index Fungorum'), ('ncbi', load_ncbi(), 'NCBI'), ('gbif', load_gbif(), 'GBIF'), ('irmng', load_irmng(), 'IRMNG'), ('ott', Taxonomy.getTaxonomy('tax/ott/'), 'OTT 2.9'), ] def main(): infile = open('order-counts-orders.csv', 'r') reader = csv.reader(infile) reader.next() #header row taxa = ['Fungi'] for tuple in reader: taxa.append(tuple[0]) infile.close() write_counts(taxa) def write_counts(taxa): outfile = open('order-counts.csv', 'w') writer = csv.writer(outfile) header = ['order'] for (name, taxonomy, label) in taxonomies: header += [label + ' bin', label + ' sp', label + ' tip']
# One-off script prepared to provide data to David Hibbett and Romina Gazis. # Lists numbers of species in each fungal order. from org.opentreeoflife.smasher import Taxonomy import csv, sys from taxonomies import load_fung, load_ncbi, load_gbif, load_irmng taxonomies = [ ("fung", load_fung(), "Index Fungorum"), ("ncbi", load_ncbi(), "NCBI"), ("gbif", load_gbif(), "GBIF"), ("irmng", load_irmng(), "IRMNG"), ("ott", Taxonomy.getTaxonomy("tax/ott/"), "OTT 2.9"), ] def main(): infile = open("order-counts-orders.csv", "r") reader = csv.reader(infile) reader.next() # header row taxa = ["Fungi"] for tuple in reader: taxa.append(tuple[0]) infile.close() write_counts(taxa) def write_counts(taxa): outfile = open("order-counts.csv", "w") writer = csv.writer(outfile)
def prepare_irmng(ott): irmng = taxonomies.load_irmng() irmng.taxon('Viruses').hide() # Fungi suppressed at David Hibbett's request irmng.taxon('Fungi').hideDescendantsToRank('species') # Microbes suppressed at Laura Katz's request irmng.taxon('Bacteria', 'life').hideDescendants() irmng.taxon('Archaea', 'life').hideDescendants() ott.same(ott.taxon('Veronica', 'Plantaginaceae'), irmng.taxon('1381293')) # ott:648853 # genus Tipuloidea (not superfamily) ott:5708808 = gbif:6101461 # Taken care of in assemble_ott.py: # ott.same(ott.taxon('Tipuloidea', 'Dicondylia'), irmng.taxon('1170022')) # IRMNG has four Tetrasphaeras. ott.same(ott.taxon('Tetrasphaera', 'Intrasporangiaceae'), irmng.taxon('Tetrasphaera', 'Intrasporangiaceae')) ott.same(ott.taxon('Gorkadinium', 'Dinophyceae'), irmng.taxon('Gorkadinium', 'Dinophyceae')) # JAR 2014-04-18 attempt to resolve ambiguous alignment of # Trichosporon in IF and IRMNG based on common parent and member # Trichosporon in IF = if:10296 genus in Trichosporonaceae ott.same(irmng.taxon('Trichosporon'), ott.taxon('Trichosporon', 'Trichosporonaceae')) # JAR 2014-04-24 false match # tests pass ott.notSame(irmng.taxon('Protaspis', 'Chordata'), ott.taxon('Protaspis', 'Cercozoa')) # JAR 2014-04-18 while investigating hidden status of Coscinodiscus radiatus # tests ott.notSame(irmng.taxon('Coscinodiscus', 'Porifera'), ott.taxon('Coscinodiscus', 'Stramenopiles')) # https://github.com/OpenTreeOfLife/feedback/issues/45 # IRMNG has Choanoflagellida < Zoomastigophora < Sarcomastigophora < Protozoa # might be better to look for something it contains ott.same(irmng.taxon('Choanoflagellida', 'Zoomastigophora'), ott.taxon('Choanoflagellida', 'Eukaryota')) # probably not needed ott.same(ott.taxon('Ciliophora', 'Alveolata'), irmng.taxon('239')) # in Protista # Gone away... # ott.same(ott.taxon('Ciliophora', 'Ascomycota'), irmng.taxon('Ciliophora', 'Ascomycota')) # Could force this to not match the arthropod. But much easier just to delete it. irmng.taxon('Morganella', 'Brachiopoda').prune(this_source) # ... .notSame(ott.taxon('Morganella', 'Arthropoda')) # 2015-09-10 Inclusion test failing ott.notSame( irmng.taxon('Retaria', 'Brachiopoda'), # irmng:1340611 ott.taxon('Retaria', 'Rhizaria')) # 2015-09-10 Inclusion test failing ott.notSame( irmng.taxon('Campanella', 'Cnidaria'), # irmng:1289625 ott.taxon('Campanella', 'SAR')) return irmng