Mercurial > repos > devteam > fastq_to_fasta
changeset 2:ce309f4ff17f draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/fastx_toolkit/fastq_to_fasta commit bbb2e6b6769b03602a8ab97001f88fbec52080a1
author | iuc |
---|---|
date | Tue, 08 May 2018 13:26:51 -0400 |
parents | 186b8d913e6c |
children | 02a5f43cd5d1 |
files | fastq_to_fasta.xml macros.xml test-data/fastq_to_fasta-in2.fastq test-data/fastq_to_fasta-out2.out tool_dependencies.xml |
diffstat | 5 files changed, 167 insertions(+), 56 deletions(-) [+] |
line wrap: on
line diff
--- a/fastq_to_fasta.xml Wed Nov 11 12:38:08 2015 -0500 +++ b/fastq_to_fasta.xml Tue May 08 13:26:51 2018 -0400 @@ -1,52 +1,54 @@ -<tool id="cshl_fastq_to_fasta" name="FASTQ to FASTA" version="1.0.0"> - <description>converter</description> - <requirements> - <requirement type="package" version="0.0.13">fastx_toolkit</requirement> - </requirements> - <command>gunzip -cf $input | fastq_to_fasta $SKIPN $RENAMESEQ -o $output -v -#if $input.ext == "fastqsanger": --Q 33 -#end if - </command> - - <inputs> - <param format="fastqsanger,fastqsolexa,fastqillumina" name="input" type="data" label="FASTQ Library to convert" /> - - <param name="SKIPN" type="select" label="Discard sequences with unknown (N) bases "> - <option value="">yes</option> - <option value="-n">no</option> - </param> - - <param name="RENAMESEQ" type="select" label="Rename sequence names in output file (reduces file size)"> - <option value="-r">yes</option> - <option value="">no</option> - </param> - - </inputs> - - <tests> - <test> - <!-- FASTQ-To-FASTA, keep N, don't rename --> - <param name="input" value="fastq_to_fasta1.fastq" ftype="fastqsolexa" /> - <param name="SKIPN" value=""/> - <param name="RENAMESEQ" value=""/> - <output name="output" file="fastq_to_fasta1a.out" /> - </test> - <test> - <!-- FASTQ-To-FASTA, discard N, rename --> - <param name="input" value="fastq_to_fasta1.fastq" ftype="fastqsolexa" /> - <param name="SKIPN" value="no"/> - <param name="RENAMESEQ" value="yes"/> - <output name="output" file="fastq_to_fasta1b.out" /> - </test> - </tests> - - <outputs> - <data format="fasta" name="output" metadata_source="input" /> - </outputs> - -<help> - +<tool id="cshl_fastq_to_fasta" name="FASTQ to FASTA" version="1.0.1"> + <description>converter from FASTX-toolkit</description> + <macros> + <import>macros.xml</import> + </macros> + <expand macro="requirements" /> + <command detect_errors="exit_code"><![CDATA[ +@CATS@ fastq_to_fasta +$SKIPN +$RENAMESEQ +-o '$output' +-v @FQQUAL@ + ]]></command> + <inputs> + <expand macro="fastq_input" /> + <param name="SKIPN" type="select" label="Discard sequences with unknown (N) bases "> + <option value="">yes</option> + <option value="-n">no</option> + </param> + <param name="RENAMESEQ" type="select" label="Rename sequence names in output file (reduces file size)"> + <option value="-r">yes</option> + <option value="">no</option> + </param> + </inputs> + <outputs> + <data name="output" format="fasta" metadata_source="input" /> + </outputs> + <tests> + <test> + <!-- FASTQ-To-FASTA, keep N, don't rename --> + <param name="input" value="fastq_to_fasta1.fastq" ftype="fastqsolexa" /> + <param name="SKIPN" value=""/> + <param name="RENAMESEQ" value=""/> + <output name="output" file="fastq_to_fasta1a.out" /> + </test> + <test> + <!-- FASTQ-To-FASTA, discard N, rename --> + <param name="input" value="fastq_to_fasta1.fastq" ftype="fastqsolexa" /> + <param name="SKIPN" value="no"/> + <param name="RENAMESEQ" value="yes"/> + <output name="output" file="fastq_to_fasta1b.out" /> + </test> + <test> + <!-- FASTQ-To-FASTA, discard N, rename --> + <param name="input" value="fastq_to_fasta-in2.fastq" ftype="fastqsanger" /> + <param name="SKIPN" value="no"/> + <param name="RENAMESEQ" value="yes"/> + <output name="output" file="fastq_to_fasta-out2.out" /> + </test> + </tests> + <help><![CDATA[ **What it does** This tool converts data from Solexa format to FASTA format (scroll down for format description). @@ -77,6 +79,7 @@ This tool is based on `FASTX-toolkit`__ by Assaf Gordon. .. __: http://hannonlab.cshl.edu/fastx_toolkit/ -</help> + ]]></help> + <expand macro="citations" /> <!-- FASTQ-to-FASTA 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:26:51 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_to_fasta-in2.fastq Tue May 08 13:26:51 2018 -0400 @@ -0,0 +1,40 @@ +@CSHL_3_FC0420AGLLKK:2:1:233:1674 +GTTAGAGGGAATACACCCACTCTGTAGGCACCATC ++CSHL_3_FC0420AGLLKK:2:1:233:1674 +40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 32 40 40 40 40 16 20 25 9 21 37 40 40 16 29 26 30 +@CSHL_3_FC0420AGLLKK:2:1:136:448 +GTTCTCAGGACCCCTTCAGTAGTNGGCACCATCAA ++CSHL_3_FC0420AGLLKK:2:1:136:448 +40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 -5 13 17 28 40 40 8 17 27 8 13 10 +@CSHL_3_FC0420AGLLKK:2:1:237:1037 +GTGATAGATTGTCTTGTTGTTCTGTAGGCACCATC ++CSHL_3_FC0420AGLLKK:2:1:237:1037 +40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 4 40 40 26 35 40 38 40 6 40 40 0 3 26 32 27 14 11 26 11 +@CSHL_3_FC0420AGLLKK:2:1:1805:1464 +GATGCGTTCGAGATGGGTGCGCTGTAGGCACCATC ++CSHL_3_FC0420AGLLKK:2:1:1805:1464 +40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 16 23 28 40 21 40 9 37 13 20 21 7 11 14 14 6 23 10 +@CSHL_3_FC0420AGLLKK:2:1:126:1087 +GAGATATTCGAATGCATCATCAGATGGCACCATCA ++CSHL_3_FC0420AGLLKK:2:1:126:1087 +40 40 40 40 40 40 40 40 40 40 40 40 40 40 25 40 40 40 40 40 40 40 31 40 40 11 10 23 40 13 12 17 37 17 22 +@CSHL_3_FC0420AGLLKK:2:1:1488:1323 +GTTTTTTCCCCTAATCTGAGTCTGTAGGCACCATC ++CSHL_3_FC0420AGLLKK:2:1:1488:1323 +40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 39 22 31 40 40 12 29 22 0 7 12 8 18 7 3 18 9 +@CSHL_3_FC0420AGLLKK:2:1:913:199 +GTTCAGTGTTGGTGCACTGTGTTNTAGGCACCATC ++CSHL_3_FC0420AGLLKK:2:1:913:199 +40 40 39 40 40 40 40 40 40 40 40 40 4 40 40 24 34 20 33 21 36 32 40 -5 40 13 21 21 26 17 18 25 14 25 21 +@CSHL_3_FC0420AGLLKK:2:1:928:765 +GTTTTCAGTTCGAGGTTCGTGCTNTAGGCATTATC ++CSHL_3_FC0420AGLLKK:2:1:928:765 +40 40 40 40 40 40 40 40 40 40 40 40 40 25 27 40 37 35 27 40 40 17 40 -5 36 11 19 15 19 16 11 12 12 23 11 +@CSHL_3_FC0420AGLLKK:2:1:727:1020 +GTAATATAGTTGATAAGAATCTGCAGAGAGAATCA ++CSHL_3_FC0420AGLLKK:2:1:727:1020 +40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 30 40 40 24 18 38 33 26 16 23 22 16 18 +@CSHL_3_FC0420AGLLKK:2:1:758:1799 +GTAGAGACCCCCTAATAGAGTCTGTAGGCACCATC ++CSHL_3_FC0420AGLLKK:2:1:758:1799 +40 40 40 40 40 40 40 40 35 40 39 40 40 27 20 40 17 34 15 40 40 40 40 15 28 17 4 12 10 10 18 14 3 14 11
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/fastq_to_fasta-out2.out Tue May 08 13:26:51 2018 -0400 @@ -0,0 +1,20 @@ +>1 +GTTAGAGGGAATACACCCACTCTGTAGGCACCATC +>2 +GTTCTCAGGACCCCTTCAGTAGTNGGCACCATCAA +>3 +GTGATAGATTGTCTTGTTGTTCTGTAGGCACCATC +>4 +GATGCGTTCGAGATGGGTGCGCTGTAGGCACCATC +>5 +GAGATATTCGAATGCATCATCAGATGGCACCATCA +>6 +GTTTTTTCCCCTAATCTGAGTCTGTAGGCACCATC +>7 +GTTCAGTGTTGGTGCACTGTGTTNTAGGCACCATC +>8 +GTTTTCAGTTCGAGGTTCGTGCTNTAGGCATTATC +>9 +GTAATATAGTTGATAAGAATCTGCAGAGAGAATCA +>10 +GTAGAGACCCCCTAATAGAGTCTGTAGGCACCATC
--- a/tool_dependencies.xml Wed Nov 11 12:38:08 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>