def import_cwl(self, cwl_path):
"""
Load content of cwl into the :class:`cwlgen.CommandLineTool` object.
:param cwl_path: Path of the CWL tool to be loaded.
:type cwl_path: STRING
:return: CWL tool content in cwlgen model.
:rtype: :class:`cwlgen.CommandLineTool`
"""
with open(cwl_path) as yaml_file:
cwl_dict = ryaml.load(yaml_file, Loader=ryaml.Loader)
tool = self._init_tool(cwl_dict)
for key, element in cwl_dict.items():
try:
getattr(self, '_load_{}'.format(key))(tool, element)
except AttributeError:
logger.warning(key + " content is not processed (yet).")
return tool
import_cwl.py 文件源码
python
阅读 61
收藏 0
点赞 0
评论 0
评论列表
文章目录