Mercurial > repos > iuc > bedtools
comparison multiIntersectBed.xml @ 4:315929597efb draft
Uploaded
| author | iuc |
|---|---|
| date | Wed, 07 Jan 2015 12:45:05 -0500 |
| parents | 7511823bdea1 |
| children |
comparison
equal
deleted
inserted
replaced
| 3:190a747ddaa8 | 4:315929597efb |
|---|---|
| 4 <import>macros.xml</import> | 4 <import>macros.xml</import> |
| 5 </macros> | 5 </macros> |
| 6 <expand macro="requirements" /> | 6 <expand macro="requirements" /> |
| 7 <expand macro="stdio" /> | 7 <expand macro="stdio" /> |
| 8 <command> | 8 <command> |
| 9 multiIntersectBed | 9 <![CDATA[ |
| 10 bedtools multiinter | |
| 10 $header | 11 $header |
| 12 $cluster | |
| 13 -filler "${filler}" | |
| 11 #if $zero.value == True: | 14 #if $zero.value == True: |
| 12 -empty | 15 -empty |
| 13 -g ${chromInfo} | 16 -g $genome |
| 14 #end if | |
| 15 | |
| 16 -i '$input1' | |
| 17 '$input2' | |
| 18 #for $q in $beds | |
| 19 '${q.input}' | |
| 20 #end for | |
| 21 | |
| 22 -names | |
| 23 #if $name1.choice == "tag": | |
| 24 '${input1.name}' | |
| 25 #else | |
| 26 '${name1.custom_name}' | |
| 27 #end if | 17 #end if |
| 28 | 18 |
| 29 #if $name2.choice == "tag": | 19 #if str($tag.tag_select) == "tag": |
| 30 '${input2.name}' | 20 #set files = '" "'.join( [ str( $file ) for $file in $tag.inputs ] ) |
| 31 #else | 21 -i "${files}" |
| 32 '${name2.custom_name}' | 22 #else: |
| 23 -i | |
| 24 #for $file in $tag.beds: | |
| 25 "${file.input}" | |
| 26 #end for | |
| 27 -names | |
| 28 #for $file in $tag.beds: | |
| 29 "{$file.custom_name}" | |
| 30 #end for | |
| 33 #end if | 31 #end if |
| 34 | 32 |
| 35 #for $q in $beds | 33 > '$output' |
| 36 #if $q.name.choice == "tag": | 34 ]]> |
| 37 '${q.input.name}' | |
| 38 #else | |
| 39 '${q.input.custom_name}' | |
| 40 #end if | |
| 41 #end for | |
| 42 > '$output' | |
| 43 </command> | 35 </command> |
| 44 | |
| 45 <inputs> | 36 <inputs> |
| 46 <!-- Make it easy for the user, first two input files are always shown --> | 37 <conditional name="tag"> |
| 47 <!-- INPUT 1 --> | 38 <param name="tag_select" type="select" label="Sample name"> |
| 48 <param name="input1" format="bed" type="data" label="First sorted BED file" /> | |
| 49 | |
| 50 <conditional name="name1"> | |
| 51 <param name="choice" type="select" label="Sample name"> | |
| 52 <option value="tag" selected="true">Use input's tag</option> | 39 <option value="tag" selected="true">Use input's tag</option> |
| 53 <option value="custom">Enter custom table name</option> | 40 <option value="custom">Enter custom name per file</option> |
| 54 </param> | 41 </param> |
| 55 <when value="tag"> | 42 <when value="tag"> |
| 43 <param name="inputs" format="bed" type="data" multiple="True" label="BED files" /> | |
| 56 </when> | 44 </when> |
| 57 <when value="custom"> | 45 <when value="custom"> |
| 58 <param name="custom_name" type="text" area="false" label="Custom sample name"/> | 46 <repeat name="beds" title="Add BED files" min="2" > |
| 47 <param name="input" format="bed" type="data" multiple="True" label="BED file" /> | |
| 48 <param name="custom_name" type="text" area="false" label="Custom sample name"/> | |
| 49 </repeat> | |
| 59 </when> | 50 </when> |
| 60 </conditional> | 51 </conditional> |
| 61 | 52 <expand macro="genome" /> |
| 62 <!-- INPUT 2 --> | 53 <param name="cluster" type="boolean" checked="false" truevalue="-cluster" falsevalue="" |
| 63 <param name="input2" format="bed" type="data" label="Second sorted BED file" /> | 54 label="Invoke Ryan Layers's clustering algorithm" |
| 64 | 55 help="(-cluster)" /> |
| 65 <conditional name="name2"> | 56 <param name="zero" type="boolean" checked="true" |
| 66 <param name="choice" type="select" label="Sample name"> | 57 label="Report regions that are not covered by any of the files" |
| 67 <option value="tag" selected="true">Use input's tag</option> | 58 help="If set, regions that are not overlapped by any file will also be reported. Requires a valid organism key for all input datasets" /> |
| 68 <option value="custom">Enter custom table name</option> | 59 <param name="filler" type="text" value="N/A" |
| 69 </param> | 60 label="Text to use for no-coverage value" |
| 70 <when value="tag"> | 61 help="Can be 0.0, N/A, - or any other value. (-filler)" /> |
| 71 </when> | 62 <expand macro="print_header" /> |
| 72 <when value="custom"> | |
| 73 <param name="custom_name" type="text" area="false" label="Custom sample name"/> | |
| 74 </when> | |
| 75 </conditional> | |
| 76 | |
| 77 <!-- Additional files, if the user needs more --> | |
| 78 <repeat name="beds" title="Add'l sorted BED files" > | |
| 79 <param name="input" format="bed" type="data" label="BED file" /> | |
| 80 | |
| 81 <conditional name="name"> | |
| 82 <param name="choice" type="select" label="Sample name"> | |
| 83 <option value="tag" selected="true">Use input's tag</option> | |
| 84 <option value="custom">Enter custom table name</option> | |
| 85 </param> | |
| 86 <when value="tag"> | |
| 87 </when> | |
| 88 <when value="custom"> | |
| 89 <param name="custom_name" type="text" area="false" label="Custom sample name"/> | |
| 90 </when> | |
| 91 </conditional> | |
| 92 </repeat> | |
| 93 | |
| 94 <param name="header" type="boolean" checked="true" truevalue="-header" falsevalue="" label="Print header line" help="The first line will include the name of each sample." /> | |
| 95 | |
| 96 <param name="zero" type="boolean" checked="true" label="Report regions that are not covered by any of the files" help="If set, regions that are not overlapped by any file will also be reported. Requires a valid organism key for all input datasets" /> | |
| 97 | 63 |
| 98 </inputs> | 64 </inputs> |
| 99 | |
| 100 <outputs> | 65 <outputs> |
| 101 <data format="tabular" name="output" metadata_source="input1" label="Common intervals identified from among ${input1.name}, ${input2.name} and so on." /> | 66 <data format="bed" name="output" /> |
| 102 </outputs> | 67 </outputs> |
| 68 <tests> | |
| 69 <test> | |
| 70 <param name="tag_select" value="tag"/> | |
| 71 <param name="inputs" value="multiIntersectBed1.bed,multiIntersectBed2.bed,multiIntersectBed3.bed" ftype="bed" /> | |
| 72 <param name="zero" value="False"/> | |
| 73 <output name="output" file="multiIntersectBed_result1.bed" ftype="bed" /> | |
| 74 </test> | |
| 75 <test> | |
| 76 <param name="tag_select" value="tag"/> | |
| 77 <param name="inputs" value="multiIntersectBed1.bed,multiIntersectBed2.bed,multiIntersectBed3.bed" ftype="bed" /> | |
| 78 <param name="header" value="True"/> | |
| 79 <param name="zero" value="False"/> | |
| 80 <output name="output" file="multiIntersectBed_result2.bed" lines_diff="2" ftype="bed" /> | |
| 81 </test> | |
| 82 <test> | |
| 83 <param name="tag_select" value="tag"/> | |
| 84 <param name="inputs" value="multiIntersectBed1.bed,multiIntersectBed2.bed,multiIntersectBed3.bed" ftype="bed" /> | |
| 85 <param name="zero" value="True"/> | |
| 86 <param name="genome" value="multiIntersectBed1.len"/> | |
| 87 <output name="output" file="multiIntersectBed_result3.bed" ftype="bed" /> | |
| 88 </test> | |
| 89 </tests> | |
| 103 <help> | 90 <help> |
| 104 | 91 <![CDATA[ |
| 105 **What it does** | 92 **What it does** |
| 106 | 93 |
| 107 This tool identifies common intervals among multiple, sorted BED files. Intervals can be common among 0 to N of the N input BED files. The pictorial and raw data examples below illustrate the behavior of this tool more clearly. | 94 This tool identifies common intervals among multiple, sorted BED files. Intervals can be common among 0 to N of the N input BED files. |
| 108 | |
| 109 | |
| 110 .. image:: http://people.virginia.edu/~arq5x/files/bedtools-galaxy/mbi.png | |
| 111 | 95 |
| 112 | 96 |
| 113 .. class:: warningmark | 97 .. class:: warningmark |
| 114 | 98 |
| 115 This tool requires that each BED file is reference-sorted (chrom, then start). | 99 This tool requires that each BED file is reference-sorted (chrom, then start). |
| 129 ------ | 113 ------ |
| 130 | 114 |
| 131 **Example input**:: | 115 **Example input**:: |
| 132 | 116 |
| 133 # a.bed | 117 # a.bed |
| 134 chr1 6 12 | 118 chr1 6 12bed |
| 135 chr1 10 20 | 119 chr1 10 20 |
| 136 chr1 22 27 | 120 chr1 22 27 |
| 137 chr1 24 30 | 121 chr1 24 30 |
| 138 | 122 |
| 139 # b.bed | 123 # b.bed |
| 188 chr1 30 32 1 bob 0 1 0 | 172 chr1 30 32 1 bob 0 1 0 |
| 189 chr1 32 34 1 sue 0 0 1 | 173 chr1 32 34 1 sue 0 0 1 |
| 190 | 174 |
| 191 | 175 |
| 192 @REFERENCES@ | 176 @REFERENCES@ |
| 193 | 177 ]]> |
| 194 </help> | 178 </help> |
| 195 <expand macro="citations" /> | 179 <expand macro="citations" /> |
| 196 </tool> | 180 </tool> |
