wags_tails.hemonc#

Provide source fetching for HemOnc.

class wags_tails.hemonc.HemOncPaths(concepts: Path, rels: Path, synonyms: Path)[source]#

Container for HemOnc file paths.

Since HemOnc distributes data across multiple files, this is a simple way to pass paths for each up to a data consumer.

concepts: Path[source]#

Alias for field number 0

rels: Path[source]#

Alias for field number 1

synonyms: Path[source]#

Alias for field number 2

class wags_tails.hemonc.HemOncData(data_dir=None, silent=True)[source]#

Provide access to HemOnc data source.

get_latest(from_local=False, force_refresh=False)[source]#

Get path to latest version of data, and its version value

Parameters:
  • from_local (bool) – if True, use latest available local file

  • force_refresh (bool) – if True, fetch and return data from remote regardless of whether a local copy is present

Return type:

Tuple[HemOncPaths, str]

Returns:

Paths to data, and version value of it

Raises:

ValueError – if both force_refresh and from_local are True

__init__(data_dir=None, silent=True)[source]#

Set common class parameters.

Parameters:
  • data_dir (Optional[Path]) – direct location to store data files in, if specified. See get_data_dir() in the storage_utils module for further configuration details.

  • silent (bool) – if True, don’t print any info/updates to console