changeset 4:21796f46e0ba draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/fastx_toolkit/fastx_nucleotides_distribution commit bbb2e6b6769b03602a8ab97001f88fbec52080a1
author iuc
date Tue, 08 May 2018 13:27:48 -0400
parents 18a51655db17
children ad116ae3f4d9
files fastx_nucleotides_distribution.xml macros.xml test-data/fastq_stats1.out test-data/fastx_nt_distribution.png test-data/fastx_nucleotides_distribution-in1.txt test-data/fastx_nucleotides_distribution-out1.png tool_dependencies.xml
diffstat 7 files changed, 157 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/fastx_nucleotides_distribution.xml	Wed Nov 11 12:39:18 2015 -0500
+++ b/fastx_nucleotides_distribution.xml	Tue May 08 13:27:48 2018 -0400
@@ -1,19 +1,28 @@
-<tool id="cshl_fastx_nucleotides_distribution" version="1.0.0" name="Draw nucleotides distribution chart">
-	<description></description>
-    <requirements>
-        <requirement type="package" version="0.0.13">fastx_toolkit</requirement>
-    </requirements>
-	<command>fastx_nucleotide_distribution_graph.sh -t '$input.name' -i $input -o $output</command>
-	
-	<inputs>
-		<param format="txt" name="input" type="data" label="Statistics Text File" help="output of 'FASTX Statistics' tool" />
-	</inputs>
-	
-	<outputs>
-		<data format="png" name="output" metadata_source="input" />
-	</outputs>
-<help>
-
+<tool id="cshl_fastx_nucleotides_distribution" version="1.0.1" name="Draw nucleotides distribution chart">
+    <description></description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
+    <command detect_errors="exit_code"><![CDATA[
+fastx_nucleotide_distribution_graph.sh
+-t '$input.name'
+-i '$input'
+-o '$output'
+    ]]></command>
+    <inputs>
+        <param name="input" type="data" format="txt" label="Statistics text file" help="Output of 'FASTX Statistics' tool" />
+    </inputs>
+    <outputs>
+        <data name="output" format="png" metadata_source="input" />
+    </outputs>
+    <tests>
+        <test>
+            <param name="input" value="fastx_nucleotides_distribution-in1.txt" />
+            <output name="output" file="fastx_nucleotides_distribution-out1.png" compare="sim_size" delta="512" />
+        </test>
+    </tests>
+    <help><![CDATA[
 **What it does**
 
 Creates a stacked-histogram graph for the nucleotide distribution in the Solexa library.
@@ -29,7 +38,7 @@
 The following chart clearly shows the barcode used at the 5'-end of the library: **GATCT**
 
 .. image:: fastq_nucleotides_distribution_1.png
- 
+
 In the following chart, one can almost 'read' the most abundant sequence by looking at the dominant values: **TGATA TCGTA TTGAT GACTG AA...**
 
 .. image:: fastq_nucleotides_distribution_2.png
@@ -47,7 +56,7 @@
 This tool is based on `FASTX-toolkit`__ by Assaf Gordon.
 
  .. __: http://hannonlab.cshl.edu/fastx_toolkit/
-
-</help>
-<!-- FASTQ-Nucleotides-Distribution is part of the FASTX-toolkit, by A.Gordon (gordon@cshl.edu) -->
+    ]]></help>
+    <expand macro="citations" />
+    <!-- FASTQ-Nucleotides-Distribution 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 13:27:48 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_stats1.out	Tue May 08 13:27:48 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/fastx_nt_distribution.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/fastx_nucleotides_distribution-in1.txt	Tue May 08 13:27:48 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/fastx_nucleotides_distribution-out1.png has changed
--- a/tool_dependencies.xml	Wed Nov 11 12:39:18 2015 -0500
+++ /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="ec66ae4c269b" name="package_fastx_toolkit_0_0_13" owner="devteam" toolshed="https://toolshed.g2.bx.psu.edu" />
-    </package>
-</tool_dependency>