toil.wdl.utils

Module Contents

Functions

get_version(iterable)

Get the version of the WDL document.

get_analyzer(wdl_file)

Creates an instance of an AnalyzeWDL implementation based on the version.

dict_from_JSON(JSON_file)

Takes a WDL-mapped json file and creates a dict containing the bindings.

write_mappings(parser[, filename])

Takes an AnalyzeWDL instance and writes the final task dict and workflow

toil.wdl.utils.get_version(iterable)[source]

Get the version of the WDL document.

Parameters

iterable – An iterable that contains the lines of a WDL document.

Returns

The WDL version used in the workflow.

Return type

str

toil.wdl.utils.get_analyzer(wdl_file)[source]

Creates an instance of an AnalyzeWDL implementation based on the version.

Parameters

wdl_file (str) – The path to the WDL file.

Return type

toil.wdl.wdl_analysis.AnalyzeWDL

toil.wdl.utils.dict_from_JSON(JSON_file)[source]

Takes a WDL-mapped json file and creates a dict containing the bindings.

Parameters

JSON_file (str) – A required JSON file containing WDL variable bindings.

Return type

dict

toil.wdl.utils.write_mappings(parser, filename='mappings.out')[source]

Takes an AnalyzeWDL instance and writes the final task dict and workflow dict to the given file.

Parameters
Return type

None