Mercurial > repos > geoffrey.dintilhac > bam_to_bed_test
comparison bamtobed.xml @ 1:aba7a47e9ed2 draft default tip
Uploaded
author | geoffrey.dintilhac |
---|---|
date | Fri, 22 Nov 2019 12:07:41 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:c1f46404277e | 1:aba7a47e9ed2 |
---|---|
1 <tool id="bam_to_bed_convert" name="BAM-to-BED" version="1.0"> <!-- tool's name displayed on Galaxy --> | |
2 <description>converter</description> | |
3 | |
4 <requirements> <!-- package required --> | |
5 <requirement type="package" version="2.29.0">bedtools</requirement> | |
6 </requirements> | |
7 | |
8 <command interpreter="python">bamtobed.py | |
9 -i $input | |
10 -o $output | |
11 -oot $conditional.selector | |
12 | |
13 #if $conditional.selector =="Y": | |
14 -f $conditional.format_output_chosen | |
15 #end if | |
16 | |
17 -sc $score_calcul_selector.score_calcul_BED | |
18 #if $score_calcul_selector.score_calcul_BED =="tag": | |
19 -tag $score_calcul_selector.calcul_BED_tag | |
20 #end if | |
21 | |
22 #if $split_boolean =="Y": | |
23 -spt | |
24 #end if | |
25 | |
26 #if $cigar_boolean =="Y": | |
27 -cgr | |
28 #end if | |
29 </command> | |
30 | |
31 | |
32 <inputs> | |
33 | |
34 <param format="bam" name="input" type="data" label="Source file"/> <!-- input file --> | |
35 | |
36 <conditional name="conditional"> <!-- Output file format different from BED ? --> | |
37 <param name="selector" type="select" label="Output file format different from BED"> | |
38 <option value="N">No</option> | |
39 <option value="Y">Yes</option> | |
40 </param> | |
41 | |
42 | |
43 | |
44 <when value="N"/> | |
45 <when value="Y"> <!-- format output chosen = not BED --> | |
46 <param name="format_output_chosen" type="select" label="Output file format chosen" help="use BEDPE only with paired-end input (and sorted by read name) dataset"> <!-- choice of output file format --> | |
47 <option value="BEDPE">BEDPE : add fields (chrom2, star2, end2, strand2) for paired-end sequence alignments</option> | |
48 <option value="BED12">BED12 : each feature is described by all 12 columns</option> | |
49 </param> | |
50 </when> | |
51 </conditional> | |
52 | |
53 <conditional name="score_calcul_selector"> <!-- choice of the score calculation --> | |
54 <param name="score_calcul_BED" type="select" label="Select a calculation for BED score"> | |
55 <option value="mapq">Use mapping quality (default)</option> | |
56 <option value="ed">Use alignment's edit-distance for BED score</option> | |
57 <option value="tag">Use other BAM alignment tag for BED score</option> | |
58 </param> | |
59 <when value="tag"> | |
60 <param name="calcul_BED_tag" type="text" label="Enter other BAM alignment tag as the BED score" help ="/!\ Choice of another tag for score calculation is disallowed with BEDPE output /!\"/> | |
61 </when> | |
62 </conditional> | |
63 | |
64 <!-- option split and cigar : --> | |
65 <param name="split_boolean" type="boolean" truevalue="Y" falsevalue="N" checked="false" label="To split or not to split ?" help="Report each portion of a “split” BAM while obeying both “N” CIGAR and “D” operation. Be careful : -split is disallowed with edit-distance as a calculation for BED score."></param> | |
66 <param name="cigar_boolean" type="boolean" truevalue="Y" falsevalue="N" checked="false" label="CIGAR string ?" help="Add the CIGAR string to the BED entry as a 7th column. Be careful : -cigar is not displayed with -splits, and disallowed with edit-distance as a calculation for BED score."></param> | |
67 | |
68 </inputs> | |
69 | |
70 | |
71 <outputs> | |
72 <data format="bed" name="output"/> | |
73 </outputs> | |
74 | |
75 | |
76 <tests> | |
77 <test> | |
78 <param name="input" value="bam_to_bed_convert.bam"/> | |
79 <output name="out_file" file="bam_to_bed_convert.bed"/> | |
80 </test> | |
81 </tests> | |
82 | |
83 | |
84 <help> | |
85 **What it does**: this tool converts sequence alignments in BAM format into BED, BED12 or BEDPE format running the command "bamtobed" of bedtools. | |
86 | |
87 .. class:: warningmark | |
88 | |
89 If you want a **BEDPE output**, your input has to be paired-end and sorted by read name. | |
90 | |
91 .. class:: warningmark | |
92 | |
93 About **score calculation** : the option "another tag" is disallowed with BEDPE output. | |
94 | |
95 .. class:: warningmark | |
96 | |
97 About the options **-split** and **-cigar** : -split is disallowed with edit-distance as a calculation for BED score. -cigar is not displayed with -splits, and disallowed with edit-distance as a calculation for BED score. | |
98 | |
99 .. class:: infomark | |
100 | |
101 For more information, please refer to this link : https://bedtools.readthedocs.io/en/latest/content/tools/bamtobed.html | |
102 | |
103 This wrapper is available to install into other Galaxy Instances via the Galaxy | |
104 Tool Shed at | |
105 | |
106 **If you use this tool in Galaxy, please cite:** | |
107 | |
108 </help> | |
109 | |
110 <citations> | |
111 <citation type="doi">10.1093/bioinformatics/btq033</citation> | |
112 </citations> | |
113 | |
114 </tool> | |
115 | |
116 |