To migrate your schemas please follow the migration guide
- Added the
uniqueEntries
keyword. This keyword takes a list of strings corresponding to names of fields that need to be a unique combination. e.g.uniqueEntries: ['sample', 'replicate']
will make sure that the combination of thesample
andreplicate
fields is unique. (#141)
- Changed the used draft for the schema from
draft-07
todraft-2020-12
. See the 2019-09 and 2020-12 release notes for all changes (#141) - Removed all validation code from the
.fromSamplesheet()
channel factory. The validation is now solely done in thevalidateParameters()
function. A custom error message will now be displayed if any error has been encountered during the conversion (#141) - Removed the
unique
keyword from the samplesheet schema. You should now useuniqueItems
oruniqueEntries
instead (#141) - Removed the
skip_duplicate_check
option from thefromSamplesheet()
channel factory and the--validationSkipDuplicateCheck
parameter. You should now use theuniqueEntries
oruniqueItems
keywords in the schema instead (#141) .fromSamplesheet()
now does dynamic typecasting instead of using thetype
fields in the JSON schema. This is done due to the complexity ofdraft-2020-12
JSON schemas. This should not have that much impact but keep in mind that some types can be different between this and earlier versions because of this (#141).fromSamplesheet()
will now set all missing values as[]
instead of the type specific defaults (because of the changes in the previous point). This should not change that much as this will also result infalse
when used in conditions. (#141)
- Setting the
exists
keyword tofalse
will now check if the path does not exist (#141) - The
schema
keyword will now work in all schemas. (#141) - Improved the error messages (#141)
.fromSamplesheet()
now supports deeply nested samplesheets (#141)
- Added support for double quotes (
"
) in CSV and TSV samplesheets (#134)
- Fixed an issue with inputs using
file-path-pattern
where only one file was found (Path
casting toArrayList
error) (#132)
- Fixed an issue where samplesheet with a lot of null values would take forever to validate (#120) => Thanks @awgymer for fixing this!
- Now YAML files are actually validated instead of skipped (#124)
- Add support for samplesheets with no header (#115)
- Floats and doubles should now be created when using the
number
type in the schema (#113) - When
0
is used as a default value in the schema, a0
will now be used as the value in the.fromSamplesheet()
channel instead ofnull
(#114)
- Added
file-path-pattern
format to check every file fetched using a glob pattern. Using a glob is now also possible in the samplesheet and will create a list of all files found using that glob pattern. (#118)
The nf-validation plugin is now in production use across many pipelines and has (we hope) now reached a point of relative stability. The bump to major version v1.0.0 signifies that it is suitable for use in production pipelines.
This version also introduces a small breaking change of syntax when providing optional arguments to the functions. You can now provide optional arguments such as the nextflow parameters schema path as:
validateParameters(parameters_schema: 'my_file.json')
(previous syntax used positional arguments instead).
- The path to a custom parameters schema must be provided through a map '
parameters_schema: 'my_file.json'
' invalidateParameters()
andparamsSummaryMap()
(#108)
This version introduced a bug which made all pipeline runs using the function validateParameters()
without providing any arguments fail.
This bug causes Nextflow to exit with an error on launch for most pipelines. It should not be used. It was removed from the Nextflow Plugin registry to avoid breaking people's runs.
- Do not check S3 URL paths with
PathValidator
FilePathValidator
andDirectoryPathValidator
(#106) - Make monochrome_logs an option in
paramsSummaryLog()
,paramsSummaryMap()
andparamsHelp()
instead of a global parameter (#101)
- Do not check if S3 URL paths exists to avoid AWS errors, and add a new parameter
validationS3PathCheck
(#104)
- Add parameters defined on the top level of the schema and within the definitions section as expected params (#79)
- Fix error when a parameter is not present in the schema and evaluates to false (#89)
- Changed the
schema_filename
option offromSamplesheet
toparameters_schema
to make this option more clear to the user (#91)
- Don't check if path exists if param is not true (#74)
- Don't validate a file if the parameter evaluates to false (#75)
- Check that a sample sheet doesn't have duplicated entries by default. Can be disabled with
--validationSkipDuplicateCheck
(#72)
- Only validate a path if it is not null (#50)
- Only validate a file with a schema if the file path is provided (#51)
- Handle errors when sample sheet not provided or doesn't have a schema (#56)
- Silently ignore samplesheet fields that are not defined in samplesheet schema (#59)
- Correctly handle double-quoted fields containing commas in csv files by
.fromSamplesheet()
(#63) - Print param name when path does not exist (#65)
- Fix file or directory does not exist error not printed when it was the only error in a samplesheet (#65)
- Do not return parameter in summary if it has no default in the schema and is set to 'false' (#66)
- Skip the validation of a file if the path is an empty string and improve error message when the path is invalid (#69)
- Fixed a bug where
immutable_meta
option infromSamplesheet()
wasn't working when usingvalidateParameters()
first. (@nvnieuwk)
- Added a new documentation site. (@ewels and @mashehu)
- Removed the
file-path-exists
,directory-path-exists
andpath-exists
and added aexists
parameter to the schema. (@mirpedrol) - New
errorMessage
parameter for the schema which can be used to create custom error messages. (@mirpedrol) - Samplesheet validation now happens in
validateParameters()
using the schema specified by theschema
parameter in the parameters schema. (@mirpedrol)
- The
meta
maps are now immutable by default, seeImmutableMap
for more info (@nvnieuwk) validateAndConvertSamplesheet()
has been renamed tofromSamplesheet()
- Refactor
--schema_ignore_params
to--validationSchemaIgnoreParams
- Fixed a bug where an empty meta map would be created when no meta values are in the samplesheet schema. (@nvnieuwk)
Initial release.