comparison 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
comparison
equal deleted inserted replaced
33:87ee588b3d45 34:dde39ba9c031
1 <tool id="bedtools_coveragebed" name="bedtools Compute both the depth and breadth of coverage" version="@WRAPPER_VERSION@"> 1 <tool id="bedtools_coveragebed" name="bedtools Compute both the depth and breadth of coverage" version="@TOOL_VERSION@+galaxy1">
2 <description>of features in file B on the features in file A (bedtools coverage)</description> 2 <description>of features in file B on the features in file A (bedtools coverage)</description>
3 <macros> 3 <macros>
4 <import>macros.xml</import> 4 <import>macros.xml</import>
5 </macros> 5 </macros>
6 <expand macro="requirements"> 6 <expand macro="requirements">
7 <requirement type="package" version="@SAMTOOLS_VERSION@">samtools</requirement> 7 <requirement type="package" version="@SAMTOOLS_VERSION@">samtools</requirement>
8 </expand> 8 </expand>
9 <expand macro="stdio" /> 9 <expand macro="stdio" />
10 <command> 10 <command><![CDATA[
11 <![CDATA[ 11 bedtools coverage
12 bedtools coverage 12 $d
13 $d 13 $hist
14 $hist 14 $split
15 $split 15 $strandedness
16 $strandedness 16 #if str($overlap_a):
17 #if str($overlap_a) != "None" and str($overlap_a): 17 -f $overlap_a
18 -f '$overlap_a' 18 #end if
19 #end if 19 #if str($overlap_b):
20 #if str($overlap_b) != "None" and str($overlap_b): 20 -F $overlap_b
21 -F '$overlap_b' 21 #end if
22 #end if 22 $reciprocal_overlap
23 $reciprocal_overlap 23 $a_or_b
24 $a_or_b 24 -a '$inputA'
25 -a '$inputA' 25 #if str($reduce_or_iterate.reduce_or_iterate_selector) == 'iterate':
26 #if str($reduce_or_iterate.reduce_or_iterate_selector) == 'iterate': 26 -b '$reduce_or_iterate.inputB'
27 -b '$reduce_or_iterate.inputB' 27 #if $reduce_or_iterate.inputB.is_of_type('bam'):
28 #if $reduce_or_iterate.inputB.is_of_type('bam'): 28 -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)
29 -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) 29 #end if
30 #end if 30 #else:
31 #else: 31 -b
32 #set inputBs = "' '".join([str($file) for $file in $reduce_or_iterate.inputB]) 32 #for $file in $reduce_or_iterate.inputB
33 -b '$inputBs' 33 '$file'
34 #end if 34 #end for
35 #if $inputA.is_of_type('gff') or $inputA.is_of_type('gff3'): 35 #end if
36 | sort -k1,1 -k4,2n 36 #if $inputA.is_of_type('gff'):
37 #else: 37 | sort -k1,1 -k4,2n
38 | sort -k1,1 -k2,2n 38 #else:
39 #end if 39 | sort -k1,1 -k2,2n
40 > '$output' 40 #end if
41 ]]> 41 > '$output'
42 </command> 42 ]]></command>
43 <inputs> 43 <inputs>
44 <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" /> 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"> 45 <conditional name="reduce_or_iterate">
46 <param name='reduce_or_iterate_selector' type='select' label='Combined or separate output files'> 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> 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> 48 <option value="reduce">Single output containing results for all 'input B' files</option>
49 </param> 49 </param>
50 <when value='iterate'> 50 <when value="iterate">
51 <param format="bam,@STD_BEDTOOLS_INPUTS@" name="inputB" type="data" 51 <param name="inputB" argument="-b" type="data" format="bam,@STD_BEDTOOLS_INPUTS@"
52 label="File(s) B (for which coverage is calculated)" help="BAM/@STD_BEDTOOLS_INPUT_LABEL@ format"/> 52 label="File B (for which coverage is calculated)" help="BAM/@STD_BEDTOOLS_INPUT_LABEL@ format"/>
53 </when> 53 </when>
54 <when value='reduce'> 54 <when value="reduce">
55 <param format="bam,@STD_BEDTOOLS_INPUTS@" name="inputB" type="data" multiple="true" 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"/> 56 label="File(s) B (for which coverage is calculated)" help="BAM/@STD_BEDTOOLS_INPUT_LABEL@ format"/>
57 </when> 57 </when>
58 </conditional> 58 </conditional>
59 <expand macro="split" /> 59 <expand macro="split" />
60 <param name="strandedness" type="boolean" label="Force strandedness" truevalue="-s" falsevalue="" checked="false" 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 (-s)"/> 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 name="d" type="boolean" checked="false" truevalue="-d" falsevalue="" 62 <param argument="-d" type="boolean" truevalue="-d" falsevalue="" checked="false"
63 label="Report the depth at each position in each A feature" 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 (-d)" /> 64 help="Positions reported are one based. Each position and depth follow the complete B feature" />
65 <param name="hist" type="boolean" checked="false" truevalue="-hist" falsevalue="" 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" 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 (-hist)" /> 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="overlap_a" type="text" 68 <expand macro="overlap" name="overlap_a" />
69 label="Minimum overlap required as a fraction of A." 69 <expand macro="overlap" name="overlap_b" argument="-F" fracof="B" />
70 help="Default is 1E-9 (i.e., 1bp). (-f)"> 70 <param name="reciprocal_overlap" argument="-r" type="boolean" truevalue="-r" falsevalue="" checked="false"
71 <sanitizer invalid_char="">
72 <valid initial="string.digits"><add value=",."/></valid>
73 </sanitizer>
74 </param>
75 <param name="overlap_b" type="text"
76 label="Minimum overlap required as a fraction of B."
77 help="Default is 1E-9 (i.e., 1bp). (-F)">
78 <sanitizer invalid_char="">
79 <valid initial="string.digits"><add value=",."/></valid>
80 </sanitizer>
81 </param>
82 <param name="reciprocal_overlap" type="boolean" checked="false" truevalue="-r" falsevalue=""
83 label="Require that the fraction overlap be reciprocal for A AND B." 71 label="Require that the fraction overlap be reciprocal for A AND B."
84 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)" /> 72 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" />
85 <param name="a_or_b" type="boolean" checked="false" truevalue="-e" falsevalue="" 73 <param name="a_or_b" argument="-e" type="boolean" truevalue="-e" falsevalue="" checked="false"
86 label="Require that the minimum fraction be satisfied for A OR B." 74 label="Require that the minimum fraction be satisfied for A OR B."
87 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)" /> 75 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" />
88 </inputs> 76 </inputs>
89 <outputs> 77 <outputs>
90 <data format="bed" name="output" metadata_source="inputA" label="Count of overlaps on ${inputA.name}"/> 78 <data name="output" format="bed" metadata_source="inputA" label="Count of overlaps on ${inputA.name}"/>
91 </outputs> 79 </outputs>
92 <tests> 80 <tests>
93 <test> 81 <test>
94 <param name="inputA" value="coverageBedA.bed" ftype="bed" /> 82 <param name="inputA" value="coverageBedA.bed" ftype="bed" />
95 <param name="inputB" value="coverageBedB.bed" ftype="bed" /> 83 <param name="inputB" value="coverageBedB.bed" ftype="bed" />
113 <output name="output" file="coverageBed_result2_F1.bed" ftype="bed" /> 101 <output name="output" file="coverageBed_result2_F1.bed" ftype="bed" />
114 </test> 102 </test>
115 <test> 103 <test>
116 <param name="inputA" value="coverageBedA.bed" ftype="bed" /> 104 <param name="inputA" value="coverageBedA.bed" ftype="bed" />
117 <param name="inputB" value="coverageBedB.bed" ftype="bed" /> 105 <param name="inputB" value="coverageBedB.bed" ftype="bed" />
118 <param name="overlap_a" value="1" /> 106 <param name="overlap_a" value="1E-5" />
119 <param name="reciprocal_overlap" value="true" /> 107 <param name="reciprocal_overlap" value="true" />
120 <output name="output" file="coverageBed_result3_f1r.bed" ftype="bed" /> 108 <output name="output" file="coverageBed_result3_f1r.bed" ftype="bed" />
121 </test> 109 </test>
122 </tests> 110 </tests>
123 <help> 111 <help><![CDATA[
124 <![CDATA[
125 **What it does** 112 **What it does**
126 113
127 `bedtools coverage`_ computes both the *depth* and *breadth* of coverage of features in 114 `bedtools coverage`_ computes both the *depth* and *breadth* of coverage of features in
128 file B on the features in file A. For example, ``bedtools coverage`` can compute the coverage of sequence alignments 115 file B on the features in file A. For example, ``bedtools coverage`` can compute the coverage of sequence alignments
129 (file B) across 1 kilobase (arbitrary) windows (file A) tiling a genome of interest. 116 (file B) across 1 kilobase (arbitrary) windows (file A) tiling a genome of interest.
141 2. The number of bases in A that had non-zero coverage from features in B. 128 2. The number of bases in A that had non-zero coverage from features in B.
142 3. The length of the entry in A. 129 3. The length of the entry in A.
143 4. The fraction of bases in A that had non-zero coverage from features in B. 130 4. The fraction of bases in A that had non-zero coverage from features in B.
144 131
145 @REFERENCES@ 132 @REFERENCES@
146 ]]> 133 ]]></help>
147 </help>
148 <expand macro="citations" /> 134 <expand macro="citations" />
149 </tool> 135 </tool>