brokilon.ccd.cli.breath_helper module

exception brokilon.ccd.cli.breath_helper.DateExtractionError[source]

Bases: Exception

Raised if taxon names do not contain a date

brokilon.ccd.cli.breath_helper.extract_date_from_label(taxon_label: str, sep: str = '+', fmt: str = '%Y-%m-%d')[source]
brokilon.ccd.cli.breath_helper.extracting_data(tree, taxon_map, sep, fmt, scale)[source]
brokilon.ccd.cli.breath_helper.float_to_date(root_date, float_val, scale)[source]
brokilon.ccd.cli.breath_helper.get_root_age_from_leafs(tree, taxon_map, sep, fmt, scale)[source]
brokilon.ccd.cli.breath_helper.get_root_age_with_date(tree, start_date, scale, taxon_map)[source]

Using the start date on the oldest taxon we can extract the root age using the scale and float conversion

Parameters:
  • tree – A tree to get a root date for

  • start_date – The date asssumed for the most recent leaf (furthest from root)

  • scale – Scale for 1.0 float to days/years

  • taxon_map – The corresponding taxon map

Returns:

brokilon.ccd.cli.breath_helper.translate(value, taxon_map)[source]