comparison genome_editor.xml @ 3:134bb2d7cdfd draft

planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
author cpt
date Mon, 05 Jun 2023 02:43:21 +0000
parents
children 0e8079ac24f8
comparison
equal deleted inserted replaced
2:787ce84e8d16 3:134bb2d7cdfd
1 <tool id="edu.tamu.cpt.gff3.genome_editor" name="Genome Editor" version="2.1">
2 <description>allows you to re-arrange a genome</description>
3 <macros>
4 <import>macros.xml</import>
5 <import>cpt-macros.xml</import>
6 </macros>
7 <expand macro="requirements"/>
8 <command><![CDATA[
9 @GENOME_SELECTOR_PRE@
10 'python $__tool_directory__/genome_editor.py'
11
12 @GENOME_SELECTOR@
13 @INPUT_GFF@
14 "$new_id"
15
16 --out_fasta "$out_fasta"
17 --out_gff3 "$out_gff3"
18 --out_simpleChain "$out_chain"
19 --customSeqs "$custom_seqs"
20 --changes
21 #for $idx, $change in enumerate($changes):
22 #if $change.input_type.input_type_select == "region":
23 ${change.input_type.start},${change.input_type.end},${change.input_type.revcom}
24 #else
25 custom${idx}
26 #end if
27 #end for
28 ]]></command>
29 <configfiles>
30 <configfile name="custom_seqs">
31 <![CDATA[
32 #for $idx, $change in enumerate($changes):
33 #if $change.input_type.input_type_select == "custom":
34 >custom${idx}
35 ${change.input_type.seq}
36 #end if
37 #end for
38 ]]>
39 </configfile>
40 </configfiles>
41 <inputs>
42 <expand macro="input/gff3+fasta"/>
43 <param label="New ID" name="new_id" type="text" help="New ID for the sequence to uniquely identify it from the previous build of the sequence. E.g. append Miro could become Miro.2 or Miro.v2 ">
44 <validator type="expression" message="You must specify a new ID"><![CDATA[value and len(value) > 0]]></validator>
45 </param>
46 <repeat name="changes" title="Sequence Component Selections">
47 <conditional name="input_type">
48 <param name="input_type_select" type="select" label="Data Source">
49 <option value="region" selected="True">Region from FASTA file</option>
50 <option value="custom">Custom Additional Sequence</option>
51 </param>
52 <when value="region">
53 <param label="Start" name="start" type="integer" min="1" value="1" help="Inclusive range, 1-indexed genome. (I.e. specifying 1-2000 will include base number 1)"/>
54 <param label="End" name="end" type="integer" min="1" value="1" help="Inclusive range. (I.e. specifying 1-2000 will include base number 2000)"/>
55 <param label="Reverse + Complement" name="revcom" type="boolean" truevalue="-" falsevalue="+"/>
56 </when>
57 <when value="custom">
58 <param label="Custom Sequence" name="seq" type="text" help="Enter the sequence, e.g. 'ACTG'. No FASTA definition line."/>
59 </when>
60 </conditional>
61 </repeat>
62 </inputs>
63 <outputs>
64 <data format="gff3" name="out_gff3" label="${new_id} Features"/>
65 <data format="fasta" name="out_fasta" label="${new_id}"/>
66 <data format="tabular" name="out_chain" label="${new_id} Change Table"/>
67 </outputs>
68 <tests>
69 <test>
70 <param name="reference_genome_source" value="history"/>
71 <param name="genome_fasta" value="genome_editor.simple.fa"/>
72 <param name="gff3_data" value="genome_editor.simple.gff3"/>
73 <param name="new_id" value="test2"/>
74 <repeat name="changes">
75 <conditional name="input_type">
76 <param name="input_type_select" value="region"/>
77 <param name="start" value="1"/>
78 <param name="end" value="4"/>
79 <param name="revcom" value="+"/>
80 </conditional>
81 </repeat>
82 <repeat name="changes">
83 <conditional name="input_type">
84 <param name="input_type_select" value="custom"/>
85 <param name="seq" value="cccggg"/>
86 </conditional>
87 </repeat>
88 <repeat name="changes">
89 <conditional name="input_type">
90 <param name="input_type_select" value="region"/>
91 <param name="start" value="5"/>
92 <param name="end" value="8"/>
93 <param name="revcom" value="-"/>
94 </conditional>
95 </repeat>
96 <output name="out_gff3" file="genome_editor.simple.out.gff3"/>
97 <output name="out_fasta" file="genome_editor.simple.out.fa"/>
98 <output name="out_chain" file="genome_editor.simple.out.chain"/>
99 </test>
100 <test>
101 <param name="reference_genome_source" value="history"/>
102 <param name="genome_fasta" value="miro.fa"/>
103 <param name="gff3_data" value="miro.2.gff3"/>
104 <param name="new_id" value="Miro.v2"/>
105 <repeat name="changes">
106 <conditional name="input_type">
107 <param name="input_type_select" value="region"/>
108 <param name="start" value="1"/>
109 <param name="end" value="950"/>
110 <param name="revcom" value="+"/>
111 </conditional>
112 </repeat>
113 <repeat name="changes">
114 <conditional name="input_type">
115 <param name="input_type_select" value="custom"/>
116 <param name="seq" value="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"/>
117 </conditional>
118 </repeat>
119 <repeat name="changes">
120 <conditional name="input_type">
121 <param name="input_type_select" value="region"/>
122 <param name="start" value="3170"/>
123 <param name="end" value="3450"/>
124 <param name="revcom" value="+"/>
125 </conditional>
126 </repeat>
127 <output name="out_gff3" file="genome_editor.mirov2.gff3"/>
128 <output name="out_fasta" file="genome_editor.mirov2.fa"/>
129 <output name="out_chain" file="genome_editor.mirov2.chain"/>
130 </test>
131 </tests>
132 <help><![CDATA[
133 **What it does**
134
135 Allows for re-arranging a FASTA genomic sequence, and remaps the associated features
136 from a gff3 file with the new coordinates. Segments of the genome are moved around
137 and stitched back together according to user-specified positions.
138
139 **Example FASTA input** (spaces added for clarity)::
140 >Miro
141 TTA GTA ATG GCT AAA
142
143 With user-specified *sequence component selections*:
144
145 - start: 1, end: 10, strand: +
146 - start: 6, end: 10, strand: +
147
148 the first ten bases will be listed, followed by a duplication of bases 6-10.
149 Bases 11-15 are not part of the sequence component selection parameters and
150 are therefore not in the output::
151
152 >Miro.v2
153 TTA GTA ATG GAA TGG
154
155 Alternatively, with user-specified *sequence component selections*::
156
157 - start: 1, end: 10, strand: +
158 - start: 6, end: 10, strand: -
159
160 the last section with be reverse-complemented and give the following output::
161
162 >Miro.v2
163 TTA GTA ATG GCC ATT
164
165 ]]></help>
166 <expand macro="citations"/>
167 </tool>