aboutsummaryrefslogtreecommitdiff
path: root/data_tol_old
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-04-26 13:53:46 +1000
committerTerry Truong <terry06890@gmail.com>2022-04-26 13:53:46 +1000
commit04e9444746d3ba8ddcc96d0fd16f1c02adce1389 (patch)
tree0f48275709dc676bf8b9ba3c2dbc9f1beeff7b75 /data_tol_old
parente8fab23fe92230c2cb42412bb9ea6040ff14f072 (diff)
Have tol data in sqlite db, and add server script that accesses it
Adapt otol-data-converting script to generate otol.db, add server.py script that provides access to that db, and adapt the app to query the server for tol data when needed.
Diffstat (limited to 'data_tol_old')
-rwxr-xr-xdata_tol_old/genTestImgs.sh16
-rw-r--r--data_tol_old/tolData.txt388
-rwxr-xr-xdata_tol_old/txtTreeToJSON.py76
3 files changed, 0 insertions, 480 deletions
diff --git a/data_tol_old/genTestImgs.sh b/data_tol_old/genTestImgs.sh
deleted file mode 100755
index 21b001b..0000000
--- a/data_tol_old/genTestImgs.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-set -e
-
-#generate tol.json from tol.txt
-cat tolData.txt | ./txtTreeToJSON.py > tolData.json
-
-#reads through tolData.json, gets names, and generates image for each name
-cat tolData.json | \
- gawk 'match ($0, /"name"\s*:\s*"([^"]*)"/, arr) {print arr[1]}' | \
- while read; do
- convert -size 200x200 xc:khaki +repage \
- -size 150x150 -fill black -background None \
- -font Ubuntu-Mono -gravity center caption:"$REPLY" +repage \
- -gravity Center -composite -strip ../public/img/"$REPLY".png
- done
-
diff --git a/data_tol_old/tolData.txt b/data_tol_old/tolData.txt
deleted file mode 100644
index f73a064..0000000
--- a/data_tol_old/tolData.txt
+++ /dev/null
@@ -1,388 +0,0 @@
-Tree of Life
- Viruses
- Caudovirales
- Herpesvirales
- Ligamenvirales
- Mononegavirales
- Nidovirales
- Picornavirales
- Tymovirales
- Archaea
- Crenarchaeota
- Euryarchaeota
- Bacteria
- Acidobacteria
- Actinobacteria
- Aquificae
- Armatimonadetes
- Bacteroidetes
- Caldiserica
- Chlamydiae
- Chlorobi
- Chloroflexi
- Chrysiogenetes
- Cyanobacteria
- Deferribacteres
- Deinococcus-thermus
- Dictyoglomi
- Elusimicrobia
- Fibrobacteres
- Firmicutes
- Fusobacteria
- Gemmatimonadetes
- Lentisphaerae
- Nitrospira
- Planctomycetes
- Proteobacteria
- Spirochaetae
- Synergistetes
- Tenericutes
- Thermodesulfobacteria
- Thermotogae
- Verrucomicrobia
- Eukaryota
- Diatoms
- Amoebozoa
- Plantae
- Rhodopyhta
- Viridiplantae
- Prasinophytes
- Ulvophyceae
- Streptophyta
- Charales
- Embryophytes
- Marchantiomorpha
- Anthocerotophyta
- Bryophyta
- Lycopodiopsida
- Lycopodiidae
- Selaginellales
- Polypodiopsida
- Polypodiidae
- Polypodiales
- Equisetidae
- Spermatopsida
- Cycads
- Conifers
- Taxaceae
- Cupressaceae
- Pinaceae
- Pinus
- Picea
- Larix
- Cedrus
- Abies
- Ginkgos
- Angiosperms
- Illicium
- magnoliids
- Piperales
- Piperaceae
- Magnoliales
- Annonaceae
- Myristicaceae
- Laurales
- Lauraceae
- Monocotyledons
- Alismatanae
- Aranae
- Liliaceae
- Asparagales
- Amaryllidaceae
- Asparagaceae
- Asphodelaceae
- Iridaceae
- Orchidaceae
- Dioscoreaceae
- Arecanae
- Cocoeae
- Phoeniceae
- Zingiberanae
- Musaceae
- Strelitziaceae
- Zingiberaceae
- Commelinanae
- Bromeliaceae
- Cyperaceae
- Typhaceae
- Poaceae
- Zea mays
- Triticum
- Bambusoideae
- eudicots
- Ranunculales
- Papaveraceae
- Ranunculaceae
- Proteales
- Proteaceae
- Nelumbo
- Core Eudicots
- Saxifragales
- Rosids
- Fabaceae
- Mimosoideae
- IRLC (Inverted Repat-lacking clade)
- Trifolieae
- Fabeae
- Rosales
- Rosaceae
- Rosa
- Malus pumila
- Ulmaceae
- Urticaceae
- Moraceae
- Cannabaceae
- Fagales
- Fagaceae
- Betulaceae
- Juglandaceae
- Cucurbitales
- Cucurbitaceae
- Malpighiales
- Salicaceae
- Violaceae
- Passifloraceae
- Erythroxylaceae
- Rhizophoraceae
- Euphorbiaceae
- Linaceae
- Rafflesiaceae
- Myrtales
- Myrtaceae
- Onagraceae
- Lythraceae
- Brassicales
- Caricaceae
- Brassicaceae
- Malvales
- Core Malvales
- Malvoideae
- Bombacoideae
- Sterculioideae
- Helicteroideae
- Byttnerioideae
- Sapindales
- Anacardiaceae
- Burseraceae
- Meliaceae
- Rutaceae
- Sapindaceae
- Vitaceae
- Caryophyllales
- Polygonaceae
- Droseraceae
- Nepenthaceae
- core Caryophyllales
- Cactaceae
- Amaranthaceae
- Asterids
- Ericales
- Actinidiaceae
- Ericaceae
- Lecythidaceae
- Sapotaceae
- Ebenaceae
- Theaceae
- Solanales
- Solanaceae
- Convolvulaceae
- Lamiales
- Oleaceae
- Fraxinus
- Bignoniaceae
- Pedaliaceae
- Lentibulariaceae
- Lamiaceae
- Gentianales
- Rubiaceae
- Asterales
- Campanulaceae
- Asteraceae
- Carduoideae
- Cardueae
- Cichorioideae
- Cichorieae
- Asteroideae
- Asterodae
- Helianthodae
- Apiales
- Apiaceae
- Araliaceae
- Aquifoliaceae
- Fungi
- Fungi 1
- Dikarya
- Basidiomycota
- Agaricomycotina
- Agaricomycetes
- Agaricomycetes 1
- Agaricomycetidae
- Agaricales
- Strophariaceae strict-sense
- Psathyrellaceae
- Agaricaceae
- Nidulariaceae
- Marasmiaceae
- Physalacriaceae
- Pleurotaceae
- Amanitaceae
- Podoserpula
- Boletales
- Serpulaceae
- Sclerodermataceae
- Boletaceae
- Russulales
- Hymenochaetales
- Phallomycetidae
- Geastrales
- Gomphales
- Phallales
- Cantharellales
- Auriculariales
- Tremellomycetes
- Ustilaginomycotina
- Pucciniomycotina
- Pucciniomycetes
- Septobasidiales
- Pucciniales
- Mixiomycetes
- Tritirachiomycetes
- Entorrhizomycetes
- Wallemiomycetes
- Ascomycota
- Pezizomycotina
- Pezizomycetes
- 'Leotiomyceta'
- Eurotiomycetes
- Geoglossaceae
- Sordariomycetes
- Hypocreomycetidae
- Sordariomycetidae
- Laboulbeniomycetes
- Pleosporomycetidae
- Saccharomycotina
- Taphrinomycotina
- Schizosaccharomycetes
- Pneumocystidiomycetes
- Taphrinomycetes
- Glomeromycota
- Zygomycota
- Endogonales
- Mucorales
- Blastocladiomycota
- Chytridiomycota
- Neocallimastigomycota
- Microsporidia
- Animalia
- Porifera
- Cnidaria
- Tardigrada
- Annelida
- Mollusca
- Bivalvia
- Gastropoda
- Cephalopoda
- Arthropoda
- Arachnida
- Araneae
- Opiliones
- Scorpiones
- Heterostigmata
- Crustacea
- Euphausiacea
- Brachyura
- Isopoda
- Cirripedia
- Insecta
- Anisoptera
- Mantodea
- Cicadoidea
- Siphonaptera
- Cucujoidea
- Phengodidae
- Drosophilidae
- Culicidae
- Lepidoptera
- Apini
- Formicidae
- Deuterostomia
- Echinodermata
- Crinoidea
- Asteroidea
- Echinoidea
- Holothuroidea
- Vertebrata
- Chondrichthyes
- Carcharodon carcharias
- Rhinocodon typus
- Batoidea
- Pristidae
- Actinopterygii
- Clupeomorpha
- Xiphias gladius
- Siluriformes
- Carassius auratus
- Tetraodontidae
- Molidae
- Gymnotiformes
- Lophiiformes
- Exocoetidae
- 'mudskipper'
- Hippocampus
- Psudoliparis swirei
- Sarcopterygii
- Tetrapoda
- Amphibia
- Gymnophiona
- Caudata
- Salamandra
- Cryptobranchidae
- Ambystomatidae
- Anura
- Reptilia
- Testudines
- Plesiosauria
- Chamaeleonidae
- Serpentes
- Crocodilia
- Dinosauria
- Triceratops
- Sauropoda
- Tyrannosauroidea
- Aves
- magpie
- parrot
- eagle
- owl
- swan
- chicken
- penguin
- hummingbird
- Synapsida
- monotreme
- marsupial
- kangaroo
- possum
- wombat
- rodent
- mouse
- beaver
- rabbit
- feline
- canine
- bear
- walrus
- Artiodactyla
- pig
- camel
- deer
- giraffe
- horse
- elephant
- cetacean
- armadillo
- bat
- monkey
- gorilla
- chimpanzee
- homo sapien
diff --git a/data_tol_old/txtTreeToJSON.py b/data_tol_old/txtTreeToJSON.py
deleted file mode 100755
index 3b77622..0000000
--- a/data_tol_old/txtTreeToJSON.py
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/usr/bin/python3
-
-import sys, re
-
-usageInfo = f"usage: {sys.argv[0]}\n"
-usageInfo += "Reads, from stdin, tab-indented lines representing trees, and outputs corresponding JSON.\n"
-
-if len(sys.argv) > 1:
- print(usageInfo, file=sys.stderr)
- sys.exit(1)
-
-lineNum = 0
-trees = [] #each node is a pair holding a name and an array of child nodes
-nodeList = []
-while True:
- #read line
- line = sys.stdin.readline()
- if line == "": break
- line = line.rstrip()
- lineNum += 1
- #create node
- match = re.match(r"^\t*", line)
- indent = len(match.group())
- newNode = [line[indent:], []]
- #add node
- if indent == len(nodeList): #sibling or new tree
- if len(nodeList) == 0:
- nodeList.append(newNode)
- trees.append(newNode)
- else:
- nodeList[-1] = newNode
- if len(nodeList) == 1:
- trees[-1][1].append(newNode)
- else:
- nodeList[-2][1].append(newNode)
- elif indent == len(nodeList) + 1: #direct child
- if len(nodeList) == 0:
- print(f"ERROR: Child without preceding root (line {lineNum})")
- sys.exit(1)
- nodeList.append(newNode)
- nodeList[-2][1].append(newNode)
- elif indent < len(nodeList): #ancestor sibling or new tree
- nodeList = nodeList[:indent]
- if len(nodeList) == 0:
- nodeList.append(newNode)
- trees.append(newNode)
- else:
- nodeList[-1] = newNode
- if len(nodeList) == 1:
- trees[-1][1].append(newNode)
- else:
- nodeList[-2][1].append(newNode)
- else:
- print(f"ERROR: Child with invalid relative indent (line {lineNum})")
- sys.exit(1)
-#print as JSON
-if len(trees) > 1:
- print("[")
-def printNode(node, indent):
- if len(node[1]) == 0:
- print(indent + "{\"name\": \"" + node[0] + "\"}", end="")
- else:
- print(indent + "{\"name\": \"" + node[0] + "\", \"children\": [")
- for i in range(len(node[1])):
- printNode(node[1][i], indent + "\t")
- if i < len(node[1])-1:
- print(",", end="")
- print()
- print(indent + "]}", end="")
-for i in range(len(trees)):
- printNode(trees[i], "")
- if i < len(trees)-1:
- print(",", end="")
- print()
-if len(trees) > 1:
- print("]")