changeset 4:439eed933bf9 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/fastx_toolkit/fastq_quality_boxplot commit bbb2e6b6769b03602a8ab97001f88fbec52080a1
author iuc
date Tue, 08 May 2018 12:49:29 -0400
parents cd82df766cab
children 5a28b303e432
files fastq_quality_boxplot.xml macros.xml test-data/fastq_quality_boxplot-in1.fastq test-data/fastq_quality_boxplot-out1.png test-data/fastq_stats1.out tool_dependencies.xml
diffstat 6 files changed, 157 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/fastq_quality_boxplot.xml	Mon Jul 21 15:09:50 2014 -0400
+++ b/fastq_quality_boxplot.xml	Tue May 08 12:49:29 2018 -0400
@@ -1,19 +1,32 @@
-<tool id="cshl_fastq_quality_boxplot" name="Draw quality score boxplot" version="1.0.0">
-	<description></description>
-    <requirements>
-        <requirement type="package" version="0.0.13">fastx_toolkit</requirement>
-    </requirements>
-	<command>fastq_quality_boxplot_graph.sh -t '$input.name' -i $input -o $output</command>
-	
-	<inputs>
-		<param format="txt" name="input" type="data" label="Statistics report file"  help="output of 'FASTQ Statistics' tool" />
-	</inputs>
+<tool id="cshl_fastq_quality_boxplot" name="Draw quality score boxplot" version="1.0.1">
+    <description></description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <command detect_errors="exit_code"><![CDATA[
+#import re
+#set escaped_element_identifier = re.sub('[^\w\-\s]', '_', str($input.element_identifier))
+fastq_quality_boxplot_graph.sh
+-t '$escaped_element_identifier'
+-i '$input'
+-o '$output'
+    ]]></command>
 
-	<outputs>
-		<data format="png" name="output" metadata_source="input" />
-	</outputs>
-<help>
+    <inputs>
+        <param name="input" type="data" format="txt" label="Statistics report file"  help="output of 'FASTQ Statistics' tool" />
+    </inputs>
 
