Mercurial > repos > iuc > bedtools
changeset 37:ce3c7f062223 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 8e072170dd8f7b68fabbf29b1b0d7d14974b8b22"
author | iuc |
---|---|
date | Tue, 23 Mar 2021 20:23:14 +0000 |
parents | 0a5c785ac6db |
children | fe5b4cb8356c |
files | coverageBed.xml intersectBed.xml macros.xml mapBed.xml shuffleBed.xml sortBed.xml test-data/coverageBed.bam test-data/coverageBedA2.bed test-data/coverageBed_result4_2bam.bed test-data/coverageBed_result5_unsorted.bed test-data/shuffleBed2.bed test-data/shuffleBed_result1.bed test-data/shuffleBed_result2.bed test-data/shuffleBed_result3.bed test-data/shuffleBed_result4.bed test-data/sortBed2.bed test-data/sortBed_result2.bed test-data/sortBed_result3.bed |
diffstat | 18 files changed, 99 insertions(+), 42 deletions(-) [+] |
line wrap: on
line diff
--- a/coverageBed.xml Mon Jun 15 16:55:13 2020 -0400 +++ b/coverageBed.xml Tue Mar 23 20:23:14 2021 +0000 @@ -24,15 +24,13 @@ -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 +@SORTED@ #if $inputA.is_of_type('gff'): | sort -k1,1 -k4,2n #else: @@ -73,6 +71,8 @@ <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" /> + <!-- -sorted -g --> + <expand macro="sorted" /> </inputs> <outputs> <data name="output" format="bed" metadata_source="inputA" label="Count of overlaps on ${inputA.name}"/> @@ -86,12 +86,14 @@ <test> <param name="inputA" value="multiCov1.bed" ftype="bed" /> <param name="inputB" value="srma_in3.bam" ftype="bam" /> + <param name="sorted" value="true"/> <output name="output" file="multicov1_by_srma_in3.cov.bed" ftype="bed" /> </test> <test> <param name="inputA" value="multiCov1.bed" ftype="bed" /> <param name="reduce_or_iterate_selector" value="reduce" /> <param name="inputB" value="srma_in3.bam" ftype="bam" /> + <param name="sorted" value="true"/> <output name="output" file="multicov1_by_srma_in3.cov.bed" ftype="bed" /> </test> <test> @@ -107,6 +109,18 @@ <param name="reciprocal_overlap" value="true" /> <output name="output" file="coverageBed_result3_f1r.bed" ftype="bed" /> </test> + <test> + <param name="inputA" value="multiCov1.bed" ftype="bed" /> + <param name="reduce_or_iterate_selector" value="reduce" /> + <param name="inputB" value="srma_in3.bam,coverageBed.bam" ftype="bam" /> + <param name="sorted" value="true"/> + <output name="output" file="coverageBed_result4_2bam.bed" ftype="bed" /> + </test> + <test> + <param name="inputA" value="coverageBedA2.bed" ftype="bed" /> + <param name="inputB" value="coverageBed.bam" ftype="bam" /> + <output name="output" file="coverageBed_result5_unsorted.bed" ftype="bed" /> + </test> </tests> <help><![CDATA[ **What it does**
--- a/intersectBed.xml Mon Jun 15 16:55:13 2020 -0400 +++ b/intersectBed.xml Tue Mar 23 20:23:14 2021 +0000 @@ -16,11 +16,7 @@ #end if bedtools intersect -#if $inputA.is_of_type('bam'): - -abam '${inputA}' -#else: - -a '${inputA}' -#end if +-a '${inputA}' #if str($reduce_or_iterate.reduce_or_iterate_selector) == 'iterate': -b '$reduce_or_iterate.inputB' @@ -53,14 +49,7 @@ $once $header $modes -$sorted -#if str($sorted) != '': - #if str($reduce_or_iterate.reduce_or_iterate_selector) == 'iterate' and $reduce_or_iterate.inputB.is_of_type('bam'): - -g <(samtools view -H $reduce_or_iterate.inputB | tr ':' '\t' | grep SN | cut -f 3,5) - #else if str($reduce_or_iterate.reduce_or_iterate_selector) == 'reduce' and str($reduce_or_iterate.inputB) != 'None' and $reduce_or_iterate.inputB[0].is_of_type('bam'): - -g <(samtools view -H $reduce_or_iterate.inputB[0] | tr ':' '\t' | grep SN | cut -f 3,5) - #end if -#end if +@SORTED@ $bed $count > '${output}' @@ -124,10 +113,9 @@ help="Reports 0 for A entries that have no overlap with B" /> <!-- -bed --> <param argument="-bed" type="boolean" truevalue="-bed" falsevalue="" checked="false" - label="When using BAM input (-abam), write output as BED instead of BAM." /> + label="When using BAM input, write output as BED instead of BAM." /> <!-- -sorted -g --> - <param argument="-sorted" type="boolean" truevalue="-sorted" falsevalue="" checked="false" - label="For coordinate sorted input file the more efficient sweeping algorithm is enabled." /> + <expand macro="sorted" /> <expand macro="print_header" /> </inputs> <outputs>
--- a/macros.xml Mon Jun 15 16:55:13 2020 -0400 +++ b/macros.xml Tue Mar 23 20:23:14 2021 +0000 @@ -5,7 +5,7 @@ <yield/> </requirements> </xml> - <token name="@TOOL_VERSION@">2.29.2</token> + <token name="@TOOL_VERSION@">2.30.0</token> <token name="@SAMTOOLS_VERSION@">1.9</token> <token name="@STD_BEDTOOLS_INPUTS@">bed,bedgraph,gff,vcf,encodepeak</token> <token name="@STD_BEDTOOLS_INPUT_LABEL@">BED/bedGraph/GFF/VCF/EncodePeak</token> @@ -77,6 +77,19 @@ </when> </conditional> </xml> + <xml name="input_optional_genome_file"> + <conditional name="genome"> + <param name="genome_choose" argument="-g" type="select" + label="Specify a genome file that defines the expected chromosome order in the input files." > + <option value="" selected="true">No</option> + <option value="-g">Yes</option> + </param> + <when value="-g"> + <expand macro="input_conditional_genome_file" /> + </when> + <when value="" /> + </conditional> + </xml> <token name="@GENOME_FILE@"> #if $genome_file_opts.genome_file_opts_selector == "loc": '$genome_file_opts.genome.fields.len_path' @@ -223,6 +236,23 @@ <option value="distinct">distinct (i.e., print a comma separated list) - numeric or text</option> <option value="concat">concat (i.e., print a comma separated list) - numeric or text</option> </xml> + <xml name="sorted"> + <!-- -sorted -g --> + <param argument="-sorted" type="boolean" truevalue="-sorted" falsevalue="" checked="false" + label="For coordinate sorted input file the more efficient sweeping algorithm is enabled."/> + </xml> + <token name="@SORTED@"> +<![CDATA[ +$sorted +#if str($sorted) != '': + #if str($reduce_or_iterate.reduce_or_iterate_selector) == 'iterate' and $reduce_or_iterate.inputB.is_of_type('bam'): + -g <(samtools view -H $reduce_or_iterate.inputB | tr ':' '\t' | grep SN | cut -f 3,5) + #else if str($reduce_or_iterate.reduce_or_iterate_selector) == 'reduce' and str($reduce_or_iterate.inputB) != 'None' and $reduce_or_iterate.inputB[0].is_of_type('bam'): + -g <(samtools view -H $reduce_or_iterate.inputB[0] | tr ':' '\t' | grep SN | cut -f 3,5) + #end if +#end if +]]> + </token> <token name="@REFERENCES@"> <![CDATA[ ------
--- a/mapBed.xml Mon Jun 15 16:55:13 2020 -0400 +++ b/mapBed.xml Tue Mar 23 20:23:14 2021 +0000 @@ -35,17 +35,7 @@ </expand> <expand macro="split" /> <expand macro="print_header" /> - <conditional name="genome"> - <param name="genome_choose" argument="-g" type="select" - label="Specify a genome file the defines the expected chromosome order in the input files." > - <option value="" selected="true">No</option> - <option value="-g">Yes</option> - </param> - <when value="-g"> - <expand macro="input_conditional_genome_file" /> - </when> - <when value="" /> - </conditional> + <expand macro="input_optional_genome_file" /> </inputs> <outputs> <data name="output" format_source="inputA" metadata_source="inputA" label="Mapping of ${inputB.name} into ${inputA.name}" />
--- a/shuffleBed.xml Mon Jun 15 16:55:13 2020 -0400 +++ b/shuffleBed.xml Tue Mar 23 20:23:14 2021 +0000 @@ -87,7 +87,10 @@ <param name="inputA" value="shuffleBed1.bed" ftype="bed" /> <param name="genome_file_opts_selector" value="hist" /> <param name="genome" value="shuffleBed.len" ftype="tabular" /> - <param name="excl" value="shuffleBed2.bed" ftype="bed" /> + <conditional name="add_bed"> + <param name="add_bed_select" value="not_be"/> + <param name="excl" value="shuffleBed2.bed" ftype="bed" /> + </conditional> <param name="seed_choose" value="True" /> <param name="seed" value="1" /> <output name="output" file="shuffleBed_result3.bed" ftype="bed" /> @@ -98,7 +101,7 @@ <param name="genome" value="shuffleBed.len" ftype="bed" /> <param name="allow_beyond" value="True" /> <param name="seed_choose" value="True" /> - <param name="seed" value="1" /> + <param name="seed" value="3" /> <output name="output" file="shuffleBed_result4.bed" ftype="bed" /> </test> </tests>
--- a/sortBed.xml Mon Jun 15 16:55:13 2020 -0400 +++ b/sortBed.xml Tue Mar 23 20:23:14 2021 +0000 @@ -9,6 +9,7 @@ sortBed -i '$input' $option +@GENOME_FILE_MAPBED@ > '$output' ]]></command> <inputs> @@ -23,6 +24,7 @@ <option value="-chrThenScoreA">chromosome, then by score (asc).</option> <option value="-chrThenScoreD">chromosome, then by score (desc).</option> </param> + <expand macro="input_optional_genome_file" /> </inputs> <outputs> <data name="output" format_source="input" metadata_source="input" label="SortBed on ${input.name}"/> @@ -33,6 +35,19 @@ <param name="option" value="" /> <output name="output" file="sortBed_result1.bed" ftype="bed" /> </test> + <test> + <param name="input" value="sortBed2.bed" ftype="bed" /> + <param name="option" value="" /> + <output name="output" file="sortBed_result2.bed" ftype="bed" /> + </test> + <test> + <param name="input" value="sortBed2.bed" ftype="bed" /> + <param name="option" value="" /> + <param name="genome_choose" value="-g" /> + <param name="genome_file_opts_selector" value="hist" /> + <param name="genome" value="mm9.len" ftype="bed" /> + <output name="output" file="sortBed_result3.bed" ftype="bed" /> + </test> </tests> <help><![CDATA[ **What it does**
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/coverageBedA2.bed Tue Mar 23 20:23:14 2021 +0000 @@ -0,0 +1,3 @@ +dummy_chr 1 100 +dummy_chr 1000 1000000 +super_dummy_chr 1 100
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/coverageBed_result4_2bam.bed Tue Mar 23 20:23:14 2021 +0000 @@ -0,0 +1,2 @@ +dummy_chr 1 100 0 0 99 0.0000000 +dummy_chr 1000 1000000 4 152 999000 0.0001522
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/coverageBed_result5_unsorted.bed Tue Mar 23 20:23:14 2021 +0000 @@ -0,0 +1,3 @@ +dummy_chr 1 100 0 0 99 0.0000000 +dummy_chr 1000 1000000 2 152 999000 0.0001522 +super_dummy_chr 1 100 0 0 99 0.0000000
--- a/test-data/shuffleBed2.bed Mon Jun 15 16:55:13 2020 -0400 +++ b/test-data/shuffleBed2.bed Tue Mar 23 20:23:14 2021 +0000 @@ -1,1 +1,1 @@ -chr1 0 100 +chr1 0 10000
--- a/test-data/shuffleBed_result1.bed Mon Jun 15 16:55:13 2020 -0400 +++ b/test-data/shuffleBed_result1.bed Tue Mar 23 20:23:14 2021 +0000 @@ -1,2 +1,2 @@ -chr2 51 151 a1 1 + -chr2 720 1720 a2 2 - +chr2 1528 1628 a1 1 + +chr1 7462 8462 a2 2 -
--- a/test-data/shuffleBed_result2.bed Mon Jun 15 16:55:13 2020 -0400 +++ b/test-data/shuffleBed_result2.bed Tue Mar 23 20:23:14 2021 +0000 @@ -1,2 +1,2 @@ -chr1 5845 5945 a1 1 + -chr1 6139 7139 a2 2 - +chr1 1528 1628 a1 1 + +chr1 2462 3462 a2 2 -
--- a/test-data/shuffleBed_result3.bed Mon Jun 15 16:55:13 2020 -0400 +++ b/test-data/shuffleBed_result3.bed Tue Mar 23 20:23:14 2021 +0000 @@ -1,2 +1,2 @@ -chr2 51 151 a1 1 + -chr2 720 1720 a2 2 - +chr2 1528 1628 a1 1 + +chr2 5665 6665 a2 2 -
--- a/test-data/shuffleBed_result4.bed Mon Jun 15 16:55:13 2020 -0400 +++ b/test-data/shuffleBed_result4.bed Tue Mar 23 20:23:14 2021 +0000 @@ -1,2 +1,2 @@ -chr2 51 151 a1 1 + -chr2 720 1720 a2 2 - +chr1 6467 6567 a1 1 + +chr2 7167 8000 a2 2 -
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/sortBed2.bed Tue Mar 23 20:23:14 2021 +0000 @@ -0,0 +1,3 @@ +chr1 800 1000 +chr10 80 180 +chr2 1 10