Mercurial > repos > iuc > samtools_ampliconclip
changeset 5:f20b704ba069 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_ampliconclip commit 2f49183ddc89c7753d447c1dc40597d4a32eadfb
author | iuc |
---|---|
date | Fri, 27 Jun 2025 10:55:12 +0000 |
parents | f597cb9b33bf |
children | |
files | macros.xml samtools_ampliconclip.xml test-data/eboVir3.primer_counts.txt test-data/rebuild_output_bams.sh |
diffstat | 4 files changed, 26 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/macros.xml Thu Jun 19 12:58:20 2025 +0000 +++ b/macros.xml Fri Jun 27 10:55:12 2025 +0000 @@ -11,7 +11,7 @@ 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.21</token> + <token name="@TOOL_VERSION@">1.22</token> <token name="@VERSION_SUFFIX@">0</token> <token name="@PROFILE@">22.05</token> <token name="@FLAGS@"><![CDATA[
--- a/samtools_ampliconclip.xml Thu Jun 19 12:58:20 2025 +0000 +++ b/samtools_ampliconclip.xml Fri Jun 27 10:55:12 2025 +0000 @@ -19,6 +19,9 @@ -u $both_ends $no_excluded + #if $write_primer_counts: + --primer-counts '${primer_counts}' + #end if -@ \$addthreads '${input_bam}' | samtools collate -@ \$addthreads -O -u - @@ -28,40 +31,43 @@ <inputs> <param name="input_bed" type="data" format="bed" label="Genetic intervals (in BED format)" /> <param name="input_bam" type="data" format="bam" label="BAM file" /> - <param name="hard_clip_mode" argument="--hard-clip" type="boolean" checked="false" truevalue="--hard-clip" falsevalue="--soft-clip" label="hard clip" help="hard clip (remove bases), unchekced = default soft-clipping" /> + <param name="hard_clip_mode" argument="--hard-clip" type="boolean" checked="false" truevalue="--hard-clip" falsevalue="--soft-clip" label="hard clip" help="hard clip (remove bases), unchecked = default soft-clipping" /> <param argument="--strand" type="boolean" checked="false" truevalue="--strand" falsevalue="" label="only clip reads that match bed file strand annotation" /> <param argument="--both-ends" type="boolean" checked="false" truevalue="--both-ends" falsevalue="" label="clip both ends of reads (false = 5' only)" /> <param argument="--no-excluded" type="boolean" checked="false" truevalue="--no-excluded" falsevalue="" label="don't write excluded reads to output (default = write all)" /> <param name="min_length" argument="--fail-len" type="integer" min="0" optional="true" label="Min Read length" help="mark reads QCFAIL at this length or shorter after clipping" /> <param argument="--tolerance" type="integer" value="5" min="0" label="Tolerance" help="match region within this number of bases, default 5." /> - + <param name="write_primer_counts" type="boolean" checked="false" truevalue="true" falsevalue="false" label="Write primer counts" help="If enabled, write primer counts to output file." /> </inputs> <outputs> <data name="output_bam" format="bam" /> + <data name="primer_counts" format="bedgraph" label="${tool.name} on ${on_string}: Primer counts"> + <filter>write_primer_counts</filter> + </data> </outputs> <tests> <!-- 1) --> - <test> + <test expect_num_outputs="1"> <param name="input_bed" value="eboVir3.1.bed" ftype="bed" /> <param name="input_bam" value="eboVir3.bam" ftype="bam" /> <output name="output_bam" file="eboVir3.clipped.bam" ftype="bam" lines_diff="22" /> </test> <!-- 2) testing strand --> - <test> + <test expect_num_outputs="1"> <param name="input_bed" value="eboVir3.1.bed" ftype="bed" /> <param name="input_bam" value="eboVir3.bam" ftype="bam" /> <param name="strand" value="true" /> <output name="output_bam" file="eboVir3.clipped.strand.bam" ftype="bam" lines_diff="16" /> </test> <!-- 3) testing hard clip--> - <test> + <test expect_num_outputs="1"> <param name="input_bed" value="eboVir3.1.bed" ftype="bed" /> <param name="input_bam" value="eboVir3.bam" ftype="bam" /> <param name="hard_clip_mode" value="true" /> <output name="output_bam" file="eboVir3.hardclipped.bam" ftype="bam" lines_diff="14" /> </test> <!-- 4) testing strand and min length--> - <test> + <test expect_num_outputs="1"> <param name="input_bed" value="eboVir3.1.bed" ftype="bed" /> <param name="input_bam" value="eboVir3.bam" ftype="bam" /> <param name="min_length" value="30" /> @@ -71,7 +77,14 @@ <param name="no_excluded" value="true" /> <output name="output_bam" file="eboVir3.clipped.strand_gt30.bam" ftype="bam" lines_diff="13" /> </test> - + <!-- 5) testing write_primer_counts --> + <test expect_num_outputs="2"> + <param name="input_bed" value="eboVir3.1.bed" ftype="bed" /> + <param name="input_bam" value="eboVir3.bam" ftype="bam" /> + <param name="write_primer_counts" value="true" /> + <output name="output_bam" file="eboVir3.clipped.bam" ftype="bam" lines_diff="22" /> + <output name="primer_counts" file="eboVir3.primer_counts.txt" ftype="bedgraph" /> + </test> </tests> <help> **What it does**
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/eboVir3.primer_counts.txt Fri Jun 27 10:55:12 2025 +0000 @@ -0,0 +1,4 @@ +#CHR LEFT RIGHT NAME SCORE STRAND NUM_CLIPPED +eboVir3 500 1500 1 0 . 115 +eboVir3 1500 2000 2 0 . 20 +eboVir3 1500 3000 3 0 . 119
--- a/test-data/rebuild_output_bams.sh Thu Jun 19 12:58:20 2025 +0000 +++ b/test-data/rebuild_output_bams.sh Fri Jun 27 10:55:12 2025 +0000 @@ -1,4 +1,4 @@ -samtools ampliconclip -b eboVir3.1.bed eboVir3.bam | samtools collate -@ 0 -O -u - | samtools fixmate -@ 0 -u - - | samtools sort -o eboVir3.clipped.bam +samtools ampliconclip -b eboVir3.1.bed --primer-counts eboVir3.primer_counts.txt eboVir3.bam | samtools collate -@ 0 -O -u - | samtools fixmate -@ 0 -u - - | samtools sort -o eboVir3.clipped.bam samtools ampliconclip --strand -b eboVir3.1.bed eboVir3.bam | samtools collate -@ 0 -O -u - | samtools fixmate -@ 0 -u - - | samtools sort -o eboVir3.clipped.strand.bam samtools ampliconclip --hard-clip -b eboVir3.1.bed eboVir3.bam | samtools collate -@ 0 -O -u - | samtools fixmate -@ 0 -u - - | samtools sort -o eboVir3.hardclipped.bam samtools ampliconclip --both-ends --no-excluded --strand --fail-len 30 -b eboVir3.1.bed eboVir3.bam | samtools collate -@ 0 -O -u - | samtools fixmate -@ 0 -u - - | samtools sort -o eboVir3.clipped.strand_gt30.bam