Package: parett
PAReTTPython Automated Retrieval of TimeTree dataversion 1.0.1, Windows OSIntroductionPAReTT is a menu-driven module used to interact with theTime Treeresource, specifically
designed to automate batch retrieval of data for a list of species. Three main types of data can be retrieved using PAReTT:
(1) Divergence times, between an individual pair or between all species in a list, (2) Evolutionary timelines, for indivuals
or a list species, and (3) Time trees of the divergence times, either for all available species within a specified taxon or
between individual species supplied as a list.
When working with a list of species, the best place to start is by using the first menu option to check the data availability
of species in the list and removing any species for which data is not available.Dependencies:Python >= 3.6Numpy >= 1.20.1Pandas >= 1.2.4Bio >= 1.3.9 (for handling newick trees)Splinter >= 0.17.0 (for interacting with the server)Selenium >= 4.1.5Geckodriver>= 0.31.0(Added to PATH)Firefox browserInstallation:After downloading and extracting the zip archive PAReTT can be implemented in by navigating to the directory and using one of two methods:python parett.pyorpython setup.py install
python -m parett-> This option will install the relevant dependencies automaticallyA pre-compiled stand-alone Windowsexecutableis also available.Main menuThe following options are available through the main menu:MAIN MENU:
----------------------------------------
Choose one of the following options?
   *) Check data availability
   a) Get Divergence Times (pair)
   b) Get Divergence Times (batch)
   c) Get Evolutionary Timeline
   d) Build a Time Tree
   e) Print citation
   f) Validate datafile
   q) Quit
----------------------------------------input is given as lower case '*','a','b','c','d','e','f', or 'q'
e.g.Choice: a*) Check data availabilityBrings up the menu to first check the TimeTree.org website for availability of divergence time data of your study species.AVAILABILITY MENU:
----------------------------------------
Choose one of the following options?
     i) Individual
     l) List
     m) Main menu
----------------------------------------input is given as lower case 'i', 'l', or 'm' (return to main menu)i) IndividualTakes an individual species as input to look up data availability e.g.Passer montanusPrints availability on screenl) ListTakes a list of species as input in from a.txtinput file e.g.Species.txtPrints availability on screenProvides option to save results to a file in.csvformat e.g.Availability.csve.g.SpeciesTimeTree.DataSetophaga ruticillaAvailableHirundo rusticaAvailableSetophaga striataAvailablea) Get Divergence Times (pair)Takes a pair of species as input to look up divergence times e.g. Taxon a:Passer montanus, Taxon b:Halcyon senegalensisPrints divergence time of pair on screenb) Get Divergence Times (batch)Takes a list of species as input to look up divergence times from a.txtinput file e.g.Species.txtPrints divergence time of pair on screenProvides option to save results to a file in.csvformat e.g.Output.csve.g.Taxa1Taxa2Div.TimeSetophaga ruticillaSetophaga ruticilla0Setophaga ruticillaHirundo rustica35Setophaga ruticillaSetophaga striata3.52Hirundo rusticaSetophaga ruticilla35Hirundo rusticaHirundo rustica0Hirundo rusticaSetophaga striata35Setophaga striataSetophaga ruticilla3.52Setophaga striataHirundo rustica35Setophaga striataSetophaga striata0When retrieving data for longer lists (>5-10) server issues may result in missing values (NA) which can be checked and replaced using the data validation menu option after the run.c) Get Evolutionary TimelineBrings up the menu options to retrieve the evolutionary timeline:TIMELINE MENU:
----------------------------------------
Choose one of the following options?
     i) Individual
     l) List
     m) Main menu
----------------------------------------input is given as lower case 'i', 'l', or 'm' (return to main menu)i) IndividualTakes an individual species as input to look up evolutionary timeline e.g.Passer montanusDownloads.jpgresultl) ListTakes a list of species as input in from a.txtinput file e.g.Species.txtDownloads.jpgresult for each specie in listd) Build a Time TreeBrings up the time tree menu optionsTIME TREE MENU:
----------------------------------------
Choose one of the following options?
     t) Taxon
     s) Species list
     m) Main menu
----------------------------------------input is given as lower case 't', 's', or 'm' (return to main menu)t) TaxonTakes the name for a taxon to get a time tree of all available species within the taxon e.g.Saxicolas) Species listTakes a list of species as input in from a.txtinput file to generate a time tree e.g.Species.txtDownloads the resulting time tree in the Newick formatStores replaced or missing species to a.txtfile e.g.replacements.txte) Print citationPrints the citation for the TimeTree resourceS. Kumar, G. Stecher, M. Suleski, and S.B. Hedges, 2017.  TimeTree: a resource for timelines, timetrees, and divergence times.  Molecular Biology and Evolution 34: 1812-1819,  DOI:10.1093/molbev/msx116f) Validate datafileBrings up the datafile validation menu optionsVALIDATE MENU:
----------------------------------------
      a) Check missing
      b) Replace missing
      c) View tree
      m) Main menu
----------------------------------------input is given as lower case 'a', 'b', 'c', or 'm' (return to main menu)a) Check missingUsed to check for missing values from running a long list of species (>10 Species)Takes the output file (.csv) from the divergence time function and checks for any missing valuese.g.Taxa1Taxa2Div.TimeSetophaga ruticillaSetophaga ruticilla0Setophaga ruticillaHirundo rusticaNASetophaga ruticillaSetophaga striata3.52Hirundo rusticaSetophaga ruticilla35Hirundo rusticaHirundo rustica0Hirundo rusticaSetophaga striataNASetophaga striataSetophaga ruticilla3.52Setophaga striataHirundo rustica35Setophaga striataSetophaga striata0If no missing values are detected, will print 'No missing values'If missing values are detected they are printed to the screen and an attempt will be made to look up those valuesAsks for file name to store the missing values as a.csvfile e.g.missing.csve.g.Taxa1Taxa2Div.TimeSetophaga ruticillaHirundo rustica35Hirundo rusticaSetophaga striata35b) Replace missingUsed to replace the missing values (divergence times) from a long list of speciesTakes two input files, one with the divergence times and one with the missing values detected using 'Check missing'Asks for file name to store the validated dataset of divergence timese.g.Taxa1Taxa2Div.TimeSetophaga ruticillaSetophaga ruticilla0Setophaga ruticillaHirundo rustica35Setophaga ruticillaSetophaga striata3.52Hirundo rusticaSetophaga ruticilla35Hirundo rusticaHirundo rustica0Hirundo rusticaSetophaga striata35Setophaga striataSetophaga ruticilla3.52Setophaga striataHirundo rustica35Setophaga striataSetophaga striata0c) View treeTakes a newick tree as input and renders a basic display of tree topologyq) QuitExits program