TheJacksonLaboratory / splicing-pipelines-nf

Repository for the Anczukow-Lab splicing pipeline
14 stars 9 forks source link

Parametrize error strategy #265

Closed Vlad-Dembrovskyi closed 2 years ago

Vlad-Dembrovskyi commented 2 years ago

This PR

Adds a single nextflow parameter --error_strategy that allows to change error strategy for command line.

This was requested by @angarb (also see suggested commit) for the purpose of being able to easily set error strategy to "ignore" when needed to avoid pipeline failure upon one wrongful variant.

Testing

This PR has been tested locally to be able to change error strategy from command line parameter. Testing was performed by using one correct and one corrupted fastq file created manually. samples_to_fail.csv:

sample_id,fastq
SRR4238351,https://lifebit-featured-datasets.s3-eu-west-1.amazonaws.com/projects/jax/splicing-pipelines-nf/reads/ultra_quick_test/SRR4238351_subsamp.fastq.gz
SRR4238355,/home/ec2-user/splicing-pipelines-nf/SRR4238355_broken.fastq.gz

Error strategy ignore:

nextflow run . -profile ultra_quick_test,docker --reads samples_to_fail.csv --cleanup --error_strategy 'ignore'

image

Error strategy finish:

nextflow run . -profile ultra_quick_test,docker --reads samples_to_fail.csv --cleanup --error_strategy 'finish'

image

Error strategy terminate:

nextflow run . -profile ultra_quick_test,docker --reads samples_to_fail.csv --cleanup --error_strategy 'terminate'

image

Incorrect error strategy value:

nextflow run . -profile ultra_quick_test,docker --reads samples_to_fail.csv --cleanup --error_strategy 'ghjkvxz'

image

Vlad-Dembrovskyi commented 2 years ago

closing in favor of cleaner PR https://github.com/TheJacksonLaboratory/splicing-pipelines-nf/pull/267