Mercurial > repos > greg > phylogenomics_analysis
comparison phylogenomics_analysis.xml @ 65:534604580eb5 draft
Uploaded
author | greg |
---|---|
date | Tue, 28 Feb 2017 09:40:01 -0500 |
parents | c2d2ca6cf94b |
children | 6d93b214ec55 |
comparison
equal
deleted
inserted
replaced
64:a0c347192b08 | 65:534604580eb5 |
---|---|
1 <tool id="plant_tribes_phylogenomics_analysis" name="Create multiple sequence alignments" version="0.3"> | 1 <tool id="plant_tribes_phylogenomics_analysis" name="Create multiple sequence alignments" version="0.6.0"> |
2 <description>and inferred maximum likelihood phylogenies</description> | 2 <description>and inferred maximum likelihood phylogenies</description> |
3 <requirements> | 3 <requirements> |
4 <requirement type="package" version="0.3">plant_tribes_phylogenomics_analysis | 4 <requirement type="package" version="0.6">plant_tribes_phylogenomics_analysis</requirement> |
5 </requirement> | |
6 </requirements> | 5 </requirements> |
7 <stdio> | 6 <stdio> |
8 <!-- Anything other than zero is an error --> | 7 <!-- Anything other than zero is an error --> |
9 <exit_code range="1:" /> | 8 <exit_code range="1:" /> |
10 <exit_code range=":-1" /> | 9 <exit_code range=":-1" /> |
16 <![CDATA[ | 15 <![CDATA[ |
17 #import os | 16 #import os |
18 #import sys | 17 #import sys |
19 | 18 |
20 #set input_format = $input_format_cond.input_format | 19 #set input_format = $input_format_cond.input_format |
21 #set pipeline_output_dir = 'phylogenomicsAnalysis_dir' | 20 #if str($input_format) == 'ptorthocs': |
22 #set src_aln_dir = $os.path.join($pipeline_output_dir, 'orthogroups_aln') | |
23 #set src_fasta_dir = $os.path.join($pipeline_output_dir, 'orthogroups_fasta') | |
24 #set src_tree_dir = $os.path.join($pipeline_output_dir, 'orthogroups_tree') | |
25 | |
26 #if str($input_format) == 'ptortho': | |
27 #set dest_fasta_dir = $output_fasta_ptortho.extra_files_path | |
28 #set multiple_codon_alignments = 'no' | |
29 #set use_corresponding_coding_sequences = 'no' | |
30 #else: | |
31 #set dest_fasta_dir = $output_fasta_ptorthocs.extra_files_path | |
32 #set multiple_codon_alignments_cond = $input_format_cond.multiple_codon_alignments_cond | 21 #set multiple_codon_alignments_cond = $input_format_cond.multiple_codon_alignments_cond |
33 #set multiple_codon_alignments = $multiple_codon_alignments_cond.multiple_codon_alignments | 22 #set multiple_codon_alignments = $multiple_codon_alignments_cond.multiple_codon_alignments |
34 #if str($multiple_codon_alignments) == 'yes': | 23 #if str($multiple_codon_alignments) == 'yes': |
35 #set use_corresponding_coding_sequences_cond = $multiple_codon_alignments_cond.use_corresponding_coding_sequences_cond | 24 --sequence_type $multiple_codon_alignments_cond.sequence_type |
36 #set use_corresponding_coding_sequences = $use_corresponding_coding_sequences_cond.use_corresponding_coding_sequences | 25 #end if |
37 #else: | 26 #end if |
38 #set use_corresponding_coding_sequences = 'no' | |
39 #end if | |
40 #end if | |
41 mkdir -p $dest_fasta_dir && | |
42 | 27 |
43 #if str($options_type.options_type_selector) == 'advanced': | 28 #if str($options_type.options_type_selector) == 'advanced': |
44 #set multiple_sequence_alignments_cond = $options_type.multiple_sequence_alignments_cond | 29 #set multiple_sequence_alignments_cond = $options_type.multiple_sequence_alignments_cond |
45 #set multiple_sequence_alignments = $multiple_sequence_alignments_cond.multiple_sequence_alignments | 30 #set multiple_sequence_alignments = $multiple_sequence_alignments_cond.multiple_sequence_alignments |
46 #if str($multiple_sequence_alignments) == 'yes': | 31 #if str($multiple_sequence_alignments) == 'yes': |
47 #set multiple_sequence_alignments_option_cond = $options_type.multiple_sequence_alignments_cond.multiple_sequence_alignments_option_cond | 32 #set multiple_sequence_alignments_option_cond = $options_type.multiple_sequence_alignments_cond.multiple_sequence_alignments_option_cond |
48 #set multiple_sequence_alignments_option = $multiple_sequence_alignments_option_cond.multiple_sequence_alignments_option | 33 #set multiple_sequence_alignments_option = $multiple_sequence_alignments_option_cond.multiple_sequence_alignments_option |
49 #set generate_output_aln = True | 34 #set generate_output_aln = True |
50 #set dest_aln_dir = $output_aln.extra_files_path | |
51 mkdir -p $dest_aln_dir && | |
52 #else: | 35 #else: |
53 #set generate_output_aln = False | 36 #set generate_output_aln = False |
54 #end if | 37 #end if |
55 #else: | 38 #else: |
56 #set generate_output_aln = False | 39 #set generate_output_aln = False |
57 #end if | 40 #end if |
58 | 41 |
59 #if str($options_type.options_type_selector) == 'advanced' and str($options_type.phylogenetic_trees_cond.phylogenetic_trees) == 'yes': | 42 #if str($options_type.options_type_selector) == 'advanced' and str($options_type.phylogenetic_trees_cond.phylogenetic_trees) == 'yes': |
60 #set generate_output_tree = True | 43 #set generate_output_tree = True |
61 #set dest_tree_dir = $output_tree.extra_files_path | |
62 mkdir -p $dest_tree_dir && | |
63 #else: | 44 #else: |
64 #set generate_output_tree = False | 45 #set generate_output_tree = False |
65 #end if | 46 #end if |
66 | 47 |
67 PhylogenomicsAnalysis | 48 python $__tool_directory__/phylogenomics_analysis.py |
68 --num_threads \${GALAXY_SLOTS:-4} | 49 --num_threads \${GALAXY_SLOTS:-4} |
69 #if str($input_format) == 'ptortho': | 50 #if str($input_format) == 'ptortho': |
70 --orthogroup_faa '$input_format_cond.input_ptortho.extra_files_path' | 51 --orthogroup_faa '$input_format_cond.input_ptortho.extra_files_path' |
71 #else: | 52 #else: |
72 --orthogroup_faa '$input_format_cond.input_ptorthocs.extra_files_path' | 53 --orthogroup_faa '$input_format_cond.input_ptorthocs.extra_files_path' |
73 --orthogroup_fna | 54 --orthogroup_fna 'true' |
74 #end if | 55 #end if |
75 --config_dir '$scaffold.fields.path' | 56 --config_dir '$scaffold.fields.path' |
76 --scaffold '$scaffold.fields.path' | 57 --scaffold '$scaffold.fields.path' |
77 --method $method | 58 --method $method |
78 | 59 |
79 #if str($options_type.options_type_selector) == 'advanced': | 60 #if str($options_type.options_type_selector) == 'advanced': |
80 #if str($multiple_sequence_alignments) == 'yes': | 61 #if str($multiple_sequence_alignments) == 'yes': |
81 #if str($multiple_sequence_alignments_option) == 'create_alignments': | 62 --alignments_method $multiple_sequence_alignments_option |
82 --create_alignments | 63 if str($multiple_sequence_alignments_option) == 'pasta_alignments': |
83 #else if str($multiple_sequence_alignments_option) == 'add_alignments': | |
84 --add_alignments | |
85 #else if str($multiple_sequence_alignments_option) == 'pasta_alignments': | |
86 --pasta_script_path '$__tool_directory__/run_pasta.py' | 64 --pasta_script_path '$__tool_directory__/run_pasta.py' |
87 --pasta_alignments | |
88 --pasta_iter_limit $multiple_sequence_alignments_option_cond.pasta_iter_limit | 65 --pasta_iter_limit $multiple_sequence_alignments_option_cond.pasta_iter_limit |
89 #end if | 66 #end if |
90 #end if | 67 #end if |
91 | 68 |
92 #if str($options_type.phylogenetic_trees_cond.phylogenetic_trees) == 'yes': | 69 #if str($options_type.phylogenetic_trees_cond.phylogenetic_trees) == 'yes': |
96 #if str($tree_inference_method) == 'raxml': | 73 #if str($tree_inference_method) == 'raxml': |
97 #set rooting_order_file_cond = $tree_inference_cond.rooting_order_file_cond | 74 #set rooting_order_file_cond = $tree_inference_cond.rooting_order_file_cond |
98 #set rooting_order_file = $rooting_order_file_cond.rooting_order_file | 75 #set rooting_order_file = $rooting_order_file_cond.rooting_order_file |
99 #if str($rooting_order_file) == 'yes': | 76 #if str($rooting_order_file) == 'yes': |
100 --rooting_order '$rooting_order_file_cond.rooting_order' | 77 --rooting_order '$rooting_order_file_cond.rooting_order' |
101 # No else block needed here because the default rooting_order | 78 # No else block needed here because the default rooting_order |
102 # configuration will be used if the --rooting_order flag is missing. | 79 # configuration will be used if the --rooting_order flag is missing. |
103 #end if | 80 #end if |
104 --bootstrap_replicates $tree_inference_cond.bootstrap_replicates | 81 --bootstrap_replicates $tree_inference_cond.bootstrap_replicates |
105 #end if | 82 #end if |
106 --max_orthogroup_size $options_type.phylogenetic_trees_cond.max_orthogroup_size | 83 --max_orthogroup_size $options_type.phylogenetic_trees_cond.max_orthogroup_size |
107 --min_orthogroup_size $options_type.phylogenetic_trees_cond.min_orthogroup_size | 84 --min_orthogroup_size $options_type.phylogenetic_trees_cond.min_orthogroup_size |
111 #set msa_quality_control_options_cond = $options_type.msa_quality_control_options_cond | 88 #set msa_quality_control_options_cond = $options_type.msa_quality_control_options_cond |
112 #set remove_gappy_sequences_cond = $msa_quality_control_options_cond.remove_gappy_sequences_cond | 89 #set remove_gappy_sequences_cond = $msa_quality_control_options_cond.remove_gappy_sequences_cond |
113 #if str($remove_gappy_sequences_cond) == 'yes': | 90 #if str($remove_gappy_sequences_cond) == 'yes': |
114 #set trim_type_cond = $remove_gappy_sequences_cond.trim_type_cond | 91 #set trim_type_cond = $remove_gappy_sequences_cond.trim_type_cond |
115 --remove_sequences $remove_gappy_sequences_cond.remove_sequences | 92 --remove_sequences $remove_gappy_sequences_cond.remove_sequences |
116 #if str($trim_type_cond.trim_type) == 'automated_trimming': | 93 --trim_type $trim_type_cond.trim_type |
117 --automated_trimming | 94 #if str($trim_type_cond.trim_type) == 'gap_trimming': |
118 #else: | |
119 --gap_trimming $trim_type_cond.gap_trimming | 95 --gap_trimming $trim_type_cond.gap_trimming |
120 #end if | 96 #end if |
121 #end if | 97 #end if |
122 #end if | 98 #end if |
123 #end if | 99 #end if |
124 >/dev/null | 100 |
125 | |
126 && echo "Sequence alignments and corresponding phylogenies" | |
127 #if str($input_format) == 'ptortho': | 101 #if str($input_format) == 'ptortho': |
128 && echo -e "#Size\tName" > $output_fasta_ptortho | 102 --output_ptortho '$output_ptortho' |
129 && ls -l $src_fasta_dir | grep f | awk -F ' ' '{print $5"\t"$9}' >> $output_fasta_ptortho | 103 --output_ptortho_dir '$output_ptortho.files_path' |
130 #else: | 104 #else: |
131 && echo -e "#Size\tName" > $output_fasta_ptorthocs | 105 --output_ptorthocs '$output_ptorthocs' |
132 && ls -l $src_fasta_dir | grep f | awk -F ' ' '{print $5"\t"$9}' >> $output_fasta_ptorthocs | 106 --output_ptorthocs_dir '$output_ptorthocs.files_path' |
133 #end if | 107 #end if |
134 && mv $src_fasta_dir/* $dest_fasta_dir || true | |
135 | 108 |
136 #if $generate_output_aln: | 109 #if $generate_output_aln: |
137 && echo -e "#Size\tName" > $output_aln | 110 --output_aln '$output_aln' |
138 && ls -l $src_aln_dir | grep f | awk -F ' ' '{print $5"\t"$9}' >> $output_aln | 111 --output_aln_dir '$output_aln.files_path' |
139 && mv $src_aln_dir/* $dest_aln_dir || true | |
140 #end if | 112 #end if |
141 | 113 |
142 #if $generate_output_tree: | 114 #if $generate_output_tree: |
143 && echo -e "#Size\tName" > $output_tree | 115 --output_tree '$output_tree' |
144 && ls -l $src_tree_dir | grep f | awk -F ' ' '{print $5"\t"$9}' >> $output_tree | 116 --output_tree_dir '$output_tree.files_path' |
145 && mv $src_tree_dir/* $dest_tree_dir || true | |
146 #end if | 117 #end if |
147 ]]> | 118 ]]> |
148 </command> | 119 </command> |
149 <inputs> | 120 <inputs> |
150 <conditional name="input_format_cond"> | 121 <conditional name="input_format_cond"> |
166 <when value="yes"> | 137 <when value="yes"> |
167 <param name="sequence_type" type="select" label="Sequence type used in the phylogenetic inference (dna)"> | 138 <param name="sequence_type" type="select" label="Sequence type used in the phylogenetic inference (dna)"> |
168 <option value="protein" selected="true">Amino acid based</option> | 139 <option value="protein" selected="true">Amino acid based</option> |
169 <option value="dna">Nucleotide based</option> | 140 <option value="dna">Nucleotide based</option> |
170 </param> | 141 </param> |
171 <conditional name="use_corresponding_coding_sequences_cond"> | |
172 <param name="use_corresponding_coding_sequences" type="select" label="Use corresponding coding sequences?"> | |
173 <option value="no" selected="true">No</option> | |
174 <option value="yes">Yes</option> | |
175 </param> | |
176 <when value="no" /> | |
177 <when value="yes" /> | |
178 </conditional> | |
179 </when> | 142 </when> |
180 </conditional> | 143 </conditional> |
181 </when> | 144 </when> |
182 </conditional> | 145 </conditional> |
183 <param name="scaffold" type="select" label="Orthogroups or gene families proteins scaffold"> | 146 <param name="scaffold" type="select" label="Orthogroups or gene families proteins scaffold"> |
211 <option value="pasta_alignments">Create orthogroup protein multiple sequence alignments including scaffold backbone proteins (PASTA algorithm)</option> | 174 <option value="pasta_alignments">Create orthogroup protein multiple sequence alignments including scaffold backbone proteins (PASTA algorithm)</option> |
212 </param> | 175 </param> |
213 <when value="create_alignments" /> | 176 <when value="create_alignments" /> |
214 <when value="add_alignments" /> | 177 <when value="add_alignments" /> |
215 <when value="pasta_alignments"> | 178 <when value="pasta_alignments"> |
216 <param name="pasta_iter_limit" type="integer" value="3" min="0" label="Maximum number of iteration that the PASTA algorithm will run" /> | 179 <param name="pasta_iter_limit" type="integer" value="3" min="0" label="Maximum number of iteration that the PASTA algorithm will execute" /> |
217 </when> | 180 </when> |
218 </conditional> | 181 </conditional> |
219 </when> | 182 </when> |
220 </conditional> | 183 </conditional> |
221 <conditional name="phylogenetic_trees_cond"> | 184 <conditional name="phylogenetic_trees_cond"> |
280 </conditional> | 243 </conditional> |
281 </when> | 244 </when> |
282 </conditional> | 245 </conditional> |
283 </inputs> | 246 </inputs> |
284 <outputs> | 247 <outputs> |
285 <data name="output_fasta_ptortho" format="ptortho"> | 248 <data name="output_ptortho" format="ptortho"> |
286 <filter>input_format_cond['input_format'] == 'ptortho'</filter> | 249 <filter>input_format_cond['input_format'] == 'ptortho'</filter> |
287 </data> | 250 </data> |
288 <data name="output_fasta_ptorthocs" format="ptorthocs"> | 251 <data name="output_ptorthocs" format="ptorthocs"> |
289 <filter>input_format_cond['input_format'] == 'ptorthocs'</filter> | 252 <filter>input_format_cond['input_format'] == 'ptorthocs'</filter> |
290 </data> | 253 </data> |
291 <data name="output_aln" format="ptalign" label="Multiple alignments using method ${options_type['multiple_sequence_alignments_cond']['multiple_sequence_alignments_option_cond']['multiple_sequence_alignments_option']} on ${on_string}"> | 254 <data name="output_aln" format="ptalign" label="Multiple alignments using method ${options_type['multiple_sequence_alignments_cond']['multiple_sequence_alignments_option_cond']['multiple_sequence_alignments_option']} on ${on_string}"> |
292 <filter>options_type['options_type_selector'] == 'advanced' and options_type['multiple_sequence_alignments_cond']['multiple_sequence_alignments'] == 'yes'</filter> | 255 <filter>options_type['options_type_selector'] == 'advanced' and options_type['multiple_sequence_alignments_cond']['multiple_sequence_alignments'] == 'yes'</filter> |
293 </data> | 256 </data> |