annotate bamtobed.xml @ 1:fef10ad6ee15 draft

Uploaded
author geoffrey.dintilhac
date Sat, 21 Dec 2019 13:00:33 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
1 <tool id="bam_to_bed_convert" name="BAM-to-BED" version="1.0"> <!-- tool's name displayed on Galaxy -->
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
2 <description>converter</description>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
3
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
4 <requirements> <!-- package required -->
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
5 <requirement type="package" version="2.29.0">bedtools</requirement>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
6 </requirements>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
7
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
8 <command interpreter="python">bamtobed.py
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
9 -i $input
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
10 -o $output
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
11 -oot $conditional.selector
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
12
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
13 #if $conditional.selector =="Y":
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
14 -f $conditional.format_output_chosen
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
15 #end if
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
16
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
17 -sc $score_calcul_selector.score_calcul_BED
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
18 #if $score_calcul_selector.score_calcul_BED =="tag":
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
19 -tag $score_calcul_selector.calcul_BED_tag
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
20 #end if
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
21
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
22 #if $split_boolean =="Y":
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
23 -spt
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
24 #end if
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
25
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
26 #if $cigar_boolean =="Y":
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
27 -cgr
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
28 #end if
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
29 </command>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
30
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
31
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
32 <inputs>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
33
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
34 <param format="bam" name="input" type="data" label="Source file"/> <!-- input file -->
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
35
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
36 <conditional name="conditional"> <!-- Output file format different from BED ? -->
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
37 <param name="selector" type="select" label="Output file format different from BED">
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
38 <option value="N">No</option>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
39 <option value="Y">Yes</option>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
40 </param>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
41
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
42
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
43
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
44 <when value="N"/>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
45 <when value="Y"> <!-- format output chosen = not BED -->
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
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 -->
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
47 <option value="BEDPE">BEDPE : add fields (chrom2, star2, end2, strand2) for paired-end sequence alignments</option>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
48 <option value="BED12">BED12 : each feature is described by all 12 columns</option>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
49 </param>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
50 </when>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
51 </conditional>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
52
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
53 <conditional name="score_calcul_selector"> <!-- choice of the score calculation -->
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
54 <param name="score_calcul_BED" type="select" label="Select a calculation for BED score">
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
55 <option value="mapq">Use mapping quality (default)</option>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
56 <option value="ed">Use alignment's edit-distance for BED score</option>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
57 <option value="tag">Use other BAM alignment tag for BED score</option>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
58 </param>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
59 <when value="tag">
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
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 /!\"/>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
61 </when>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
62 </conditional>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
63
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
64 <!-- option split and cigar : -->
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
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>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
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>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
67
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
68 </inputs>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
69
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
70
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
71 <outputs>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
72 <data format="bed" name="output"/>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
73 </outputs>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
74
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
75
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
76 <tests>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
77 <test>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
78 <param name="input" value="bam_to_bed_convert.bam"/>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
79 <output name="out_file" file="bam_to_bed_convert.bed"/>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
80 </test>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
81 </tests>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
82
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
83
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
84 <help>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
85 **What it does**: this tool converts sequence alignments in BAM format into BED, BED12 or BEDPE format running the command "bamtobed" of bedtools.
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
86
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
87 .. class:: warningmark
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
88
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
89 If you want a **BEDPE output**, your input has to be paired-end and sorted by read name.
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
90
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
91 .. class:: warningmark
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
92
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
93 About **score calculation** : the option "another tag" is disallowed with BEDPE output.
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
94
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
95 .. class:: warningmark
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
96
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
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.
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
98
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
99 .. class:: infomark
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
100
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
101 For more information, please refer to this link : https://bedtools.readthedocs.io/en/latest/content/tools/bamtobed.html
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
102
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
103 This wrapper is available to install into other Galaxy Instances via the Galaxy
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
104 Tool Shed at https://toolshed.g2.bx.psu.edu/view/geoffrey.dintilhac/bam_to_bed/68f7b5a4b1e2
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
105
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
106 **If you use this tool in Galaxy, please cite:**
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
107
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
108 </help>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
109
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
110 <citations>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
111 <citation type="doi">10.1093/bioinformatics/btq033</citation>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
112 </citations>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
113
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
114 </tool>
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
115
fef10ad6ee15 Uploaded
geoffrey.dintilhac
parents:
diff changeset
116