Skip to content

Commit

Permalink
refactor: rework samplesheet validation
Browse files Browse the repository at this point in the history
Samplesheet validation and channel construction is now done using nf-validation. Relative paths in samplesheets are now resolved in nextflow itself instead of the old check_samplesheet.py. panel keys are now validated as well.
  • Loading branch information
fbdtemme committed Aug 16, 2023
1 parent a043d2b commit 1cc3116
Show file tree
Hide file tree
Showing 8 changed files with 133 additions and 491 deletions.
18 changes: 10 additions & 8 deletions assets/schema_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"type": "array",
"items": {
"type": "object",
"required": ["sample", "design", "fastq_1"],
"properties": {
"sample": {
"type": "string",
Expand All @@ -15,21 +16,24 @@
},
"design": {
"type": "string",
"enum": ["D21"],
"meta": ["design"],
"errorMessage": "Design must be specified"
},
"panel": {
"errorMessage": "Panel name must be specified",
"type": "string",
"meta": ["panel"]
},
"panel_file": {
"errorMessage": "Panel file must either be left empty or cannot contain spaces and must have extension '.csv', '.tsv' or '.yaml'",
"anyOf": [
{
"type": "string",
"pattern": "^\\S+.(csv|tsv)$",
"errorMessage": "Panel file or panel name must be provided, cannot contain spaces and must have extension '.csv'"
"pattern": "^\\S+.(csv|tsv|ya?ml)$"
},
{
"type": "string",
"enum": ["human-sc-immunology-spatial-proteomics"],
"errorMessage": "Panel name must be specified"
"maxLength": 0
}
]
},
Expand All @@ -51,8 +55,6 @@
}
]
}
},
"required": ["sample", "design", "fastq_1"],
"oneOf": [{ "required": ["panel"] }, { "required": ["panel_file"] }]
}
}
}
Loading

0 comments on commit 1cc3116

Please sign in to comment.