Mercurial > repos > iuc > bedtools
annotate bamToBed.xml @ 18:5efc48568d8d draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit e5a5ad091c621348dc6ce2df861475ebc54a380e
| author | iuc |
|---|---|
| date | Tue, 13 Oct 2015 17:20:34 -0400 |
| parents | a2d4c30ba2f9 |
| children | 71d71721695e |
| rev | line source |
|---|---|
|
17
a2d4c30ba2f9
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 0887009a23d176b21536c9fd8a18c4fecc417d4f
iuc
parents:
8
diff
changeset
|
1 <tool id="bedtools_bamtobed" name="BAM to BED" version="@WRAPPER_VERSION@.0"> |
|
a2d4c30ba2f9
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit 0887009a23d176b21536c9fd8a18c4fecc417d4f
iuc
parents:
8
diff
changeset
|
2 <description>converter</description> |
| 8 | 3 <macros> |
| 4 <import>macros.xml</import> | |
| 5 </macros> | |
|
18
5efc48568d8d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit e5a5ad091c621348dc6ce2df861475ebc54a380e
iuc
parents:
17
diff
changeset
|
6 <expand macro="requirements"> |
|
5efc48568d8d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit e5a5ad091c621348dc6ce2df861475ebc54a380e
iuc
parents:
17
diff
changeset
|
7 <requirement type="package" version="1.2">samtools</requirement> |
|
5efc48568d8d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit e5a5ad091c621348dc6ce2df861475ebc54a380e
iuc
parents:
17
diff
changeset
|
8 </expand> |
| 8 | 9 <expand macro="stdio" /> |
| 10 <command> | |
| 11 <![CDATA[ | |
|
18
5efc48568d8d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit e5a5ad091c621348dc6ce2df861475ebc54a380e
iuc
parents:
17
diff
changeset
|
12 |
|
5efc48568d8d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit e5a5ad091c621348dc6ce2df861475ebc54a380e
iuc
parents:
17
diff
changeset
|
13 #if $input.extension == 'bam' and $option == "-bedpe": |
|
5efc48568d8d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit e5a5ad091c621348dc6ce2df861475ebc54a380e
iuc
parents:
17
diff
changeset
|
14 samtools sort -n "${input}" ./input && |
|
5efc48568d8d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit e5a5ad091c621348dc6ce2df861475ebc54a380e
iuc
parents:
17
diff
changeset
|
15 #else |
|
5efc48568d8d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit e5a5ad091c621348dc6ce2df861475ebc54a380e
iuc
parents:
17
diff
changeset
|
16 ln -s "${input}" ./input.bam && |
|
5efc48568d8d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit e5a5ad091c621348dc6ce2df861475ebc54a380e
iuc
parents:
17
diff
changeset
|
17 #end if |
|
5efc48568d8d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit e5a5ad091c621348dc6ce2df861475ebc54a380e
iuc
parents:
17
diff
changeset
|
18 |
| 8 | 19 bedtools bamtobed |
| 20 $option | |
| 21 $ed_score | |
| 22 $split | |
| 23 #if $tag and str($tag).strip(): | |
| 24 -tag "${tag}" | |
| 25 #end if | |
|
18
5efc48568d8d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit e5a5ad091c621348dc6ce2df861475ebc54a380e
iuc
parents:
17
diff
changeset
|
26 -i ./input.bam |
| 8 | 27 > "${output}" |
| 28 ]]> | |
| 29 </command> | |
| 30 <inputs> | |
| 31 <param format="bam" name="input" type="data" label="Convert the following BAM file to BED"/> | |
| 32 <param name="option" type="select" label="What type of BED output would you like"> | |
|
18
5efc48568d8d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit e5a5ad091c621348dc6ce2df861475ebc54a380e
iuc
parents:
17
diff
changeset
|
33 <option value="">Create a 6-column BED file</option> |
|
5efc48568d8d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit e5a5ad091c621348dc6ce2df861475ebc54a380e
iuc
parents:
17
diff
changeset
|
34 <option value="-bed12">Create a full, 12-column "blocked" BED file</option> |
|
5efc48568d8d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit e5a5ad091c621348dc6ce2df861475ebc54a380e
iuc
parents:
17
diff
changeset
|
35 <option value="-bedpe">Create a paired-end, BEDPE format</option> |
| 8 | 36 </param> |
| 37 <expand macro="split" /> | |
| 38 <param name="ed_score" type="boolean" truevalue="-ed" falsevalue="" checked="false" | |
|
18
5efc48568d8d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit e5a5ad091c621348dc6ce2df861475ebc54a380e
iuc
parents:
17
diff
changeset
|
39 label="Use alignment's edit-distance for BED score" help="(-ed)" /> |
| 8 | 40 <param name="tag" type="text" optional="true" label="Use other NUMERIC BAM alignment tag as the BED score" |
| 41 help="(-tag)"/> | |
| 42 </inputs> | |
| 43 <outputs> | |
| 44 <data format="bed" name="output" metadata_source="input" label="${input.name} (as BED)"/> | |
| 45 </outputs> | |
| 46 <tests> | |
| 47 <test> | |
| 48 <param name="input" value="srma_in3.bam" ftype="bam" /> | |
| 49 <param name="option" value="" /> | |
| 50 <param name="tag" value="" /> | |
| 51 <output name="output" file="bamToBed_result1.bed" ftype="bed" /> | |
| 52 </test> | |
| 53 <test> | |
| 54 <param name="input" value="srma_in3.bam" ftype="bam" /> | |
| 55 <param name="option" value="" /> | |
| 56 <param name="tag" value="NM" /> | |
| 57 <output name="output" file="bamToBed_result2.bed" ftype="bed" /> | |
| 58 </test> | |
| 59 </tests> | |
| 60 <help> | |
| 61 <![CDATA[ | |
| 62 **What it does** | |
| 63 | |
| 64 bedtools bamtobed is a conversion utility that converts sequence alignments in BAM format into BED, BED12, and/or BEDPE records. | |
| 65 | |
| 66 .. class:: infomark | |
| 67 | |
|
18
5efc48568d8d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit e5a5ad091c621348dc6ce2df861475ebc54a380e
iuc
parents:
17
diff
changeset
|
68 The "Report spliced BAM alignment..." option breaks BAM alignments with the "N" (splice) operator into distinct BED entries. |
|
5efc48568d8d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit e5a5ad091c621348dc6ce2df861475ebc54a380e
iuc
parents:
17
diff
changeset
|
69 For example, using this option on a CIGAR such as 50M1000N50M would, by default, produce a single BED record that spans 1100bp. |
|
5efc48568d8d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit e5a5ad091c621348dc6ce2df861475ebc54a380e
iuc
parents:
17
diff
changeset
|
70 However, using this option, it would create two separate BED records that are each 50bp in size and are separated by 1000bp (the size of the N operation). |
|
5efc48568d8d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit e5a5ad091c621348dc6ce2df861475ebc54a380e
iuc
parents:
17
diff
changeset
|
71 This is important for RNA-seq and structural variation experiments. |
| 8 | 72 |
| 73 | |
| 74 .. class:: warningmark | |
| 75 | |
|
18
5efc48568d8d
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit e5a5ad091c621348dc6ce2df861475ebc54a380e
iuc
parents:
17
diff
changeset
|
76 If using a custom BAM alignment TAG as the BED score, note that this must be a numeric tag (e.g., type "i" as in NM:i:0). |
| 8 | 77 |
| 78 | |
| 79 @REFERENCES@ | |
| 80 ]]> | |
| 81 </help> | |
| 82 <expand macro="citations" /> | |
| 83 </tool> |
