planemo
planemo copied to clipboard
planemo lint does not validate file formats
e.g. Using format="foobar"
could be caught as an error during linting:
$ planemo --version
planemo, version 0.41.0.dev0
$ git diff
diff --git a/tools/fastq_paired_unpaired/fastq_paired_unpaired.xml b/tools/fastq_paired_unpaired/fastq_paired_unpaired.xml
index 6bc8c54..34521e8 100644
--- a/tools/fastq_paired_unpaired/fastq_paired_unpaired.xml
+++ b/tools/fastq_paired_unpaired/fastq_paired_unpaired.xml
@@ -17,7 +17,7 @@ python $__tool_directory__/fastq_paired_unpaired.py '$input_fastq.extension' '$i
$output_singles
</command>
<inputs>
- <param name="input_fastq" type="data" format="fastq" label="FASTQ file to divide into paired and unpaired reads"/>
+ <param name="input_fastq" type="data" format="foobar" label="FASTQ file to divide into paired and unpaired reads"/>
<conditional name="output_choice_cond">
<param name="output_choice" type="select" label="How to output paired reads?">
<option value="separate">Separate (two FASTQ files, for the forward and reverse reads, in matching order).</option>
$ planemo lint tools/fastq_paired_unpaired/fastq_paired_unpaired.xml ; echo "Return code $?"
Linting tool /mnt/shared/users/xxx/repositories/pico_galaxy/tools/fastq_paired_unpaired/fastq_paired_unpaired.xml
Applying linter tests... CHECK
.. CHECK: 2 test(s) found.
Applying linter output... CHECK
.. INFO: 4 outputs found.
Applying linter inputs... CHECK
.. INFO: Found 2 input parameters.
Applying linter help... CHECK
.. CHECK: Tool contains help section.
.. CHECK: Help contains valid reStructuredText.
Applying linter general... CHECK
.. CHECK: Tool defines a version [0.1.4].
.. CHECK: Tool defines a name [Divide FASTQ file into paired and unpaired reads].
.. CHECK: Tool defines an id [fastq_paired_unpaired].
.. CHECK: Tool targets 16.01 Galaxy profile.
Applying linter command... CHECK
.. INFO: Tool contains a command.
Applying linter citations... CHECK
.. CHECK: Found 1 likely valid citations.
Applying linter tool_xsd... CHECK
.. INFO: File validates against XML schema.
Return code 0
While this example is silly and artificial, it is based on a real issue from @tiagoantao using fastqsangergz
rather than fastqsanger.gz
https://github.com/galaxyproject/tools-iuc/issues/1323#issuecomment-303446756
Also mentioned in #13 - happy to have a separate issue for it though - thanks @peterjc.
Just another datapoint for the importance of this issue, we have 30k fastqsangar
s in our db:
extension | count | ok |
---|---|---|
fastqsanger | 451645 | :heavy_check_mark: |
fastqsanger.gz | 190145 | :heavy_check_mark: |
fastq | 38542 | :heavy_check_mark: |
fastqsangar | 29168 | :heavy_multiplication_x: |
fastq.gz | 8248 | :heavy_check_mark: |
fastqillumina.gz | 2350 | :heavy_check_mark: |
fastqcssanger.gz | 1173 | :heavy_check_mark: |
fastqcssanger | 804 | :heavy_check_mark: |
fastqillumina | 779 | :heavy_check_mark: |
fastqsanger.bz2 | 637 | :heavy_check_mark: |
fastqsanger. | 179 | :heavy_multiplication_x: |
fastqsolexa | 132 | :heavy_check_mark: |
fastq2 | 73 | :heavy_multiplication_x: |
fastq.bz2 | 61 | :heavy_check_mark: |
fastqcssanger.bz2 | 40 | :heavy_check_mark: |
fastqillumina.bz2 | 18 | :heavy_check_mark: |
fastq. | 7 | :heavy_multiplication_x: |
fastqsan | 4 | :heavy_multiplication_x: |
fastqillumina. | 2 | :heavy_multiplication_x: |
fastqsolexa.gz | 1 | :heavy_check_mark: |
fastqsolexa.bz2 | 1 | :heavy_check_mark: |
fastqsolexa. | 1 | :heavy_multiplication_x: |