+    <outputs>
+        <data name="output" format="png" metadata_source="input" />
+    </outputs>
+    <tests>
+        <test>
+            <param name="input" value="fastq_quality_boxplot-in1.fastq" />
+            <output name="output" file="fastq_quality_boxplot-out1.png" compare="sim_size" delta="768" />
+        </test>
+    </tests>
+    <help><![CDATA[
 **What it does**
 
 Creates a boxplot graph for the quality scores in the library.
@@ -49,9 +62,7 @@
 This tool is based on `FASTX-toolkit`__ by Assaf Gordon.
 
  .. __: http://hannonlab.cshl.edu/fastx_toolkit/
-
-
-
-</help>
+    ]]></help>
+    <expand macro="citations" />
 <!-- FASTQ-Quality-Boxplot is part of the FASTX-toolkit, by A.Gordon (gordon@cshl.edu) -->
 </tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Tue May 08 12:49:29 2018 -0400
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<macros>
+    <token name="@CATS@">
+        #if $input.is_of_type('fasta.gz', 'fastqsanger.gz', 'fastqsolexa.gz', 'fastqillumina.gz'):
+            zcat -f '$input' |
+        #elif $input.is_of_type('fastqsanger.bz2', 'fastqsolexa.bz2', 'fastqillumina.bz2'):
+            bzcat -f '$input' |
+        #else:
+            cat '$input' |
+        #end if
+    </token>
+    <token name="@FQQUAL@">
+        <![CDATA[
+            #if $input.is_of_type('fastqsanger', 'fastqsanger.gz', 'fastqsanger.bz2'):
+                -Q 33
+            #elif $input.is_of_type('fastqsolexa', 'fastqsolexa.gz', 'fastqsolexa.bz2', 'fastqillumina', 'fastqillumina.gz', 'fastqillumina.bz2'):
+                -Q 64
+            #end if
+        ]]>
+    </token>
+    <xml name="requirements">
+        <requirements>
+            <requirement type="package" version="@VERSION@">fastx_toolkit</requirement>
+            <yield />
+        </requirements>
+    </xml>
+    <token name="@VERSION@">0.0.14</token>
+    <token name="@SANGER@">fastqsanger,fastqsanger.gz,fastqsanger.bz2</token>
+    <token name="@SOLEXA@">fastqsolexa,fastqsolexa.gz,fastqsolexa.bz2</token>
+    <token name="@ILLUMINA@">fastqillumina,fastqillumina.gz,fastqillumina.bz2</token>
+    <token name="@FASTQS@">@SANGER@,@SOLEXA@,@ILLUMINA@</token>
+    <token name="@FASTAS@">fasta,fasta.gz</token>
+    <xml name="citations">
+        <citations>
+            <citation type="bibtex">
+                @UNPUBLISHED{agordon,
+                    author = "Assaf Gordon",
+                    title = "FASTQ/A short-reads pre-processing tools",
+                    year = "2010",
+                    note = "http://hannonlab.cshl.edu/fastx_toolkit/",
+                    url = "http://hannonlab.cshl.edu/fastx_toolkit/"}
+            </citation>
+        </citations>
+    </xml>
+    <xml name="fasta_input">
+        <param name="input" type="data" format="@FASTAS@" label="Input FASTA file" />
+    </xml>
+    <xml name="fastq_input">
+        <param name="input" type="data" format="@FASTQS@" label="Input FASTQ file" />
+    </xml>
+    <xml name="fastx_input">
+        <param name="input" type="data" format="@FASTAS@,@FASTQS@" label="Input file in FASTA or FASTQ format" />
+    </xml>
+</macros>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/fastq_quality_boxplot-in1.fastq	Tue May 08 12:49:29 2018 -0400
@@ -0,0 +1,37 @@
+column	count	min	max	sum	mean	Q1	med	Q3	IQR	lW	rW	A_Count	C_Count	G_Count	T_Count	N_Count	Max_count
+1	9	23	34	288	32.00	33	33	33	0	33	33	3	1	4	1	0	9
+2	9	28	33	287	31.89	31	33	33	2	28	33	3	3	2	1	0	9
+3	9	13	34	268	29.78	28	33	33	5	21	34	5	1	0	3	0	9
+4	9	17	33	261	29.00	30	33	33	3	26	33	1	2	3	3	0	9
+5	9	22	33	269	29.89	30	33	33	3	26	33	3	3	3	0	0	9
+6	9	22	33	277	30.78	30	33	33	3	26	33	5	3	0	1	0	9
+7	9	21	33	258	28.67	24	33	33	9	21	33	4	1	3	1	0	9
+8	9	12	33	263	29.22	32	33	33	1	31	33	2	1	1	5	0	9
+9	9	29	33	290	32.22	33	33	33	0	33	33	3	3	2	1	0	9
+10	9	23	33	277	30.78	32	33	33	1	31	33	1	4	2	2	0	9
+11	9	12	33	245	27.22	21	31	33	12	12	33	5	2	1	1	0	9
+12	9	13	33	214	23.78	15	24	33	18	13	33	2	4	2	1	0	9
+13	9	5	33	249	27.67	29	31	33	4	23	33	2	1	1	5	0	9
+14	9	5	33	233	25.89	24	33	33	9	11	33	3	3	2	1	0	9
+15	9	15	33	251	27.89	24	33	33	9	15	33	5	1	1	2	0	9
+16	9	23	34	269	29.89	24	33	33	9	23	34	3	1	2	3	0	9
+17	9	13	34	266	29.56	33	33	33	0	33	33	2	3	1	3	0	9
+18	9	21	34	272	30.22	31	33	33	2	28	34	0	5	1	3	0	9
+19	9	5	34	244	27.11	27	30	33	6	18	34	4	4	1	0	0	9
+20	9	11	34	241	26.78	23	32	33	10	11	34	3	4	2	0	0	9
+21	9	13	33	240	26.67	24	27	33	9	13	33	1	4	0	4	0	9
+22	9	5	33	190	21.11	13	21	33	20	5	33	1	4	0	3	1	9
+23	9	5	33	205	22.78	16	26	33	17	5	33	4	4	1	0	0	9
+24	9	5	33	247	27.44	28	31	33	5	21	33	1	5	1	2	0	9
+25	9	11	34	241	26.78	24	33	33	9	11	34	3	4	0	2	0	9
+26	9	5	33	212	23.56	18	31	33	15	5	33	0	6	0	3	0	9
+27	9	5	33	227	25.22	21	26	33	12	5	33	3	4	1	1	0	9
+28	9	21	33	255	28.33	24	31	33	9	21	33	2	4	3	0	0	9
+29	9	5	33	228	25.33	21	30	33	12	5	33	2	4	1	2	0	9
+30	9	10	33	213	23.67	16	28	33	17	10	33	3	4	2	0	0	9
+31	9	5	33	236	26.22	21	31	33	12	5	33	1	4	1	3	0	9
+32	9	5	33	210	23.33	12	29	33	21	5	33	3	3	0	3	0	9
+33	9	5	33	183	20.33	9	21	33	24	5	33	1	4	2	2	0	9
+34	9	5	33	150	16.67	7	17	22	15	5	33	3	4	1	1	0	9
+35	9	13	33	217	24.11	21	24	29	8	13	33	1	4	1	3	0	9
+36	9	5	33	195	21.67	18	21	32	14	5	33	3	2	1	3	0	9
Binary file test-data/fastq_quality_boxplot-out1.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/fastq_stats1.out	Tue May 08 12:49:29 2018 -0400
@@ -0,0 +1,37 @@
+column	count	min	max	sum	mean	Q1	med	Q3	IQR	lW	rW	A_Count	C_Count	G_Count	T_Count	N_Count	Max_count
+1	9	23	34	288	32.00	33	33	33	0	33	33	3	1	4	1	0	9
+2	9	28	33	287	31.89	31	33	33	2	28	33	3	3	2	1	0	9
+3	9	13	34	268	29.78	28	33	33	5	21	34	5	1	0	3	0	9
+4	9	17	33	261	29.00	30	33	33	3	26	33	1	2	3	3	0	9
+5	9	22	33	269	29.89	30	33	33	3	26	33	3	3	3	0	0	9
+6	9	22	33	277	30.78	30	33	33	3	26	33	5	3	0	1	0	9
+7	9	21	33	258	28.67	24	33	33	9	21	33	4	1	3	1	0	9
+8	9	12	33	263	29.22	32	33	33	1	31	33	2	1	1	5	0	9
+9	9	29	33	290	32.22	33	33	33	0	33	33	3	3	2	1	0	9
+10	9	23	33	277	30.78	32	33	33	1	31	33	1	4	2	2	0	9
+11	9	12	33	245	27.22	21	31	33	12	12	33	5	2	1	1	0	9
+12	9	13	33	214	23.78	15	24	33	18	13	33	2	4	2	1	0	9
+13	9	5	33	249	27.67	29	31	33	4	23	33	2	1	1	5	0	9
+14	9	5	33	233	25.89	24	33	33	9	11	33	3	3	2	1	0	9
+15	9	15	33	251	27.89	24	33	33	9	15	33	5	1	1	2	0	9
+16	9	23	34	269	29.89	24	33	33	9	23	34	3	1	2	3	0	9
+17	9	13	34	266	29.56	33	33	33	0	33	33	2	3	1	3	0	9
+18	9	21	34	272	30.22	31	33	33	2	28	34	0	5	1	3	0	9
+19	9	5	34	244	27.11	27	30	33	6	18	34	4	4	1	0	0	9
+20	9	11	34	241	26.78	23	32	33	10	11	34	3	4	2	0	0	9
+21	9	13	33	240	26.67	24	27	33	9	13	33	1	4	0	4	0	9
+22	9	5	33	190	21.11	13	21	33	20	5	33	1	4	0	3	1	9
+23	9	5	33	205	22.78	16	26	33	17	5	33	4	4	1	0	0	9
+24	9	5	33	247	27.44	28	31	33	5	21	33	1	5	1	2	0	9
+25	9	11	34	241	26.78	24	33	33	9	11	34	3	4	0	2	0	9
+26	9	5	33	212	23.56	18	31	33	15	5	33	0	6	0	3	0	9
+27	9	5	33	227	25.22	21	26	33	12	5	33	3	4	1	1	0	9
+28	9	21	33	255	28.33	24	31	33	9	21	33	2	4	3	0	0	9
+29	9	5	33	228	25.33	21	30	33	12	5	33	2	4	1	2	0	9
+30	9	10	33	213	23.67	16	28	33	17	10	33	3	4	2	0	0	9
+31	9	5	33	236	26.22	21	31	33	12	5	33	1	4	1	3	0	9
+32	9	5	33	210	23.33	12	29	33	21	5	33	3	3	0	3	0	9
+33	9	5	33	183	20.33	9	21	33	24	5	33	1	4	2	2	0	9
+34	9	5	33	150	16.67	7	17	22	15	5	33	3	4	1	1	0	9
+35	9	13	33	217	24.11	21	24	29	8	13	33	1	4	1	3	0	9
+36	9	5	33	195	21.67	18	21	32	14	5	33	3	2	1	3	0	9
--- a/tool_dependencies.xml	Mon Jul 21 15:09:50 2014 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<?xml version="1.0"?>
-<tool_dependency>
-    <package name="fastx_toolkit" version="0.0.13">
-        <repository changeset_revision="e76e81b3eccf" name="package_fastx_toolkit_0_0_13" owner="devteam" toolshed="http://testtoolshed.g2.bx.psu.edu" />
-    </package>
-</tool_dependency>