Mercurial > repos > pimarin > bedtools
comparison coverageBed.xml @ 0:4cacc5b8001b draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools
| author | pimarin |
|---|---|
| date | Thu, 23 Feb 2023 09:50:24 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:4cacc5b8001b |
|---|---|
| 1 <tool id="bedtools_coveragebed" name="bedtools Compute both the depth and breadth of coverage" version="@TOOL_VERSION@" profile="@PROFILE@"> | |
| 2 <description>of features in file B on the features in file A (bedtools coverage)</description> | |
| 3 <macros> | |
| 4 <import>macros.xml</import> | |
| 5 </macros> | |
| 6 <expand macro="bio_tools" /> | |
| 7 <expand macro="requirements"> | |
| 8 <requirement type="package" version="@SAMTOOLS_VERSION@">samtools</requirement> | |
| 9 </expand> | |
| 10 <expand macro="stdio" /> | |
| 11 <command><![CDATA[ | |
| 12 bedtools coverage | |
| 13 $d | |
| 14 $hist | |
| 15 $split | |
| 16 $strandedness | |
| 17 $mean | |
| 18 #if str($overlap_a): | |
| 19 -f $overlap_a | |
| 20 #end if | |
| 21 #if str($overlap_b): | |
| 22 -F $overlap_b | |
| 23 #end if | |
| 24 $reciprocal_overlap | |
| 25 $a_or_b | |
| 26 -a '$inputA' | |
| 27 #if str($reduce_or_iterate.reduce_or_iterate_selector) == 'iterate': | |
| 28 -b '$reduce_or_iterate.inputB' | |
| 29 #else: | |
| 30 -b | |
| 31 #for $file in $reduce_or_iterate.inputB | |
| 32 '$file' | |
| 33 #end for | |
| 34 #end if | |
| 35 @SORTED@ | |
| 36 #if $inputA.is_of_type('gff'): | |
| 37 | sort -k1,1 -k4,2n | |
| 38 #else: | |
| 39 | sort -k1,1 -k2,2n | |
| 40 #end if | |
| 41 > '$output' | |
| 42 ]]></command> | |
| 43 <inputs> | |
| 44 <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" /> | |
| 45 <conditional name="reduce_or_iterate"> | |
| 46 <param name="reduce_or_iterate_selector" type="select" label="Combined or separate output files"> | |
| 47 <option value="iterate" selected="true">One output file per 'input B' file</option> | |
| 48 <option value="reduce">Single output containing results for all 'input B' files</option> | |
| 49 </param> | |
| 50 <when value="iterate"> | |
| 51 <param name="inputB" argument="-b" type="data" format="bam,@STD_BEDTOOLS_INPUTS@" | |
| 52 label="File B (for which coverage is calculated)" help="BAM/@STD_BEDTOOLS_INPUT_LABEL@ format"/> | |
| 53 </when> | |
| 54 <when value="reduce"> | |
| 55 <param name="inputB" argument="-b" type="data" format="bam,@STD_BEDTOOLS_INPUTS@" multiple="true" | |
| 56 label="File(s) B (for which coverage is calculated)" help="BAM/@STD_BEDTOOLS_INPUT_LABEL@ format"/> | |
| 57 </when> | |
| 58 </conditional> | |
| 59 <expand macro="split" /> | |
| 60 <param name="strandedness" argument="-s" type="boolean" label="Force strandedness" truevalue="-s" falsevalue="" checked="false" | |
| 61 help="Only report hits in B that overlap A on the same strand. By default, overlaps are reported without respect to strand"/> | |
| 62 <param argument="-d" type="boolean" truevalue="-d" falsevalue="" checked="false" | |
| 63 label="Report the depth at each position in each A feature" | |
| 64 help="Positions reported are one based. Each position and depth follow the complete B feature" /> | |
| 65 <param argument="-hist" type="boolean" truevalue="-hist" falsevalue="" checked="false" | |
| 66 label="Report a histogram of coverage for each feature in A as well as a summary histogram for all features in A" | |
| 67 help="Additional columns after each feature in A: 1) depth 2) # bases at depth 3) size of A 4) % of A at depth" /> | |
| 68 <param name="mean" argument="-mean" type="boolean" label="Mean depth" truevalue="-mean" falsevalue="" checked="false" | |
| 69 help="Report the mean depth of all positions in each A feature."/> | |
| 70 <expand macro="overlap" name="overlap_a" /> | |
| 71 <expand macro="overlap" name="overlap_b" argument="-F" fracof="B" /> | |
| 72 <param name="reciprocal_overlap" argument="-r" type="boolean" truevalue="-r" falsevalue="" checked="false" | |
| 73 label="Require that the fraction overlap be reciprocal for A AND B." | |
| 74 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" /> | |
| 75 <param name="a_or_b" argument="-e" type="boolean" truevalue="-e" falsevalue="" checked="false" | |
| 76 label="Require that the minimum fraction be satisfied for A OR B." | |
| 77 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" /> | |
| 78 <!-- -sorted -g --> | |
| 79 <expand macro="sorted" /> | |
| 80 </inputs> | |
| 81 <outputs> | |
| 82 <data name="output" format="bed" metadata_source="inputA" label="Count of overlaps on ${inputA.name}"/> | |
| 83 </outputs> | |
| 84 <tests> | |
| 85 <test> | |
| 86 <param name="inputA" value="coverageBedA.bed" ftype="bed" /> | |
| 87 <param name="inputB" value="coverageBedB.bed" ftype="bed" /> | |
| 88 <output name="output" file="coverageBed_result1.bed" ftype="bed" /> | |
| 89 </test> | |
| 90 <test> | |
| 91 <param name="inputA" value="multiCov1.bed" ftype="bed" /> | |
| 92 <param name="inputB" value="srma_in3.bam" ftype="bam" /> | |
| 93 <param name="sorted" value="true"/> | |
| 94 <output name="output" file="multicov1_by_srma_in3.cov.bed" ftype="bed" /> | |
| 95 </test> | |
| 96 <test> | |
| 97 <param name="inputA" value="multiCov1.bed" ftype="bed" /> | |
| 98 <param name="reduce_or_iterate_selector" value="reduce" /> | |
| 99 <param name="inputB" value="srma_in3.bam" ftype="bam" /> | |
| 100 <param name="sorted" value="true"/> | |
| 101 <output name="output" file="multicov1_by_srma_in3.cov.bed" ftype="bed" /> | |
| 102 </test> | |
| 103 <test> | |
| 104 <param name="inputA" value="coverageBedA.bed" ftype="bed" /> | |
| 105 <param name="inputB" value="coverageBedB.bed" ftype="bed" /> | |
| 106 <param name="overlap_b" value="1" /> | |
| 107 <output name="output" file="coverageBed_result2_F1.bed" ftype="bed" /> | |
| 108 </test> | |
| 109 <test> | |
| 110 <param name="inputA" value="coverageBedA.bed" ftype="bed" /> | |
| 111 <param name="inputB" value="coverageBedB.bed" ftype="bed" /> | |
| 112 <param name="overlap_a" value="1E-5" /> | |
| 113 <param name="reciprocal_overlap" value="true" /> | |
| 114 <output name="output" file="coverageBed_result3_f1r.bed" ftype="bed" /> | |
| 115 </test> | |
| 116 <test> | |
| 117 <param name="inputA" value="multiCov1.bed" ftype="bed" /> | |
| 118 <param name="reduce_or_iterate_selector" value="reduce" /> | |
| 119 <param name="inputB" value="srma_in3.bam,coverageBed.bam" ftype="bam" /> | |
| 120 <param name="sorted" value="true"/> | |
| 121 <output name="output" file="coverageBed_result4_2bam.bed" ftype="bed" /> | |
| 122 </test> | |
| 123 <test> | |
| 124 <param name="inputA" value="coverageBedA2.bed" ftype="bed" /> | |
| 125 <param name="inputB" value="coverageBed.bam" ftype="bam" /> | |
| 126 <output name="output" file="coverageBed_result5_unsorted.bed" ftype="bed" /> | |
| 127 </test> | |
| 128 <test> | |
| 129 <param name="inputA" value="coverageBedA2.bed" ftype="bed" /> | |
| 130 <param name="inputB" value="coverageBed.bam" ftype="bam" /> | |
| 131 <param name="mean" value="true"/> | |
| 132 <output name="output" file="mean_coverage.bed" ftype="bed" /> | |
| 133 </test> | |
| 134 </tests> | |
| 135 <help><![CDATA[ | |
| 136 **What it does** | |
| 137 | |
| 138 `bedtools coverage`_ computes both the *depth* and *breadth* of coverage of features in | |
| 139 file B on the features in file A. For example, ``bedtools coverage`` can compute the coverage of sequence alignments | |
| 140 (file B) across 1 kilobase (arbitrary) windows (file A) tiling a genome of interest. | |
| 141 One advantage that ``bedtools coverage`` offers is that it not only *counts* the number of features that | |
| 142 overlap an interval in file A, it also computes the fraction of bases in the interval in A that were overlapped by one or more features. | |
| 143 Thus, ``bedtools coverage`` also computes the *breadth* of coverage for each interval in A. | |
| 144 | |
| 145 .. _bedtools coverage: http://bedtools.readthedocs.org/en/latest/content/tools/coverage.html | |
| 146 | |
| 147 .. class:: infomark | |
| 148 | |
| 149 The lines in the output will be comprised of each interval in A, followed by: | |
| 150 | |
| 151 1. The number of features in B that overlapped (by at least one base pair) the A interval. | |
| 152 2. The number of bases in A that had non-zero coverage from features in B. | |
| 153 3. The length of the entry in A. | |
| 154 4. The fraction of bases in A that had non-zero coverage from features in B. | |
| 155 | |
| 156 @REFERENCES@ | |
| 157 ]]></help> | |
| 158 <expand macro="citations" /> | |
| 159 </tool> |
