Mercurial > repos > iuc > bedtools
annotate closestBed.xml @ 17:a2d4c30ba2f9 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 0887009a23d176b21536c9fd8a18c4fecc417d4f
| author | iuc |
|---|---|
| date | Sun, 21 Jun 2015 22:49:46 -0400 |
| parents | 0d3aa592ce27 |
| children | 102424c60727 |
| rev | line source |
|---|---|
| 8 | 1 <tool id="bedtools_closestbed" name="ClosestBed" version="@WRAPPER_VERSION@.0"> |
|
17
a2d4c30ba2f9
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 0887009a23d176b21536c9fd8a18c4fecc417d4f
iuc
parents:
8
diff
changeset
|
2 <description>find the closest, potentially non-overlapping interval</description> |
| 8 | 3 <macros> |
| 4 <import>macros.xml</import> | |
| 5 </macros> | |
| 6 <expand macro="requirements" /> | |
| 7 <expand macro="stdio" /> | |
| 8 <command> | |
| 9 <![CDATA[ | |
| 10 #set inputBs = ' '.join( [ str( $file ) for $file in $inputB ] ) | |
| 11 | |
| 12 closestBed | |
| 13 $strand | |
| 14 $addition | |
| 15 #if $addition2.addition2_select: | |
| 16 -D $addition2.addition2_select | |
| 17 $addition2.iu | |
| 18 $addition2.id | |
| 19 #end if | |
| 20 $io | |
| 21 -mdb $mdb | |
| 22 -t $ties | |
|
17
a2d4c30ba2f9
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 0887009a23d176b21536c9fd8a18c4fecc417d4f
iuc
parents:
8
diff
changeset
|
23 #if $k: |
|
a2d4c30ba2f9
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 0887009a23d176b21536c9fd8a18c4fecc417d4f
iuc
parents:
8
diff
changeset
|
24 -k $k |
|
a2d4c30ba2f9
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 0887009a23d176b21536c9fd8a18c4fecc417d4f
iuc
parents:
8
diff
changeset
|
25 #end if |
| 8 | 26 -a $inputA |
| 27 -b $inputBs | |
| 28 > $output | |
| 29 ]]> | |
| 30 </command> | |
| 31 <inputs> | |
| 32 <param format="bed,vcf,gff,gff3" name="inputA" type="data" label="BED/VCF/GFF file"/> | |
| 33 <param format="bed,gff,vcf,gff3" name="inputB" type="data" multiple="True" label="overlap intervals in this BED/VCF/GFF file?"/> | |
| 34 | |
| 35 <param name="ties" type="select" | |
| 36 label="How ties for closest feature should be handled" | |
| 37 help="This occurs when two features in B have exactly the same overlap with a feature in A."> | |
| 38 <option value="all" selected="True">all - Report all ties (default)</option> | |
| 39 <option value="first">first - Report the first tie that occurred in the B file</option> | |
| 40 <option value="last">last - Report the last tie that occurred in the B file</option> | |
| 41 </param> | |
| 42 | |
| 43 <expand macro="strand2" /> | |
| 44 | |
| 45 <param name="addition" type="boolean" checked="false" truevalue="-d" falsevalue="" | |
| 46 label="In addition to the closest feature in B, report its distance to A as an extra column" | |
| 47 help="The reported distance for overlapping features will be 0. (-d)" /> | |
| 48 | |
| 49 <conditional name="addition2"> | |
| 50 <param name="addition2_select" type="select" optional="True" | |
| 51 label="Add additional columns to report distance to upstream feature. Distance defintion" | |
| 52 help="Like -d, report the closest feature in B, and its distance to A as an extra column. However unlike -d, use negative distances to report upstream features. (-D)"> | |
| 53 <option value="" selected="True">Do not report the distance et all.</option> | |
| 54 <option value="ref">Report distance with respect to the reference genome. B features with a lower (start, stop) are upstream. (-ref)</option> | |
| 55 <option value="a">Report distance with respect to A. When A is on the - strand, "upstream" means B has a higher (start,stop). (-a)</option> | |
| 56 <option value="b">Report distance with respect to B. When B is on the - strand, "upstream" means A has a higher (start,stop). (-b)</option> | |
| 57 </param> | |
| 58 <when value="ref"> | |
|
17
a2d4c30ba2f9
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 0887009a23d176b21536c9fd8a18c4fecc417d4f
iuc
parents:
8
diff
changeset
|
59 <expand macro="closest_D_option" /> |
| 8 | 60 </when> |
| 61 <when value="a"> | |
|
17
a2d4c30ba2f9
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 0887009a23d176b21536c9fd8a18c4fecc417d4f
iuc
parents:
8
diff
changeset
|
62 <expand macro="closest_D_option" /> |
| 8 | 63 </when> |
| 64 <when value="b"> | |
|
17
a2d4c30ba2f9
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 0887009a23d176b21536c9fd8a18c4fecc417d4f
iuc
parents:
8
diff
changeset
|
65 <expand macro="closest_D_option" /> |
| 8 | 66 </when> |
| 67 </conditional> | |
| 68 | |
|
17
a2d4c30ba2f9
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 0887009a23d176b21536c9fd8a18c4fecc417d4f
iuc
parents:
8
diff
changeset
|
69 <param name="k" type="integer" value="1" optional="True" min="1" |
|
a2d4c30ba2f9
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 0887009a23d176b21536c9fd8a18c4fecc417d4f
iuc
parents:
8
diff
changeset
|
70 label="Report the k closest hits" help="(-k)"/> |
|
a2d4c30ba2f9
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 0887009a23d176b21536c9fd8a18c4fecc417d4f
iuc
parents:
8
diff
changeset
|
71 |
| 8 | 72 <param name="io" type="boolean" checked="false" truevalue="-io" falsevalue="" |
| 73 label="Ignore features in B that overlap A" | |
| 74 help="That is, we want close, yet not touching features only. (-io)" /> | |
| 75 | |
| 76 <param name="mdb" type="select" optional="True" | |
| 77 label="How multiple databases are resolved" | |
| 78 help="(-mdb)"> | |
| 79 <option value="each" selected="True">Report closest records for each database. (-each)</option> | |
| 80 <option value="all">Report closest records among all databases. (-all)</option> | |
| 81 </param> | |
| 82 </inputs> | |
| 83 <outputs> | |
| 84 <data format_source="inputA" name="output" metadata_source="inputA" label="Clostest region of ${inputA} in ${inputB}"/> | |
| 85 </outputs> | |
| 86 <tests> | |
| 87 <test> | |
| 88 <param name="inputA" value="closestBedA.bed" ftype="bed" /> | |
| 89 <param name="inputB" value="closestBedB.bed" ftype="bed" /> | |
| 90 <output name="output" file="closestBed_result1.bed" ftype="bed" /> | |
| 91 </test> | |
| 92 <test> | |
| 93 <param name="inputA" value="closestBed_a.bed" ftype="bed" /> | |
| 94 <param name="inputB" value="closestBed_b1.bed,closestBed_b2.bed" ftype="bed" /> | |
| 95 <param name="addition" value="True" /> | |
| 96 <output name="output" file="closestBed_result2.bed" ftype="bed" /> | |
| 97 </test> | |
| 98 <test> | |
| 99 <param name="inputA" value="closestBed_a.bed" ftype="bed" /> | |
| 100 <param name="inputB" value="closestBed_b1.bed,closestBed_b2.bed" ftype="bed" /> | |
| 101 <param name="addition" value="True" /> | |
| 102 <param name="mdb" value="all" /> | |
| 103 <output name="output" file="closestBed_result3.bed" ftype="bed" /> | |
| 104 </test> | |
| 105 <test> | |
| 106 <param name="inputA" value="closestBed_c.bed" ftype="bed" /> | |
| 107 <param name="inputB" value="closestBed_d.bed" ftype="bed" /> | |
| 108 <param name="addition2_select" value="ref" /> | |
| 109 <output name="output" file="closestBed_result4.bed" ftype="bed" /> | |
| 110 </test> | |
| 111 <test> | |
| 112 <param name="inputA" value="closestBed_c.bed" ftype="bed" /> | |
| 113 <param name="inputB" value="closestBed_d.bed" ftype="bed" /> | |
| 114 <param name="addition2_select" value="a" /> | |
| 115 <output name="output" file="closestBed_result5.bed" ftype="bed" /> | |
| 116 </test> | |
|
17
a2d4c30ba2f9
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 0887009a23d176b21536c9fd8a18c4fecc417d4f
iuc
parents:
8
diff
changeset
|
117 <test> |
|
a2d4c30ba2f9
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 0887009a23d176b21536c9fd8a18c4fecc417d4f
iuc
parents:
8
diff
changeset
|
118 <param name="inputA" value="closestBedA.bed" ftype="bed" /> |
|
a2d4c30ba2f9
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 0887009a23d176b21536c9fd8a18c4fecc417d4f
iuc
parents:
8
diff
changeset
|
119 <param name="inputB" value="a.bed" ftype="bed" /> |
|
a2d4c30ba2f9
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 0887009a23d176b21536c9fd8a18c4fecc417d4f
iuc
parents:
8
diff
changeset
|
120 <param name="k" value="3" /> |
|
a2d4c30ba2f9
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 0887009a23d176b21536c9fd8a18c4fecc417d4f
iuc
parents:
8
diff
changeset
|
121 <output name="output" file="closestBed_result6.bed" ftype="bed" /> |
|
a2d4c30ba2f9
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 0887009a23d176b21536c9fd8a18c4fecc417d4f
iuc
parents:
8
diff
changeset
|
122 </test> |
| 8 | 123 </tests> |
| 124 <help> | |
| 125 <![CDATA[ | |
| 126 **What it does** | |
| 127 | |
| 128 Similar to intersectBed, closestBed searches for overlapping features in A and B. In the event that no feature in B overlaps the current feature in A, closestBed will report the closest (that is, least genomic distance from the start or end of A) feature in B. For example, one might want to find which is the closest gene to a significant GWAS polymorphism. Note that closestBed will report an overlapping feature as the closest—that is, it does not restrict to closest non-overlapping feature. | |
| 129 | |
| 130 .. image:: $PATH_TO_IMAGES/closest-glyph.png | |
| 131 | |
| 132 | |
| 133 @REFERENCES@ | |
| 134 ]]> | |
| 135 </help> | |
| 136 <expand macro="citations" /> | |
| 137 </tool> |
