-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
passing too long a string to taxa_get_otol_tree produces an error #20
Comments
@abusalehmdtayeen tol calls post but we call get. Can we change our call to post or add a function that calls post? |
@jwiggi18 , we already have a POST API for getting tree from OToL. You can ask @LunaSare to check which API the rphylotastic is using. curl -X POST "http://phylo.cs.nmsu.edu:5004/phylotastic_ws/gt/ot/tree" -H "content-type:application/json" -d '{"taxa": ["Setophaga striata","Setophaga magnolia","Setophaga angelae","Setophaga plumbea","Setophaga virens"]}' |
Hi @jwiggi18, I see the error. It seems that one of your taxon names is not in the open tree taxonomy. I'm adding a cleaning step so it drops these names before attempting to recover the tree. |
Ok, so, there were two errors. One comes from using taxa that are not in opentree taxonomy and the other from searching a lot of names. I fixed the first problem, and now you can get an otol tree using datelife functions. The error from searching a long vector of names with First install datelife from github
Then, option 1, simply do:
Let me know if you would want to have a report on the names that were dropped and excluded from the final tree @jwiggi18 . An alternative option is the following (but still errors with your example):
trying other long list of names also errors:
Doing the search with all names using curl POST from terminal works (see next chunk). So there must be a bug in It works both running it with clean names (first chunk) or with raw names (second chunk) from gnr_vector
|
@LunaSare can a dropped names report be automatically generated for the user? |
gnr_vector <- c("Rhincodon typus", "Paedocypris progenetica", "Cricetomys gambianus",
"C.", "Cricetomys emini", "Spheniscus demersus", "Polihierax semitorquatus",
"Polihierax insignis", "Nettapus auritus", "Geochelone", "Eunectes murinus",
"Tremarctos ornatus", "Vultur gryphus", "Xenarthra", "Alectura lathami",
"Babyrousa celebensis", "Haliaeetus leucocephalus", "Leucopsar rothschildi",
"Toxotes jaculatrix", "Myotis myotis", "Otocyon megalotis", "Cinnyris pulchellus",
"Merops bullockoides", "Phosphuga atrata", "Arctictis binturong",
"Titanoboa cerrejonensis", "Pan paniscus", "Damaliscus pygargus",
"Ursus arctos", "Gymnogyps californianus", "Camelus bactrianus",
"C.", "Hydrochoerus hydrochaeris", "Caracal caracal", "Casuarius casuarius",
"C.", "C.", "Furcifer belalandaensis", "Calumma hafahafa", "Acinonyx jubatus",
"Pan troglodytes", "Tilapia", "Boulengerochromis microlepis",
"Neofelis nebulosa", "Neofelis diardi", "Propithecus coquereli",
"Crocodylus palustris", "Stephanoaetus coronatus", "Gopherus agassizii",
"Cuon alpinus", "Cephalorhynchus heavisidii", "Helogale parvula",
"Tachyglossus aculeatus", "Zaglossus bruijni", "Zaglossus attenboroughi",
"Zaglossus bartoni", "Loxodonta africana", "Elephas maximus",
"Dromaius novaehollandiae", "Vulpes zerda", "Agapornis fischeri",
"Falco biarmicus", "Agapornis personatus", "Prionailurus viverrinus",
"Phoenicopterus chilensis", "Phoenicoparrus andinus", "Phoenicoparrus jamesi",
"Phoenicopterus ruber", "Phoenicopterus roseus", "Cryptoprocta ferox",
"Conraua goliath", "Chelonoidis nigra", "Theropithecus gelada",
"Archispirostreptus gigas", "Myrmecophaga tridactyla", "Ailuropoda melanoleuca",
"Heloderma suspectum", "Heloderma horridum", "Giraffa camelopardalis",
"Ovibos moschatus", "Arabitragus", "Aquila chrysaetos", "Gorilla gorilla",
"Gorilla beringei", "Gorilla gorilla gorilla", "Gorilla beringei beringei",
"Gorilla beringei graueri", "Erythrura gouldiae", "Gallirallus owstoni",
"Lama guanicoe", "Erythrocebus patas", "Miopithecus talapoin",
"Papio hamadryas", "Harpia harpyja", "Mellivora capensis", "Bucorvus leadbeateri",
"Tockus camurus", "Patagona gigas", "Mellisuga helenae", "Pseudibis gigantea",
"Bostrychia rara", "Iguana iguana", "Cyclura lewisi", "Panthera onca",
"Rhynochetos jubatus", "Parma", "Macropus giganteus", "Todiramphus cinnamominus",
"Dacelo novaeguineae", "Ceyx lecontei", "Potos flavus", "Apteryx haastii",
"Apteryx australis mantelli", "Oreotragus oreotragus", "Phascolarctos cinereus",
"Cyprinus carpio", "Varanus komodoensis", "Indri indri", "Microcebus berthae",
"Panthera pardus", "Triakis semifasciata", "Panthera leo", "Dryococelus australis",
"Lynx lynx", "Lynx lynx", "Anodorhynchus hyacinthinus", "Diopsittaca nobilis",
"Anseranas semipalmata", "Mandrillus sphinx", "Macrotis lagotis",
"Macropus rufus", "Pilbara", "Ningaui timealeyi", "Dendrolagus matschiei",
"Suricata suricatta", "Aplonis metallica", "Heterocephalus glaber",
"Kobus megaceros", "Capra nubiana", "Leopardus pardalis", "Okapia johnstoni",
"Didelphis virginiana", "Pongo abelii", "Struthio camelus", "Pteronura brasiliensis",
"Enhydra lutris", "Lycaon pictus", "Atelopus zeteki", "Malacochersus tornieri",
"Anodorhynchus hyacinthinus", "Micropsitta pusio", "Strigops habroptilus",
"Pavo cristatus", "Pelecanus crispus", "Pelecanus occidentalis",
"Pelecanus onocrotalus", "Ursus maritimus", "Hystrix cristata",
"Cynomys leucurus", "C.", "C.", "C.", "Antilocapra americana",
"Equus caballus", "Callithrix pygmaea", "Antaresia perthensis",
"Procyon lotor", "Radjah", "Crotalus adamanteus", "Crotalus pricei",
"Crotalus willardi", "Ailurus fulgens", "Buteo jamaicensis",
"Rangifer tarandus", "Diceros bicornis", "Ceratotherium simum",
"Dicerorhinus sumatrensis", "Pseudocheirus peregrinus", "Procavia capensis",
"Saiga tatarica", "Thorius arboreus", "Microbuthus pusillus",
"Eumetopias jubatus", "Zalophus californianus", "Zalophus wollebaeki",
"Otaria byronia", "Neophoca cinerea", "Phocarctos hookeri", "Sagittarius serpentarius",
"Leptailurus serval", "Symphalan
syndactylus", "Canis", "Canis lupus",
"Mecistops cataphractus", "Ursus", "Ursus", "Felis nigripes",
"Prionailurus rubiginosus", "Leptotyphlops bilineatus", "Panthera uncia",
"Philetairus socius", "Equus asinus somalicus", "Mombasa", "Theraphosa blondi",
"Patu marplesi", "Tragelaphus imberbis", "Taurotragus derbianus",
"Tragelaphus scriptus", "Crocuta crocuta", "Haliaeetus pelagicus",
"Eurycantha calcarata", "Scopus umbretta", "Hyaena hyaena", "Helarctos malayanus",
"Pipa pipa", "Budorcas taxicolor", "Tamandua tetradactyla", "Tapirus bairdii",
"Sarcophilus harrisii", "Podargus strigoides", "Echinops telfairi",
"Setifer setosus", "Tenrec ecaudatus", "Hemicentetes semispinosus",
"Rhynchopsitta pachyrhyncha", "Panthera tigris", "Selenidera nattereri",
"Pteroglossus inscriptus inscriptus", "Manis tricuspis", "Sphenodon punctatus",
"Sphenodon guntheri", "Dermochelys coriacea", "Homopus signatus",
"Choloepus hoffmanni", "C.", "Chlorocebus aethiops", "Gyps himalayensis",
"Gypohierax angolensis", "Phacochoerus africanus", "Estrilda melpoda",
"Granatina", "Balaenoptera musculus", "Mesoplodon hectori", "Bos",
"Bos mutus", "Bubalus depressicornis", "Bos gaurus", "Bubalus",
"Hylochoerus meinertzhageni", "Porcula", "C.", "C.", "Vombatus ursinus",
"Lasiorhinus krefftii", "Lasiorhinus latifrons", "Equus zebra"
)
sd_phy <- taxa_get_otol_tree(taxa = gnr_vector)
The text was updated successfully, but these errors were encountered: