Mercurial > repos > greg > gene_family_aligner
changeset 14:af8dad310c32 draft
Uploaded
author | greg |
---|---|
date | Tue, 11 Apr 2017 14:21:35 -0400 |
parents | d7e6201b8d81 |
children | 5a5f80ea6306 |
files | gene_family_aligner.py gene_family_aligner.xml macros.xml |
diffstat | 3 files changed, 28 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/gene_family_aligner.py Mon Apr 10 14:46:51 2017 -0400 +++ b/gene_family_aligner.py Tue Apr 11 14:21:35 2017 -0400 @@ -11,15 +11,15 @@ parser.add_argument('--alignment_method', dest='alignment_method', help='Multiple sequence alignments method') parser.add_argument('--automated_trimming', dest='automated_trimming', default=None, help="Trims alignments using trimAl's ML heuristic trimming approach") parser.add_argument('--codon_alignments', dest='codon_alignments', default=None, help="Flag for constructing orthogroup multiple codon alignments") -parser.add_argument('--gap_trimming', dest='gap_trimming', default=None, type=float, help='Remove sites in alignments with gaps of') -parser.add_argument('--iterative_realignment', dest='iterative_realignment', type=int, default=None, help='"Maximum number of iterations') +parser.add_argument('--gap_trimming', dest='gap_trimming', default=0, type=float, help='Remove sites in alignments with gaps of') +parser.add_argument('--iterative_realignment', dest='iterative_realignment', type=int, default=0, help='"Maximum number of iterations') parser.add_argument('--num_threads', dest='num_threads', type=int, help='Number of threads to use for execution') parser.add_argument('--orthogroup_faa', dest='orthogroup_faa', help="Directory of input fasta datasets") parser.add_argument('--output', dest='output', help="Output dataset") parser.add_argument('--output_dir', dest='output_dir', help="Output dataset files_path directory") parser.add_argument('--pasta_iter_limit', dest='pasta_iter_limit', type=int, default=None, help='"Maximum number of iteration that the PASTA algorithm will execute') parser.add_argument('--pasta_script_path', dest='pasta_script_path', default=None, help='Path to script for executing pasta') -parser.add_argument('--remove_sequences', dest='remove_sequences', default=None, type=float, help='Remove sequences with gaps of') +parser.add_argument('--remove_sequences', dest='remove_sequences', default=0, type=float, help='Remove sequences with gaps of') args = parser.parse_args() @@ -37,11 +37,11 @@ cmd += ' --codon_alignments' if args.automated_trimming is not None: cmd += ' --automated_trimming' -if args.gap_trimming is not None: +if args.gap_trimming > 0: cmd += ' --gap_trimming %4f' % args.gap_trimming -if args.remove_sequences is not None: +if args.remove_sequences > 0: cmd += ' --remove_sequences %4f' % args.remove_sequences -if args.iterative_realignment is not None: +if args.iterative_realignment > 0: cmd += ' --iterative_realignment %d' % args.iterative_realignment # Run the command. proc = subprocess.Popen(args=cmd, stderr=subprocess.PIPE, stdout=subprocess.PIPE, shell=True)
--- a/gene_family_aligner.xml Mon Apr 10 14:46:51 2017 -0400 +++ b/gene_family_aligner.xml Tue Apr 11 14:21:35 2017 -0400 @@ -38,7 +38,7 @@ #if str($remove_gappy_sequences) == 'yes': #set trim_type_cond = $remove_gappy_sequences_cond.trim_type_cond #set trim_type = $trim_type_cond.trim_type - #if str($trim_type) == 'gap_trimming': + #if str($trim_type) == 'gap_trimming' and str($trim_type_cond.gap_trimming): --gap_trimming $trim_type_cond.gap_trimming #else: ## str($trim_type) == 'automated_trimming' @@ -47,8 +47,12 @@ #set remove_sequences_with_gaps_cond = $remove_gappy_sequences_cond.remove_sequences_with_gaps_cond #set remove_sequences_with_gaps = $remove_sequences_with_gaps_cond.remove_sequences_with_gaps #if str($remove_sequences_with_gaps) == 'yes': - --remove_sequences $remove_sequences_with_gaps_cond.remove_sequences_with_gaps_of - --iterative_realignment $remove_sequences_with_gaps_cond.iterative_realignment + #if str($remove_sequences_with_gaps_cond.remove_sequences_with_gaps_of): + --remove_sequences $remove_sequences_with_gaps_cond.remove_sequences_with_gaps_of + #end if + #if str($remove_sequences_with_gaps_cond.iterative_realignment): + --iterative_realignment $remove_sequences_with_gaps_cond.iterative_realignment + #end if #if $output_codon_alignments: --output '$output_aln_filtered_ca' --output_dir '$output_aln_filtered_ca.files_path' @@ -83,11 +87,15 @@ <option value="ptorthocs">Gene family clusters with corresponding coding sequences</option> </param> <when value="ptortho"> - <param name="input_ptortho" format="ptortho" type="data" label="Gene family clusters" /> + <param name="input_ptortho" format="ptortho" type="data" label="Gene family clusters"> + <validator type="empty_files_path" /> + </param> <expand macro="cond_alignment_method" /> </when> <when value="ptorthocs"> - <param name="input_ptorthocs" format="ptorthocs" type="data" label="Gene family clusters with corresponding coding sequences" /> + <param name="input_ptorthocs" format="ptorthocs" type="data" label="Gene family clusters with corresponding coding sequences"> + <validator type="empty_files_path" /> + </param> <expand macro="cond_alignment_method" /> <expand macro="param_codon_alignments" /> </when>
--- a/macros.xml Mon Apr 10 14:46:51 2017 -0400 +++ b/macros.xml Tue Apr 11 14:21:35 2017 -0400 @@ -70,6 +70,12 @@ <validator type="no_options" message="No PlantTribes scaffolds are available. Use the PlantTribes Scaffolds Download Data Manager tool in Galaxy to install and populate the PlantTribes scaffolds data table." /> </param> </xml> + <xml name="param_sequence_type"> + <param name="sequence_type" type="select" label="Sequence type used in the phylogenetic inference (dna)"> + <option value="protein" selected="true">Amino acid based</option> + <option value="dna">Nucleotide based</option> + </param> + </xml> <xml name="cond_alignment_method"> <conditional name="alignment_method_cond"> <param name="alignment_method" type="select" force_select="true" label="Select method for multiple sequence alignments"> @@ -96,7 +102,7 @@ <option value="automated_trimming">Trim alignments using trimAl's ML heuristic trimming approach (automated trimming)</option> </param> <when value="gap_trimming"> - <param name="gap_trimming" type="float" value="0" min="0" max="1.0" label="Remove sites in alignments with gaps of" help="Zero value has no affect" /> + <param name="gap_trimming" type="float" optional="true" min="0" max="1.0" label="Remove sites in alignments with gaps of" /> </when> <when value="automated_trimming" /> </conditional> @@ -107,8 +113,8 @@ </param> <when value="no" /> <when value="yes"> - <param name="remove_sequences_with_gaps_of" type="float" value="0" min="0" max="1" label="Remove sequences with gaps of" help="Zero value has no affect" /> - <param name="iterative_realignment" type="integer" value="0" min="0" label="Maximum number of iterations" help="Zero value has no affect"/> + <param name="remove_sequences_with_gaps_of" type="float" optional="true" min="0" max="1" label="Remove sequences with gaps of" /> + <param name="iterative_realignment" type="integer" optional="true" min="0" label="Maximum number of iterations" /> </when> </conditional> </when>