Mercurial > repos > iuc > samtools_fastx
changeset 4:66e23b11feae draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_fastx commit cd62639660bef041ba14ecff337fb98e84e75d8a
author | iuc |
---|---|
date | Mon, 20 Nov 2023 22:15:18 +0000 |
parents | b3d99709fe1a |
children | b906586a6596 |
files | macros.xml samtools_fastx.xml test-data/11.i.fq.expected test-data/11.i2.fq.expected test-data/8.i2.fq.expected |
diffstat | 3 files changed, 54 insertions(+), 58 deletions(-) [+] |
line wrap: on
line diff
--- a/macros.xml Mon Aug 15 09:16:56 2022 +0000 +++ b/macros.xml Mon Nov 20 22:15:18 2023 +0000 @@ -5,7 +5,14 @@ <yield/> </requirements> </xml> + <!-- NOTE: for some tools only the version of the requirement but not the + tool's version is controlled by the TOOL_VERSION token + (because their version is ahead of the requirement version .. + please only bump the minor version in order to let the requirement + version catch up eventually). To find the tools check: + `grep "<tool" . -r | grep -v VERSION_SUFFIX | cut -d":" -f 1` --> <token name="@TOOL_VERSION@">1.15.1</token> + <token name="@VERSION_SUFFIX@">2</token> <token name="@PROFILE@">20.05</token> <token name="@FLAGS@"><![CDATA[ #set $flags = 0 @@ -212,37 +219,7 @@ <xml name="citations"> <citations> - <citation type="bibtex"> - @misc{SAM_def, - title={Definition of SAM/BAM format}, - url = {https://samtools.github.io/hts-specs/},} - </citation> - <citation type="doi">10.1093/bioinformatics/btp352</citation> - <citation type="doi">10.1093/bioinformatics/btr076</citation> - <citation type="doi">10.1093/bioinformatics/btr509</citation> - <citation type="bibtex"> - @misc{Danecek_et_al, - Author={Danecek, P., Schiffels, S., Durbin, R.}, - title={Multiallelic calling model in bcftools (-m)}, - url = {http://samtools.github.io/bcftools/call-m.pdf},} - </citation> - <citation type="bibtex"> - @misc{Durbin_VCQC, - Author={Durbin, R.}, - title={Segregation based metric for variant call QC}, - url = {http://samtools.github.io/bcftools/rd-SegBias.pdf},} - </citation> - <citation type="bibtex"> - @misc{Li_SamMath, - Author={Li, H.}, - title={Mathematical Notes on SAMtools Algorithms}, - url = {http://www.broadinstitute.org/gatk/media/docs/Samtools.pdf},} - </citation> - <citation type="bibtex"> - @misc{SamTools_github, - title={SAMTools GitHub page}, - url = {https://github.com/samtools/samtools},} - </citation> + <citation type="doi">10.1093/gigascience/giab008</citation> </citations> </xml> <xml name="version_command">
--- a/samtools_fastx.xml Mon Aug 15 09:16:56 2022 +0000 +++ b/samtools_fastx.xml Mon Nov 20 22:15:18 2023 +0000 @@ -1,4 +1,4 @@ -<tool id="samtools_fastx" name="Samtools fastx" version="@TOOL_VERSION@+galaxy0" profile="@PROFILE@"> +<tool id="samtools_fastx" name="Samtools fastx" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> <description>extract FASTA or FASTQ from alignment files</description> <macros> <import>macros.xml</import> @@ -160,7 +160,7 @@ <when value="yes"> <param name="write1st" argument="--i1" type="boolean" truevalue="yes" falsevalue="no" checked="true" label="write first index reads to extra data set" /> <param name="write2nd" argument="--i2" type="boolean" truevalue="yes" falsevalue="no" checked='true' label="write second index reads to extra data set" /> - <param name="index_format" argument="--index-format" type="text" label="Index format: How to parse barcode and quality tags"> + <param argument="--index-format" type="text" label="Index format: How to parse barcode and quality tags"> <help> The index-format string describes how to parse the barcode and quality tags, for example: i14i8 the first 14 characters are index 1, the next 8 characters are index 2 @@ -171,8 +171,8 @@ of the tag as index 1 </help> </param> - <param name="barcode_tag" argument="--barcode-tag" type="text" optional="True" label="Barcode tag [default: BC]"/> - <param name="quality_tag" argument="--quality-tag" type="text" optional="True" label="Quality tag [default: QT]"/> + <param argument="--barcode-tag" type="text" optional="True" label="Barcode tag [default: BC]"/> + <param argument="--quality-tag" type="text" optional="True" label="Quality tag [default: QT]"/> </when> </conditional> </inputs> @@ -236,7 +236,7 @@ </outputs> <tests> <!-- tests from original Galaxy tool --> - <test> + <test expect_num_outputs="1"> <param name="input" value="samtools_fastx-in1.bam" ftype="bam" /> <conditional name="output_fmt_cond"> <param name="output_fmt_select" value="fasta" /> @@ -244,7 +244,7 @@ <param name="outputs" value="other" /> <output name="output" file="samtools_fastx-out1.fasta" ftype="fasta" /> </test> - <test> + <test expect_num_outputs="3"> <param name="input" value="samtools_fastx-in2.bam" ftype="bam" /> <conditional name="output_fmt_cond"> <param name="output_fmt_select" value="fastqsanger" /> @@ -254,7 +254,7 @@ <output name="forward" file="samtools_fastx-out2-2.fastq" ftype="fastqsanger" /> <output name="reverse" file="samtools_fastx-out2-3.fastq" ftype="fastqsanger" /> </test> - <test> + <test expect_num_outputs="3"> <param name="input" value="samtools_fastx-in3.sam" ftype="sam" /> <conditional name="output_fmt_cond"> <param name="output_fmt_select" value="fasta" /> @@ -267,7 +267,7 @@ <!-- tests from original Galaxy tool with gz output. for some reason gzip (which is used for compressing stdout does not give exactly the same file contents .. the other compressed files seem to)--> - <test> + <test expect_num_outputs="1"> <param name="input" value="samtools_fastx-in1.bam" ftype="bam" /> <conditional name="output_fmt_cond"> <param name="output_fmt_select" value="fasta.gz" /> @@ -275,7 +275,7 @@ <param name="outputs" value="other" /> <output name="output" file="samtools_fastx-out1.fasta.gz" ftype="fasta.gz" decompress="true"/> </test> - <test> + <test expect_num_outputs="3"> <param name="input" value="samtools_fastx-in2.bam" ftype="bam" /> <conditional name="output_fmt_cond"> <param name="output_fmt_select" value="fastqsanger.gz" /> @@ -285,7 +285,7 @@ <output name="forward" file="samtools_fastx-out2-2.fastq.gz" ftype="fastqsanger.gz" decompress="true" /> <output name="reverse" file="samtools_fastx-out2-3.fastq.gz" ftype="fastqsanger.gz" decompress="true" /> </test> - <test> + <test expect_num_outputs="3"> <param name="input" value="samtools_fastx-in3.sam" ftype="sam" /> <conditional name="output_fmt_cond"> <param name="output_fmt_select" value="fasta.gz" /> @@ -298,7 +298,7 @@ <!-- tests from: https://github.com/samtools/samtools/blob/6d79411685d8f0fbb34e123f52d72b63271f4dcb/test/test.pl#L2313--> <!--# basic 2 output test without singleton tracking--> <!--test_cmd($opts, out=>'bam2fq/1.stdout.expected', out_map=>{'1.fq' => 'bam2fq/1.1.fq.expected', '2.fq' => 'bam2fq/1.2.fq.expected'},cmd=>"$$opts{bin}/samtools fastq @$threads -1 $$opts{path}/1.fq -2 $$opts{path}/2.fq $$opts{path}/dat/bam2fq.001.sam");--> - <test> + <test expect_num_outputs="3"> <param name="input" value="bam2fq.001.sam" ftype="sam" /> <conditional name="output_fmt_cond"> <param name="output_fmt_select" value="fastqsanger" /> @@ -310,7 +310,7 @@ </test> <!--# basic 2 output test with singleton tracking but no singleton--> <!--test_cmd($opts, out=>'bam2fq/2.stdout.expected', out_map=>{'1.fq' => 'bam2fq/2.1.fq.expected', '2.fq' => 'bam2fq/2.2.fq.expected', 's.fq' => 'bam2fq/2.s.fq.expected'}, cmd=>"$$opts{bin}/samtools fastq @$threads -s $$opts{path}/s.fq -1 $$opts{path}/1.fq -2 $$opts{path}/2.fq $$opts{path}/dat/bam2fq.001.sam");--> - <test> + <test expect_num_outputs="4"> <param name="input" value="bam2fq.001.sam" ftype="sam" /> <conditional name="output_fmt_cond"> <param name="output_fmt_select" value="fastqsanger" /> @@ -323,7 +323,7 @@ </test> <!--# basic 2 output test with singleton tracking with a singleton in the middle--> <!--test_cmd($opts, out=>'bam2fq/2.stdout.expected', out_map=>{'1.fq' => 'bam2fq/3.1.fq.expected', '2.fq' => 'bam2fq/3.2.fq.expected', 's.fq' => 'bam2fq/3.s.fq.expected'}, cmd=>"$$opts{bin}/samtools fastq @$threads -s $$opts{path}/s.fq -1 $$opts{path}/1.fq -2 $$opts{path}/2.fq $$opts{path}/dat/bam2fq.002.sam");--> - <test> + <test expect_num_outputs="4"> <param name="input" value="bam2fq.002.sam" ftype="sam" /> <conditional name="output_fmt_cond"> <param name="output_fmt_select" value="fastqsanger" /> @@ -336,7 +336,7 @@ </test> <!--# basic 2 output test with singleton tracking with a singleton as last read--> <!--test_cmd($opts, out=>'bam2fq/2.stdout.expected', out_map=>{'1.fq' => 'bam2fq/4.1.fq.expected', '2.fq' => 'bam2fq/4.2.fq.expected', 's.fq' => 'bam2fq/4.s.fq.expected'}, cmd=>"$$opts{bin}/samtools fastq @$threads -s $$opts{path}/s.fq -1 $$opts{path}/1.fq -2 $$opts{path}/2.fq $$opts{path}/dat/bam2fq.003.sam");--> - <test> + <test expect_num_outputs="4"> <param name="input" value="bam2fq.003.sam" ftype="sam" /> <conditional name="output_fmt_cond"> <param name="output_fmt_select" value="fastqsanger" /> @@ -349,7 +349,7 @@ </test> <!--# tag output test with singleton tracking with a singleton as last read--> <!--test_cmd($opts, out=>'bam2fq/2.stdout.expected', out_map=>{'1.fq' => 'bam2fq/4.1.fq.expected', '2.fq' => 'bam2fq/4.2.fq.expected', 's.fq' => 'bam2fq/4.s.fq.expected', 'bc.fq' => 'bam2fq/bc.fq.expected'}, cmd=>"$$opts{bin}/samtools fastq @$threads \-\-barcode-tag BC \-\-index-format 'n2i2' \-\-i1 $$opts{path}/bc.fq -s $$opts{path}/s.fq -1 $$opts{path}/1.fq -2 $$opts{path}/2.fq $$opts{path}/dat/bam2fq.004.sam");--> - <test> + <test expect_num_outputs="5"> <param name="input" value="bam2fq.004.sam" ftype="sam" /> <conditional name="output_fmt_cond"> <param name="output_fmt_select" value="fastqsanger" /> @@ -357,7 +357,8 @@ <param name="outputs" value="r1,r2,s,other" /> <conditional name="idxout_cond"> <param name="idxout_select" value="yes"/> - <param name="write1st" value="yes"/> + <param name="write1st" value="true"/> + <param name="write2nd" value="false"/> <param name="barcode_tag" value="BC"/> <param name="index_format" value="n2i2"/> </conditional> @@ -369,7 +370,7 @@ </test> <!--# test -O flag with no OQ tags--> <!--test_cmd($opts, out=>'bam2fq/2.stdout.expected', out_map=>{'1.fq' => 'bam2fq/4.1.fq.expected', '2.fq' => 'bam2fq/4.2.fq.expected', 's.fq' => 'bam2fq/4.s.fq.expected', 'bc.fq' => 'bam2fq/bc.fq.expected'}, cmd=>"$$opts{bin}/samtools fastq @$threads \-\-barcode-tag BC -O \-\-index-format 'n2i2' \-\-i1 $$opts{path}/bc.fq -s $$opts{path}/s.fq -1 $$opts{path}/1.fq -2 $$opts{path}/2.fq $$opts{path}/dat/bam2fq.004.sam");--> - <test> + <test expect_num_outputs="5"> <param name="input" value="bam2fq.010.sam" ftype="sam" /> <conditional name="output_fmt_cond"> <param name="output_fmt_select" value="fastqsanger" /> @@ -378,7 +379,8 @@ <param name="outputs" value="r1,r2,s,other" /> <conditional name="idxout_cond"> <param name="idxout_select" value="yes"/> - <param name="write1st" value="yes"/> + <param name="write1st" value="true"/> + <param name="write2nd" value="false"/> <param name="barcode_tag" value="BC"/> <param name="index_format" value="n2i2"/> </conditional> @@ -390,7 +392,7 @@ </test> <!--# test -O flag with OQ tags--> <!--test_cmd($opts, out=>'bam2fq/2.stdout.expected', out_map=>{'1.fq' => 'bam2fq/10.1.fq.expected', '2.fq' => 'bam2fq/10.2.fq.expected', 's.fq' => 'bam2fq/10.s.fq.expected', 'bc.fq' => 'bam2fq/bc10.fq.expected'}, cmd=>"$$opts{bin}/samtools fastq @$threads \-\-barcode-tag BC -O \-\-index-format 'n2i2' \-\-i1 $$opts{path}/bc.fq -s $$opts{path}/s.fq -1 $$opts{path}/1.fq -2 $$opts{path}/2.fq $$opts{path}/dat/bam2fq.010.sam");--> - <test> + <test expect_num_outputs="5"> <param name="input" value="bam2fq.010.sam" ftype="sam" /> <conditional name="output_fmt_cond"> <param name="output_fmt_select" value="fastqsanger" /> @@ -399,7 +401,8 @@ <param name="outputs" value="r1,r2,s,other" /> <conditional name="idxout_cond"> <param name="idxout_select" value="yes"/> - <param name="write1st" value="yes"/> + <param name="write1st" value="true"/> + <param name="write2nd" value="false"/> <param name="barcode_tag" value="BC"/> <param name="index_format" value="n2i2"/> </conditional> @@ -411,7 +414,7 @@ </test> <!--# tag output test with separators and -N flag--> <!--test_cmd($opts, out=>'bam2fq/2.stdout.expected', out_map=>{'1.fq' => 'bam2fq/5.1.fq.expected', '2.fq' => 'bam2fq/5.2.fq.expected', 's.fq' => 'bam2fq/5.s.fq.expected', 'bc_split.fq' => 'bam2fq/bc_split.fq.expected'}, cmd=>"$$opts{bin}/samtools fastq @$threads \-\-barcode-tag BC -N \-\-index-format 'n*i*' \-\-i1 $$opts{path}/bc_split.fq -s $$opts{path}/s.fq -1 $$opts{path}/1.fq -2 $$opts{path}/2.fq $$opts{path}/dat/bam2fq.005.sam");--> - <test> + <test expect_num_outputs="5"> <param name="input" value="bam2fq.005.sam" ftype="sam" /> <conditional name="output_fmt_cond"> <param name="output_fmt_select" value="fastqsanger" /> @@ -420,7 +423,8 @@ <param name="read_numbering" value="-N"/> <conditional name="idxout_cond"> <param name="idxout_select" value="yes"/> - <param name="write1st" value="yes"/> + <param name="write1st" value="true"/> + <param name="write2nd" value="false"/> <param name="barcode_tag" value="BC"/> <param name="index_format" value="n*i*"/> </conditional> @@ -432,7 +436,7 @@ </test> <!--# -t flag--> <!--test_cmd($opts, out=>'bam2fq/2.stdout.expected', out_map=>{'1.fq' => 'bam2fq/6.1.fq.expected', '2.fq' => 'bam2fq/6.2.fq.expected', 's.fq' => 'bam2fq/6.s.fq.expected'}, cmd=>"$$opts{bin}/samtools fastq @$threads -N -t -s $$opts{path}/s.fq -1 $$opts{path}/1.fq -2 $$opts{path}/2.fq $$opts{path}/dat/bam2fq.005.sam");--> - <test> + <test expect_num_outputs="4"> <param name="input" value="bam2fq.005.sam" ftype="sam" /> <conditional name="output_fmt_cond"> <param name="output_fmt_select" value="fastqsanger" /> @@ -447,7 +451,7 @@ </test> <!--# -T flag--> <!--test_cmd($opts, out=>'bam2fq/2.stdout.expected', out_map=>{'1.fq' => 'bam2fq/7.1.fq.expected', '2.fq' => 'bam2fq/7.2.fq.expected', 's.fq' => 'bam2fq/7.s.fq.expected'}, cmd=>"$$opts{bin}/samtools fastq @$threads -N -t -T MD,ia -s $$opts{path}/s.fq -1 $$opts{path}/1.fq -2 $$opts{path}/2.fq $$opts{path}/dat/bam2fq.005.sam");--> - <test> + <test expect_num_outputs="4"> <param name="input" value="bam2fq.005.sam" ftype="sam" /> <conditional name="output_fmt_cond"> <param name="output_fmt_select" value="fastqsanger" /> @@ -463,7 +467,7 @@ </test> <!--# -i flag with no index--> <!--test_cmd($opts, out=>'bam2fq/2.stdout.expected', out_map=>{'1.fq' => 'bam2fq/7.1.fq.expected', '2.fq' => 'bam2fq/7.2.fq.expected', 's.fq' => 'bam2fq/7.s.fq.expected'}, cmd=>"$$opts{bin}/samtools fastq @$threads -N -t -i -T MD,ia -s $$opts{path}/s.fq -1 $$opts{path}/1.fq -2 $$opts{path}/2.fq $$opts{path}/dat/bam2fq.005.sam");--> - <test> + <test expect_num_outputs="6"> <param name="input" value="bam2fq.005.sam" ftype="sam" /> <conditional name="output_fmt_cond"> <param name="output_fmt_select" value="fastqsanger" /> @@ -481,10 +485,12 @@ <output name="reverse" file="11.2.fq.expected" ftype="fastqsanger" /> <output name="singletons" file="11.s.fq.expected" ftype="fastqsanger" /> <output name="output" file="2.stdout.expected" ftype="fastqsanger" /> + <output name="i1" file="11.i.fq.expected" ftype="fastqsanger" /> + <output name="i2" file="11.i2.fq.expected" ftype="fastqsanger" /> </test> <!--# -i flag with index--> <!--test_cmd($opts, out=>'bam2fq/2.stdout.expected', out_map=>{'1.fq' => 'bam2fq/8.1.fq.expected', '2.fq' => 'bam2fq/8.2.fq.expected', 's.fq' => 'bam2fq/8.s.fq.expected', 'i.fq' => 'bam2fq/8.i.fq.expected'}, cmd=>"$$opts{bin}/samtools fastq @$threads \-\-barcode-tag BC -i \-\-index-format 'n2i2' \-\-i1 $$opts{path}/i.fq -s $$opts{path}/s.fq -1 $$opts{path}/1.fq -2 $$opts{path}/2.fq $$opts{path}/dat/bam2fq.004.sam");--> - <test> + <test expect_num_outputs="6"> <param name="input" value="bam2fq.004.sam" ftype="sam" /> <conditional name="output_fmt_cond"> <param name="output_fmt_select" value="fastqsanger" /> @@ -493,7 +499,7 @@ <param name="outputs" value="r1,r2,s,other" /> <conditional name="idxout_cond"> <param name="idxout_select" value="yes"/> - <param name="write1st" value="yes"/> + <param name="write1st" value="true"/> <param name="barcode_tag" value="BC"/> <param name="index_format" value="n2i2"/> </conditional> @@ -502,6 +508,7 @@ <output name="singletons" file="8.s.fq.expected" ftype="fastqsanger" /> <output name="output" file="2.stdout.expected" ftype="fastqsanger" /> <output name="i1" file="8.i.fq.expected" ftype="fastqsanger" /> + <output name="i2" file="8.i2.fq.expected" ftype="fastqsanger" /> </test> </tests> <help><![CDATA[
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/11.i.fq.expected Mon Nov 20 22:15:18 2023 +0000 @@ -0,0 +1,12 @@ +@ref1_grp1_p001/1 1:N:0:AC+GT MD:Z:10 RG:Z:grp1 BC:Z:AC-GT +NG ++ +"" +@ref1_grp1_p002/1 1:N:0:AATT+CCGG MD:Z:10 RG:Z:grp1 BC:Z:AATT+CCGG +TT ++ +"" +@ref1_grp2_p001/1 1:N:0:TG+CA MD:Z:8 RG:Z:grp2 BC:Z:TG+CA QT:Z:ab+cd +NC ++ ++c