Skip to content

Commit

Permalink
enforce id uniqueness
Browse files Browse the repository at this point in the history
  • Loading branch information
BioWilko committed Jan 31, 2025
1 parent b660f27 commit c0168f0
Showing 1 changed file with 28 additions and 8 deletions.
36 changes: 28 additions & 8 deletions assets/schema_input.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@
"pattern": "^\\S+$",
"uniqueItems": true,
"errorMessage": "Sequence reference name must be provided and cannot contain spaces",
"meta": ["id"]
"meta": [
"id"
]
},
"taxid": {
"type": "integer",
"errorMessage": "Please provide a valid taxonomic ID in integer format",
"meta": ["taxid"]
"meta": [
"taxid"
]
},
"fasta_dna": {
"type": "string",
Expand All @@ -34,22 +38,38 @@
"errorMessage": "FASTA file for amino acid reference sequence cannot contain spaces and must have a valid FASTA extension (fasta, faa, fa, fas), optionally gzipped"
}
},
"required": ["id", "taxid"],
"required": [
"id",
"taxid"
],
"anyOf": [
{
"required": ["fasta_dna"]
"required": [
"fasta_dna"
]
},
{
"required": ["fasta_aa"]
"required": [
"fasta_aa"
]
}
]
},
"allOf": [
{
"uniqueEntries": ["fasta_dna"]
"uniqueEntries": [
"id"
]
},
{
"uniqueEntries": ["fasta_aa"]
"uniqueEntries": [
"fasta_dna"
]
},
{
"uniqueEntries": [
"fasta_aa"
]
}
]
}
}

0 comments on commit c0168f0

Please sign in to comment.