【发布时间】:2023-03-28 21:57:01
【问题描述】:
我正在使用snakemake validate 函数,它似乎在很大程度上基于jsonschema,对于简单的示例它工作正常,但是我不确定如何进行更复杂的参数设置。
假设我为多个峰值调用者(例如 macs2 和 genrich)实现了选项。目前我的config.yaml 看起来像这样:
peak_caller:
- macs2:
--shift -100 --extsize 200
- genrich:
-y -j
如果没有指定峰值调用者,我希望它使用这些参数默认为 macs2,如果指定了这两个峰值调用者中的一个或两个以外的任何其他参数,我希望它失败。
我用枚举器和数组尝试了不同的东西,但我永远无法让它正常工作:
$schema: "http://json-schema.org/draft-06/schema#"
description: snakemake-workflows peak calling configuration
properties:
# peak caller algorithms
peak_caller:
description: which peak caller(s) to use. Currently macs2 (default) and genrich are supported.
type: array
default: [macs2]
我最好保留yaml 格式,但我愿意接受以json 编写的配置。
【问题讨论】:
标签: python json yaml snakemake