-
Notifications
You must be signed in to change notification settings - Fork 18
Parameters meta-schema - first draft #133
Conversation
nvnieuwk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😉
|
Testing on all nf-core pipelines... Get the pipeline schema files: wget https://nf-co.re/pipelines.json
for f in *for p in $(cat pipelines.json | jq ".remote_workflows [].name" -r)
do
wget "https://raw.githubusercontent.com/nf-core/${p}/master/nextflow_schema.json" -O ${p}_schema.json
doneValidate with for f in *schema.json
do
printf "# $f\n\n"; check-jsonschema --schemafile ../parameters_meta_schema.json $f; printf "\n\n"
doneairrflow_schema.jsonampliseq_schema.jsonatacseq_schema.jsonbacass_schema.jsonbactmap_schema.jsonbamtofastq_schema.jsoncageseq_schema.jsoncallingcards_schema.jsonchipseq_schema.jsoncircdna_schema.jsoncircrna_schema.jsonclipseq_schema.jsoncoproid_schema.jsoncreatepanelrefs_schema.jsoncreatetaxdb_schema.jsoncrisprseq_schema.jsoncrisprvar_schema.jsoncutandrun_schema.jsonddamsproteomics_schema.jsondeepvariant_schema.jsondemultiplex_schema.jsondenovohybrid_schema.jsondetaxizer_schema.jsondiaproteomics_schema.jsondifferentialabundance_schema.jsondualrnaseq_schema.jsoneager_schema.jsonepitopeprediction_schema.jsonexoseq_schema.jsonfastquorum_schema.jsonfetchngs_schema.jsonfuncscan_schema.jsongenomeannotator_schema.jsongenomeassembler_schema.jsongenomeskim_schema.jsongwas_schema.jsonhgtseq_schema.jsonhic_schema.jsonhicar_schema.jsonhlatyping_schema.jsonimcyto_schema.jsonisoseq_schema.jsonkmermaid_schema.jsonliverctanalysis_schema.jsonlncpipe_schema.jsonmag_schema.jsonmarsseq_schema.jsonmcmicro_schema.jsonmetaboigniter_schema.jsonmetapep_schema.jsonmetatdenovo_schema.jsonmethylseq_schema.jsonmhcquant_schema.jsonmnaseseq_schema.jsonmolkart_schema.jsonmultiplesequencealign_schema.jsonnanoseq_schema.jsonnanostring_schema.jsonnascent_schema.jsonneutronstar_schema.jsonpangenome_schema.jsonpathogensurveillance_schema.jsonpgdb_schema.jsonphageannotator_schema.jsonphyloplace_schema.jsonpixelator_schema.jsonproteinfold_schema.jsonproteomicslfq_schema.jsonquantms_schema.jsonradseq_schema.jsonraredisease_schema.jsonreadsimulator_schema.jsonriboseq_schema.jsonrnadnavar_schema.jsonrnafusion_schema.jsonrnaseq_schema.jsonrnasplice_schema.jsonrnavar_schema.jsonsammyseq_schema.jsonsarek_schema.jsonscflow_schema.jsonscrnaseq_schema.jsonslamseq_schema.jsonsmartseq2_schema.jsonsmrnaseq_schema.jsonspatialtranscriptomics_schema.jsonspinningjenny_schema.jsonssds_schema.jsontaxprofiler_schema.jsonvariantcatalogue_schema.jsonvipr_schema.jsonviralintegration_schema.jsonviralrecon_schema.json |
|
Almost all current validation errors are due to empty |
Co-authored-by: Nicolas Vannieuwkerke <101190534+nvnieuwk@users.noreply.github.com>
|
I think this is going to be quite useful! If allowing empty description strings, these are the errors that we're left with - basically all look like unintentional errors in schema: airrflowSchema validation errors were encountered.
airrflow_schema.json::$.definitions.clonal_analysis_options.properties.clonal_threshold.type: ['string', 'number'] is not of type 'string'
airrflow_schema.json::$.definitions.clonal_analysis_options.properties.clonal_threshold.type: ['string', 'number'] is not one of ['string', 'boolean', 'integer', 'number']Yup, can't have an array for "properties": {
"clonal_threshold": {
"type": ["string", "number"],magSchema validation errors were encountered.
mag_schema.json::$.definitions.taxonomic_profiling_options.properties.gtdbtk_min_completeness.minimum: 0.01 is not of type 'integer'metaboigniterSchema validation errors were encountered.
metaboigniter_schema.json::$.definitions.internal_library_quantification_and_identification_parameters_negative_mode.properties.ipo_integrate_library_neg.help_text: '' is too shortmethylseqSchema validation errors were encountered.
methylseq_schema.json::$.definitions.qualimap_options.properties.bamqc_regions_file: 'type' is a required propertynanoseqSchema validation errors were encountered.
nanoseq_schema.json::$.definitions.input_output_options.properties.protocol.format: 'sample-type' is not one of ['file-path', 'directory-path', 'path']pixelatorSchema validation errors were encountered.
pixelator_schema.json::$.definitions.adapterqc_options: 'type' is a required property
pixelator_schema.json::$.definitions.adapterqc_options.properties.adapterqc_mismatches.maximum: 0.9 is not of type 'integer'
pixelator_schema.json::$.definitions.demux_options: 'type' is a required property
pixelator_schema.json::$.definitions.demux_options.properties.demux_mismatches.maximum: 0.9 is not of type 'integer'
pixelator_schema.json::$.definitions.collapse_options: 'type' is a required property
pixelator_schema.json::$.definitions.graph_options: 'type' is a required property
pixelator_schema.json::$.definitions.annotate_options: 'type' is a required property
pixelator_schema.json::$.definitions.analysis_options: 'type' is a required property
pixelator_schema.json::$.definitions.report_options: 'type' is a required property
pixelator_schema.json::$.definitions.global_config_options.properties.pixelator_container.format: 'url' is not one of ['file-path', 'directory-path', 'path']proteinfoldSchema validation errors were encountered.
proteinfold_schema.json::$.definitions.colabfold_dbs_and_parameters_path_options.properties.colabfold_alphafold2_params_tags.type: 'object' is not one of ['string', 'boolean', 'integer', 'number']This is valid JSON-schema, but not officially supported by the Nextflow schema stack: "colabfold_alphafold2_params_tags": {
"type": "object",
"description": "Dictionary with Alphafold2 parameters tags",riboseqSchema validation errors were encountered.
riboseq_schema.json::$.definitions.reference_genome_options.properties.riboviz_index.format: 'dir-path' is not one of ['file-path', 'directory-path', 'path']
riboseq_schema.json::$.definitions.Trimming_options.properties.adapter_sequence: 'type' is a required property |
|
I've removed the zero-length description thing, as this schema is intended to validate that Nextflow schema files are valid on a functional level. We should build best-practice linting for this kind of thing into nf-core/tools separately. It may be worth removing the > zero-length string requirement for |
| }, | ||
| "fa_icon": { | ||
| "type": "string", | ||
| "pattern": "^fa" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about adding a description with a link to fontaweseome?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description is a Nextflow schema thing, not a JSON schema thing (it's a non-standard field).
We already document it here: https://nextflow-io.github.io/nf-validation/nextflow_schema/nextflow_schema_specification/#fa_icon
mirpedrol
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
See nf-core/tools#2436
Still missing conditional validation - eg. that
maxLengthis only set when"type": "string"