snakemake.py 文件源码

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

项目:sequana 作者: sequana 项目源码 文件源码
def get_widgets(self, prefix):
        # identify names of the widget objects
        names = self._get_widget_names(prefix)

        # Get the objects themselves
        widgets = [getattr(self.ui, this) for this in names]

        # the double underscore __  is used instead of dash - in qt designer
        # because dash is not acceptable within the object name. so we must
        # replace it. We also strip the prefix and suffix (_value)
        names = [this.replace(prefix + "_", "") for this in names]
        names = [this.replace("__", "-") for this in names]
        names = [this.replace("_value", "") for this in names]

        options = []
        snakemake_version = StrictVersion(snakemake.version.__version__)
        for name, widget in zip(names, widgets):
            # This option is valid for snakemake above 3.10
            if name == "restart-times" and snakemake_version < StrictVersion("3.10"):
                print("You should use Snakemake 3.10 or above")
                continue
            options.append(SOptions(name, widget))
        return options
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号