0
|
1 <tool id="liftOver1" name="Convert genome coordinates" version="1.0.3">
|
|
2 <description> between assemblies and genomes</description>
|
|
3 <command interpreter="python">
|
|
4 liftOver_wrapper.py
|
|
5 $input
|
|
6 "$out_file1"
|
|
7 "$out_file2"
|
|
8 $dbkey
|
|
9 $to_dbkey
|
|
10 #if isinstance( $input.datatype, $__app__.datatypes_registry.get_datatype_by_extension('gff').__class__) or isinstance( $input.datatype, $__app__.datatypes_registry.get_datatype_by_extension('gtf').__class__):
|
|
11 "gff"
|
|
12 #else:
|
|
13 "interval"
|
|
14 #end if
|
|
15 $minMatch ${multiple.choice} ${multiple.minChainT} ${multiple.minChainQ} ${multiple.minSizeQ}
|
|
16 </command>
|
|
17 <inputs>
|
|
18 <param format="interval,gff,gtf" name="input" type="data" label="Convert coordinates of">
|
|
19 <validator type="unspecified_build" />
|
|
20 <validator type="dataset_metadata_in_file" filename="liftOver.loc" metadata_name="dbkey" metadata_column="0" message="Liftover mappings are currently not available for the specified build." />
|
|
21 </param>
|
|
22 <param name="to_dbkey" type="select" label="To">
|
|
23 <options from_file="liftOver.loc">
|
|
24 <column name="name" index="1"/>
|
|
25 <column name="value" index="2"/>
|
|
26 <column name="dbkey" index="0"/>
|
|
27 <filter type="data_meta" ref="input" key="dbkey" column="0" />
|
|
28 </options>
|
|
29 </param>
|
|
30 <param name="minMatch" size="10" type="float" value="0.95" label="Minimum ratio of bases that must remap" help="Recommended values: same species = 0.95, different species = 0.10" />
|
|
31 <conditional name="multiple">
|
|
32 <param name="choice" type="select" label="Allow multiple output regions?" help="Recommended values: same species = No, different species = Yes">
|
|
33 <option value="0" selected="true">No</option>
|
|
34 <option value="1">Yes</option>
|
|
35 </param>
|
|
36 <when value="0">
|
|
37 <param name="minSizeQ" type="hidden" value="0" />
|
|
38 <param name="minChainQ" type="hidden" value="0" />
|
|
39 <param name="minChainT" type="hidden" value="0" />
|
|
40 </when>
|
|
41 <when value="1">
|
|
42 <param name="minSizeQ" size="10" type="integer" value="0" label="Minimum matching region size in query" help="Recommended value: set to >= 300 bases for complete transcripts"/>
|
|
43 <param name="minChainQ" size="10" type="integer" value="500" label="Minimum chain size in query"/>
|
|
44 <param name="minChainT" size="10" type="integer" value="500" label="Minimum chain size in target"/>
|
|
45 </when>
|
|
46 </conditional>
|
|
47 </inputs>
|
|
48 <outputs>
|
|
49 <data format="input" name="out_file1" label="${tool.name} on ${on_string} [ MAPPED COORDINATES ]">
|
|
50 <actions>
|
|
51 <action type="metadata" name="dbkey">
|
|
52 <option type="from_file" name="liftOver.loc" column="1" offset="0">
|
|
53 <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/>
|
|
54 <filter type="param_value" ref="to_dbkey" column="2"/>
|
|
55 </option>
|
|
56 </action>
|
|
57 </actions>
|
|
58 </data>
|
|
59 <data format="input" name="out_file2" label="${tool.name} on ${on_string} [ UNMAPPED COORDINATES ]" />
|
|
60 </outputs>
|
|
61 <requirements>
|
|
62 <requirement type="package">ucsc_tools</requirement>
|
|
63 </requirements>
|
|
64 <tests>
|
|
65 <test>
|
|
66 <param name="input" value="5.bed" dbkey="hg18" ftype="bed" />
|
|
67 <param name="to_dbkey" value="panTro2" />
|
|
68 <param name="minMatch" value="0.95" />
|
|
69 <param name="choice" value="0" />
|
|
70 <output name="out_file1" file="5_liftover_mapped.bed"/>
|
|
71 <output name="out_file2" file="5_liftover_unmapped.bed"/>
|
|
72 </test>
|
|
73 <test>
|
|
74 <param name="input" value="5.bed" dbkey="hg18" ftype="bed" />
|
|
75 <param name="to_dbkey" value="panTro2" />
|
|
76 <param name="minMatch" value="0.10" />
|
|
77 <param name="choice" value="1" />
|
|
78 <param name="minSizeQ" value="0" />
|
|
79 <param name="minChainQ" value="500" />
|
|
80 <param name="minChainT" value="500" />
|
|
81 <output name="out_file1" file="5_mult_liftover_mapped.bed"/>
|
|
82 <output name="out_file2" file="5_mult_liftover_unmapped.bed"/>
|
|
83 </test>
|
|
84 <test>
|
|
85 <param name="input" value="cuffcompare_in1.gtf" dbkey="hg18" ftype="gtf" />
|
|
86 <param name="to_dbkey" value="panTro2" />
|
|
87 <param name="minMatch" value="0.95" />
|
|
88 <param name="choice" value="0" />
|
|
89 <output name="out_file1" file="cuffcompare_in1_liftover_mapped.bed"/>
|
|
90 <output name="out_file2" file="cuffcompare_in1_liftover_unmapped.bed"/>
|
|
91 </test>
|
|
92 <test>
|
|
93 <param name="input" value="cuffcompare_in1.gtf" dbkey="hg18" ftype="gtf" />
|
|
94 <param name="to_dbkey" value="panTro2" />
|
|
95 <param name="minMatch" value="0.10" />
|
|
96 <param name="choice" value="1" />
|
|
97 <param name="minSizeQ" value="0" />
|
|
98 <param name="minChainQ" value="500" />
|
|
99 <param name="minChainT" value="500" />
|
|
100 <output name="out_file1" file="cuffcompare_in1_mult_liftover_mapped.bed"/>
|
|
101 <output name="out_file2" file="cuffcompare_in1_mult_liftover_unmapped.bed"/>
|
|
102 </test>
|
|
103 </tests>
|
|
104 <help>
|
|
105 .. class:: warningmark
|
|
106
|
|
107 Make sure that the genome build of the input dataset is specified (click the pencil icon in the history item to set it if necessary).
|
|
108
|
|
109 .. class:: warningmark
|
|
110
|
|
111 This tool can work with interval, GFF, and GTF datasets. It requires the interval datasets to have chromosome in column 1,
|
|
112 start co-ordinate in column 2 and end co-ordinate in column 3. BED comments
|
|
113 and track and browser lines will be ignored, but if other non-interval lines
|
|
114 are present the tool will return empty output datasets.
|
|
115
|
|
116 -----
|
|
117
|
|
118 .. class:: infomark
|
|
119
|
|
120 **What it does**
|
|
121
|
|
122 This tool is based on the LiftOver utility and Chain track from `the UC Santa Cruz Genome Browser`__.
|
|
123
|
|
124 It converts coordinates and annotations between assemblies and genomes. It produces 2 files, one containing all the mapped coordinates and the other containing the unmapped coordinates, if any.
|
|
125
|
|
126 .. __: http://genome.ucsc.edu/
|
|
127
|
|
128 -----
|
|
129
|
|
130 **Example**
|
|
131
|
|
132 Converting the following hg16 intervals to hg18 intervals::
|
|
133
|
|
134 chrX 85170 112199 AK002185 0 +
|
|
135 chrX 110458 112199 AK097346 0 +
|
|
136 chrX 112203 121212 AK074528 0 -
|
|
137
|
|
138 will produce the following hg18 intervals::
|
|
139
|
|
140 chrX 132991 160020 AK002185 0 +
|
|
141 chrX 158279 160020 AK097346 0 +
|
|
142 chrX 160024 169033 AK074528 0 -
|
|
143
|
|
144 </help>
|
|
145 </tool>
|