Mercurial > repos > iuc > bedtools
changeset 20:df56e1b12d0c draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 9f7b029951fa0f854c9c6a5f241ce9a20ae4f22a
author | iuc |
---|---|
date | Wed, 10 Jan 2018 19:21:33 -0500 |
parents | a8eabd2838f6 |
children | b3c147390100 |
files | coverageBed.xml intersectBed.xml |
diffstat | 2 files changed, 48 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/coverageBed.xml Fri Dec 08 03:26:42 2017 -0500 +++ b/coverageBed.xml Wed Jan 10 19:21:33 2018 -0500 @@ -1,4 +1,4 @@ -<tool id="bedtools_coveragebed" name="Compute both the depth and breadth of coverage" version="@WRAPPER_VERSION@.0"> +<tool id="bedtools_coveragebed" name="Compute both the depth and breadth of coverage" version="@WRAPPER_VERSION@.1"> <description>of features in file B on the features in file A (bedtools coverage)</description> <macros> <import>macros.xml</import> @@ -7,8 +7,6 @@ <expand macro="stdio" /> <command> <![CDATA[ - #set inputBs = "' '".join([str($file) for $file in $inputB]) - bedtools coverage $d $hist @@ -23,14 +21,32 @@ $reciprocal_overlap $a_or_b -a '$inputA' - -b '$inputBs' + #if str($reduce_or_iterate.reduce_or_iterate_selector) == 'iterate': + -b '$reduce_or_iterate.inputB' + #else: + #set inputBs = "' '".join([str($file) for $file in $reduce_or_iterate.inputB]) + -b '$inputBs' + #end if | sort -k1,1 -k2,2n > '$output' ]]> </command> <inputs> <param format="bam,bed,gff,gff3,vcf" name="inputA" type="data" label="File A (on which coverage is calculated)" help="BAM/BED/GFF/VCF format" /> - <param format="bam,bed,gff,gff3,vcf" name="inputB" type="data" multiple="true" label="File(s) B (for which coverage is calculated)" help="BAM/BED/GFF/VCF 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> + <when value='iterate'> + <param format="bam,bed,gff,gff3,vcf" name="inputB" type="data" + label="File(s) B (for which coverage is calculated)" help="BAM/BED/GFF/VCF format"/> + </when> + <when value='reduce'> + <param format="bam,bed,gff,gff3,vcf" name="inputB" type="data" multiple="true" + label="File(s) B (for which coverage is calculated)" help="BAM/BED/GFF/VCF 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)"/>
--- a/intersectBed.xml Fri Dec 08 03:26:42 2017 -0500 +++ b/intersectBed.xml Wed Jan 10 19:21:33 2018 -0500 @@ -1,4 +1,4 @@ -<tool id="bedtools_intersectbed" name="Intersect intervals" version="@WRAPPER_VERSION@.0"> +<tool id="bedtools_intersectbed" name="Intersect intervals" version="@WRAPPER_VERSION@.1"> <description>find overlapping intervals in various ways</description> <macros> <import>macros.xml</import> @@ -7,21 +7,25 @@ <expand macro="stdio" /> <command> <![CDATA[ - #set inputBs = '" "'.join( [ str( $file ) for $file in $inputB ] ) #set modes = ' '.join( str($overlap_mode).split(',') ) bedtools intersect #if $inputA.is_of_type('bam'): - -abam "${inputA}" + -abam '${inputA}' #else: - -a "${inputA}" + -a '${inputA}' #end if - -b "${inputBs}" + #if str($reduce_or_iterate.reduce_or_iterate_selector) == 'iterate': + -b '$reduce_or_iterate.inputB' + #else: + #set inputBs = "' '".join([str($file) for $file in $reduce_or_iterate.inputB]) + -b '$inputBs' + #end if $split $strand #if str($fraction) != "None" and str($fraction): - -f "${fraction}" + -f '${fraction}' #end if $reciprocal $invert @@ -29,12 +33,25 @@ $header $modes $count - > "${output}" + > '${output}' ]]> </command> <inputs> - <param format="bed,bam,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF/BAM file"/> - <param format="bed,bam,gff,vcf,gff3" name="inputB" type="data" multiple="True" label="One or more BAM/BED/GFF/VCF file(s)"/> + <param format="bed,bam,vcf,gff,gff3" name="inputA" type="data" label="File A to intersect with B" help="BAM/BED/GFF/VCF 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 intersections of any 'input B' lines with A </option> + </param> + <when value='iterate'> + <param format="bam,bed,gff,gff3,vcf" name="inputB" type="data" + label="File(s) B to intersect with A" help="BAM/BED/GFF/VCF format"/> + </when> + <when value='reduce'> + <param format="bam,bed,gff,gff3,vcf" name="inputB" type="data" multiple="true" + label="File(s) B to intersect with A" help="BAM/BED/GFF/VCF format"/> + </when> + </conditional> <expand macro="strand2" /> <param name="overlap_mode" type="select" multiple="True" label="What should be written to the output file?"> <option value="-wa" selected="True">Write the original entry in A for each overlap (-wa)</option> @@ -53,7 +70,7 @@ <expand macro="reciprocal" /> <!-- -v --> <param name="invert" type="boolean" checked="false" truevalue="-v" falsevalue="" - label="Report only those alignments that **do not** overlap the BED file" + label="Report only those alignments that **do not** overlap with file(s) B" help="(-v)"/> <!-- -u --> <param name="once" type="boolean" checked="false" truevalue="-u" falsevalue=""