Mercurial > repos > iuc > bedtools
diff coverageBed.xml @ 34:dde39ba9c031 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b68002321ade5e160c556517a98ffb70f068be95
author | iuc |
---|---|
date | Mon, 29 Apr 2019 05:55:48 -0400 |
parents | 4f7a5ccd2ae9 |
children | b28e0cfa7ba1 |
line wrap: on
line diff
--- a/coverageBed.xml Mon Dec 17 14:23:31 2018 -0500 +++ b/coverageBed.xml Mon Apr 29 05:55:48 2019 -0400 @@ -1,4 +1,4 @@ -<tool id="bedtools_coveragebed" name="bedtools Compute both the depth and breadth of coverage" version="@WRAPPER_VERSION@"> +<tool id="bedtools_coveragebed" name="bedtools Compute both the depth and breadth of coverage" version="@TOOL_VERSION@+galaxy1"> <description>of features in file B on the features in file A (bedtools coverage)</description> <macros> <import>macros.xml</import> @@ -7,87 +7,75 @@ <requirement type="package" version="@SAMTOOLS_VERSION@">samtools</requirement> </expand> <expand macro="stdio" /> - <command> -<![CDATA[ - bedtools coverage - $d - $hist - $split - $strandedness - #if str($overlap_a) != "None" and str($overlap_a): - -f '$overlap_a' - #end if - #if str($overlap_b) != "None" and str($overlap_b): - -F '$overlap_b' - #end if - $reciprocal_overlap - $a_or_b - -a '$inputA' - #if str($reduce_or_iterate.reduce_or_iterate_selector) == 'iterate': - -b '$reduce_or_iterate.inputB' - #if $reduce_or_iterate.inputB.is_of_type('bam'): - -sorted -g <(samtools view -H $reduce_or_iterate.inputB | grep '^@SQ' | sed $'s/\tSN:/\tSN\t/' | sed $'s/\tLN:/\tLN\t/' | cut -f 3,5) - #end if - #else: - #set inputBs = "' '".join([str($file) for $file in $reduce_or_iterate.inputB]) - -b '$inputBs' - #end if - #if $inputA.is_of_type('gff') or $inputA.is_of_type('gff3'): - | sort -k1,1 -k4,2n - #else: - | sort -k1,1 -k2,2n - #end if - > '$output' -]]> - </command> + <command><![CDATA[ +bedtools coverage +$d +$hist +$split +$strandedness +#if str($overlap_a): + -f $overlap_a +#end if +#if str($overlap_b): + -F $overlap_b +#end if +$reciprocal_overlap +$a_or_b +-a '$inputA' +#if str($reduce_or_iterate.reduce_or_iterate_selector) == 'iterate': + -b '$reduce_or_iterate.inputB' + #if $reduce_or_iterate.inputB.is_of_type('bam'): + -sorted -g <(samtools view -H $reduce_or_iterate.inputB | grep '^@SQ' | sed $'s/\tSN:/\tSN\t/' | sed $'s/\tLN:/\tLN\t/' | cut -f 3,5) + #end if +#else: + -b + #for $file in $reduce_or_iterate.inputB + '$file' + #end for +#end if +#if $inputA.is_of_type('gff'): + | sort -k1,1 -k4,2n +#else: + | sort -k1,1 -k2,2n +#end if +> '$output' + ]]></command> <inputs> - <param format="bam,@STD_BEDTOOLS_INPUTS@" name="inputA" type="data" label="File A (on which coverage is calculated)" help="BAM/@STD_BEDTOOLS_INPUT_LABEL@ format" /> + <param name="inputA" argument="-a" type="data" format="bam,@STD_BEDTOOLS_INPUTS@" label="File A (on which coverage is calculated)" help="BAM/@STD_BEDTOOLS_INPUT_LABEL@ format" /> <conditional name="reduce_or_iterate"> - <param name='reduce_or_iterate_selector' type='select' label='Combined or separate output files'> - <option value='iterate' selected='true'>One output file per 'input B' file</option> - <option value='reduce'>Single output containing results for all 'input B' files</option> + <param name="reduce_or_iterate_selector" type="select" label="Combined or separate output files"> + <option value="iterate" selected="true">One output file per 'input B' file</option> + <option value="reduce">Single output containing results for all 'input B' files</option> </param> - <when value='iterate'> - <param format="bam,@STD_BEDTOOLS_INPUTS@" name="inputB" type="data" - label="File(s) B (for which coverage is calculated)" help="BAM/@STD_BEDTOOLS_INPUT_LABEL@ format"/> + <when value="iterate"> + <param name="inputB" argument="-b" type="data" format="bam,@STD_BEDTOOLS_INPUTS@" + label="File B (for which coverage is calculated)" help="BAM/@STD_BEDTOOLS_INPUT_LABEL@ format"/> </when> - <when value='reduce'> - <param format="bam,@STD_BEDTOOLS_INPUTS@" name="inputB" type="data" multiple="true" + <when value="reduce"> + <param name="inputB" argument="-b" type="data" format="bam,@STD_BEDTOOLS_INPUTS@" multiple="true" label="File(s) B (for which coverage is calculated)" help="BAM/@STD_BEDTOOLS_INPUT_LABEL@ format"/> </when> </conditional> <expand macro="split" /> - <param name="strandedness" type="boolean" label="Force strandedness" truevalue="-s" falsevalue="" checked="false" - help="Only report hits in B that overlap A on the same strand. By default, overlaps are reported without respect to strand (-s)"/> - <param name="d" type="boolean" checked="false" truevalue="-d" falsevalue="" + <param name="strandedness" argument="-s" type="boolean" label="Force strandedness" truevalue="-s" falsevalue="" checked="false" + help="Only report hits in B that overlap A on the same strand. By default, overlaps are reported without respect to strand"/> + <param argument="-d" type="boolean" truevalue="-d" falsevalue="" checked="false" label="Report the depth at each position in each A feature" - help="Positions reported are one based. Each position and depth follow the complete B feature (-d)" /> - <param name="hist" type="boolean" checked="false" truevalue="-hist" falsevalue="" + help="Positions reported are one based. Each position and depth follow the complete B feature" /> + <param argument="-hist" type="boolean" truevalue="-hist" falsevalue="" checked="false" label="Report a histogram of coverage for each feature in A as well as a summary histogram for all features in A" - help="Additional columns after each feature in A: 1) depth 2) # bases at depth 3) size of A 4) % of A at depth (-hist)" /> - <param name="overlap_a" type="text" - label="Minimum overlap required as a fraction of A." - help="Default is 1E-9 (i.e., 1bp). (-f)"> - <sanitizer invalid_char=""> - <valid initial="string.digits"><add value=",."/></valid> - </sanitizer> - </param> - <param name="overlap_b" type="text" - label="Minimum overlap required as a fraction of B." - help="Default is 1E-9 (i.e., 1bp). (-F)"> - <sanitizer invalid_char=""> - <valid initial="string.digits"><add value=",."/></valid> - </sanitizer> - </param> - <param name="reciprocal_overlap" type="boolean" checked="false" truevalue="-r" falsevalue="" + help="Additional columns after each feature in A: 1) depth 2) # bases at depth 3) size of A 4) % of A at depth" /> + <expand macro="overlap" name="overlap_a" /> + <expand macro="overlap" name="overlap_b" argument="-F" fracof="B" /> + <param name="reciprocal_overlap" argument="-r" type="boolean" truevalue="-r" falsevalue="" checked="false" label="Require that the fraction overlap be reciprocal for A AND B." - help="if -f is 0.90 and -r is used, this requires that B overlap 90% of A and A _also_ overlaps 90% of B (-r)" /> - <param name="a_or_b" type="boolean" checked="false" truevalue="-e" falsevalue="" + help="if -f is 0.90 and -r is used, this requires that B overlap 90% of A and A _also_ overlaps 90% of B" /> + <param name="a_or_b" argument="-e" type="boolean" truevalue="-e" falsevalue="" checked="false" label="Require that the minimum fraction be satisfied for A OR B." - help="if -e is used with -f 0.90 and -F 0.10 this requires that either 90% of A is covered OR 10% of B is covered. Without -e, both fractions would have to be satisfied. (-e)" /> + help="If -e is used with -f 0.90 and -F 0.10 this requires that either 90% of A is covered OR 10% of B is covered. Without -e, both fractions would have to be satisfied" /> </inputs> <outputs> - <data format="bed" name="output" metadata_source="inputA" label="Count of overlaps on ${inputA.name}"/> + <data name="output" format="bed" metadata_source="inputA" label="Count of overlaps on ${inputA.name}"/> </outputs> <tests> <test> @@ -115,13 +103,12 @@ <test> <param name="inputA" value="coverageBedA.bed" ftype="bed" /> <param name="inputB" value="coverageBedB.bed" ftype="bed" /> - <param name="overlap_a" value="1" /> + <param name="overlap_a" value="1E-5" /> <param name="reciprocal_overlap" value="true" /> <output name="output" file="coverageBed_result3_f1r.bed" ftype="bed" /> </test> </tests> - <help> -<![CDATA[ + <help><![CDATA[ **What it does** `bedtools coverage`_ computes both the *depth* and *breadth* of coverage of features in @@ -143,7 +130,6 @@ 4. The fraction of bases in A that had non-zero coverage from features in B. @REFERENCES@ -]]> - </help> + ]]></help> <expand macro="citations" /> </tool>