Mercurial > repos > devteam > fastx_barcode_splitter
changeset 5:4bedca26c133 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/fastx_toolkit/fastx_barcode_splitter commit b2735803f9719ff955a49a5bde54a211d6d48bb5
author | iuc |
---|---|
date | Thu, 11 Oct 2018 09:35:51 -0400 |
parents | 015dc921d814 |
children | 0b7ec11b3c7c |
files | fastx_barcode_splitter.xml macros.xml test-data/fastx_barcode_splitter1.fastq.gz |
diffstat | 3 files changed, 39 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/fastx_barcode_splitter.xml Tue May 08 13:27:14 2018 -0400 +++ b/fastx_barcode_splitter.xml Thu Oct 11 09:35:51 2018 -0400 @@ -8,7 +8,18 @@ mkdir split && @CATS@ '$__tool_directory__/fastx_barcode_splitter.pl' --bcfile '$BARCODE' --prefix 'split/' ---suffix '.$input.extension' +--suffix +#if $input.is_of_type('fastqsanger', 'fastqsanger.gz', 'fastqsanger.bz2'): + '.fastqsanger' +#elif $input.is_of_type('fastqsolexa', 'fastqsolexa.gz', 'fastqsolexa.bz2'): + '.fastqsolexa' +#elif $input.is_of_type('fastqillumina', 'fastqillumina.gz', 'fastqillumina.bz2'): + '.fastqillumina' +#elif $input.is_of_type('fasta', 'fasta.gz'): + '.fasta' +#else: + '.$input.extension' +#end if --mismatches $mismatches --partial $partial #if $refBarcodeLocation.barcodeLocation == "idxfile": @@ -21,8 +32,7 @@ ]]></command> <inputs> <param name="BARCODE" type="data" format="txt" label="Barcodes to use" /> - <param name="input" type="data" format="fasta,fastq,fastqsanger,fastqsolexa,fastqillumina" label="Library to split" /> - + <param name="input" type="data" format="@FASTAS@,@FASTQS@,fastq" label="Library to split" /> <conditional name="refBarcodeLocation"> <param name="barcodeLocation" type="select" label="Barcodes found at"> <option value="bol">Start of sequence (5' end)</option> @@ -46,7 +56,7 @@ <outputs> <data name="summary" format="tabular" label="${tool.name} on ${on_string}: Summary" /> - <collection name="split_output" type="list" format_source="input" label="${tool.name} on ${on_string}"> + <collection name="split_output" type="list" label="${tool.name} on ${on_string}"> <discover_datasets pattern="__designation_and_ext__" directory="split" visible="false" /> </collection> </outputs> @@ -68,6 +78,23 @@ <element name="unmatched" ftype="fastqsolexa" file="fastx_barcode_splitter1_unmatched.out" /> </output_collection> </test> + + <test> + <!-- Split a FASTQ.gz file --> + <param name="BARCODE" value="fastx_barcode_splitter1.txt" /> + <param name="input" value="fastx_barcode_splitter1.fastq.gz" ftype="fastqsolexa.gz" /> + <param name="barcodeLocation" value="bol" /> + <param name="mismatches" value="2" /> + <param name="partial" value="0" /> + <output name="summary" file="fastx_barcode_splitter1.out" /> + <output_collection name="split_output" type="list"> + <element name="BC1" ftype="fastqsolexa" file="fastx_barcode_splitter1_BC1.out" /> + <element name="BC2" ftype="fastqsolexa" file="fastx_barcode_splitter1_BC2.out" /> + <element name="BC3" ftype="fastqsolexa" file="fastx_barcode_splitter1_BC3.out" /> + <element name="BC4" ftype="fastqsolexa" file="fastx_barcode_splitter1_BC4.out" /> + <element name="unmatched" ftype="fastqsolexa" file="fastx_barcode_splitter1_unmatched.out" /> + </output_collection> + </test> <test> <!-- Split a FASTQ file, using separate index read -->
--- a/macros.xml Tue May 08 13:27:14 2018 -0400 +++ b/macros.xml Thu Oct 11 09:35:51 2018 -0400 @@ -2,7 +2,7 @@ <macros> <token name="@CATS@"> #if $input.is_of_type('fasta.gz', 'fastqsanger.gz', 'fastqsolexa.gz', 'fastqillumina.gz'): - zcat -f '$input' | + gunzip -c -f '$input' | #elif $input.is_of_type('fastqsanger.bz2', 'fastqsolexa.bz2', 'fastqillumina.bz2'): bzcat -f '$input' | #else: @@ -18,6 +18,13 @@ #end if ]]> </token> + <token name="@GZIP@"> + <![CDATA[ + #if $input.is_of_type('fasta.gz', 'fastqsanger.gz', 'fastqsolexa.gz', 'fastqillumina.gz'): + -z + #end if + ]]> + </token> <xml name="requirements"> <requirements> <requirement type="package" version="@VERSION@">fastx_toolkit</requirement>