import_cwl.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:python-cwlgen 作者: common-workflow-language 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号