Mercurial > repos > greg > gene_family_classifier
changeset 44:46f43a90492a draft
Uploaded
author | greg |
---|---|
date | Tue, 07 Feb 2017 11:48:18 -0500 |
parents | 8d1dbff42659 |
children | 916fb0014f89 |
files | gene_family_classifier.xml |
diffstat | 1 files changed, 60 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/gene_family_classifier.xml Mon Feb 06 11:32:27 2017 -0500 +++ b/gene_family_classifier.xml Tue Feb 07 11:48:18 2017 -0500 @@ -21,23 +21,40 @@ #if str($options_type.options_type_selector) == 'advanced': #set create_orthogroup_cond = $options_type.create_orthogroup_cond #set create_orthogroup = $create_orthogroup_cond.create_orthogroup + #set specify_single_copy_cond = $options_type.specify_single_copy_cond + #set specify_single_copy = $specify_single_copy_cond.single_copy_cond + + #if str($specify_single_copy) == 'yes': + #set specify_single_copy = True + #set single_copy_fasta_src_dir = $os.path.join('geneFamilyClassification_dir', 'single_copy_fasta') + #set single_copy_fasta_dest_dir = $output_ptsco.extra_files_path + #set single_copy_cond = $specify_single_copy_cond.single_copy_cond + ## FixMe: the single_copy_custom option is not currently supported. + #set single_copy = $single_copy_cond.single_copy + + mkdir -p $single_copy_fasta_dest_dir && + #else: + #set specify_single_copy = False + #end if #if str($create_orthogroup) == 'yes': + #set create_ortho_sequences = True + #set orthogroups_fasta_src_dir = $os.path.join('geneFamilyClassification_dir', 'orthogroups_fasta') #set create_corresponding_coding_sequences_cond = $create_orthogroup_cond.create_corresponding_coding_sequences_cond + #if str($create_corresponding_coding_sequences_cond.create_corresponding_coding_sequences) == 'yes': #set create_corresponding_coding_sequences = True #else: #set create_corresponding_coding_sequences = False #end if - #set create_ortho_sequences = True - #set orthogroups_fasta_src_dir = $os.path.join('geneFamilyClassification_dir', 'orthogroups_fasta') #if $create_corresponding_coding_sequences: - #set dest_dir = $output_ptcgfcs.extra_files_path + #set orthogroups_fasta_dest_dir = $output_ptcgfcs.extra_files_path #else: - #set dest_dir = $output_ptcgf.extra_files_path - #end if - mkdir -p $dest_dir && + #set orthogroups_fasta_dest_dir = $output_ptcgf.extra_files_path + #end if + + mkdir -p $orthogroups_fasta_dest_dir && #else: #set create_ortho_sequences = False #set create_corresponding_coding_sequences = False @@ -57,9 +74,9 @@ #if str($options_type.options_type_selector) == 'advanced': --super_orthogroups $options_type.super_orthogroups - #if str($options_type.single_copy_cond) == 'taxa': - --single_copy_taxa $options_type.single_copy_cond.single_copy_taxa - --taxa_present $options_type.single_copy_cond.taxa_present + #if $specify_single_copy: + --single_copy_taxa $single_copy_cond.single_copy_taxa + --taxa_present $single_copy_cond.taxa_present #end if #if str($create_orthogroup) == 'yes': --orthogroup_fasta @@ -68,6 +85,7 @@ #end if #end if #end if + >/dev/null #if str($save_hmmscan_log_cond.classifier) == 'hmmscan' or str($save_hmmscan_log_cond.classifier) == 'both': #if str($save_hmmscan_log_cond.save_hmmscan_log) == 'yes': @@ -79,17 +97,17 @@ #if $create_ortho_sequences: #if $create_corresponding_coding_sequences: - && echo "#Precomputed orthologous gene family clusters with corresponding coding sequences: `ls $orthogroups_fasta_src_dir | grep f | wc -l` files" > $output_ptcgfcs - && echo -e "#Size\t\tFile" >> $output_ptcgfcs - && ls -l $orthogroups_fasta_src_dir | grep f | awk -F ' ' '{print $5"\t\t"$9}' >> $output_ptcgfcs + && ls -l $orthogroups_fasta_src_dir | grep f | awk -F ' ' '{print $5"\t"$9}' >> $output_ptcgfcs #else: - && echo "#Precomputed orthologous gene family clusters: `ls $orthogroups_fasta_src_dir | grep f | wc -l` files" > $output_ptcgf - && echo -e "#Size\t\tFile" >> $output_ptcgf - && ls -l $orthogroups_fasta_src_dir | grep f | awk -F ' ' '{print $5"\t\t"$9}' >> $output_ptcgf + && ls -l $orthogroups_fasta_src_dir | grep f | awk -F ' ' '{print $5"\t"$9}' >> $output_ptcgf #end if - && mv $orthogroups_fasta_src_dir/* $dest_dir || true + && mv $orthogroups_fasta_src_dir/* $orthogroups_fasta_dest_dir || true #end if + #if $specify_single_copy: + && ls -l $single_copy_fasta_src_dir | grep f | awk -F ' ' '{print $5"\t"$9}' >> $output_ptsco + && mv $single_copy_fasta_src_dir/* $single_copy_fasta_dest_dir || true + #end if ]]> </command> <inputs> @@ -134,15 +152,30 @@ <option value="min_evalue" selected="true">Minimum e-value</option> <option value="avg_evalue">Average e-value</option> </param> - <conditional name="single_copy_cond"> - <param name="single_copy" type="select" label="Select single copy configuration"> - <option value="custom" selected="true">Single copy orthogroup custom</option> - <option value="taxa">Minumum single copy taxa required in orthogroup</option> + <conditional name="specify_single_copy_cond"> + <param name="specify_single_copy" type="select" label="Specify single copy orthogroup selection?"> + <option value="no" selected="true">No</option> + <option value="yes">Yes</option> </param> - <when value="custom" /> - <when value="taxa"> - <param name="single_copy_taxa" type="integer" value="20" label="Minumum single copy taxa required in orthogroup"/> - <param name="taxa_present" type="integer" value="21" label="Minumum taxa required in single copy orthogroup"/> + <when value="no"/> + <when value="yes"> + <conditional name="single_copy_cond"> + <param name="single_copy" type="select" label="Select single copy configuration"> + <!-- + FixMe: single_copy_custom is not currently supported because the + ~/config/*.singleCopy.config files are not easy to manage by a suer + and the GeneFamilyClassifier pipeline must be enhanced to provide an + optional parameter for the hard-coded path to the config. + <option value="custom" selected="true">Single copy orthogroup custom</option> + --> + <option value="taxa">Minumum single copy taxa required in orthogroup</option> + </param> + <when value="custom" /> + <when value="taxa"> + <param name="single_copy_taxa" type="integer" value="20" label="Minumum single copy taxa required in orthogroup"/> + <param name="taxa_present" type="integer" value="21" label="Minumum taxa required in single copy orthogroup"/> + </when> + </conditional> </when> </conditional> <conditional name="create_orthogroup_cond"> @@ -177,6 +210,9 @@ <data name="output_ptcgfcs" format="ptcgfcs" label="Gene family clusters and corresponding coding sequences on ${on_string}"> <filter>options_type['options_type_selector'] == 'advanced' and options_type['create_orthogroup_cond']['create_orthogroup'] == 'yes' and options_type['create_orthogroup_cond']['create_corresponding_coding_sequences_cond']['create_corresponding_coding_sequences'] == 'yes'</filter> </data> + <data name="output_ptsco" format="ptsco" label="Single copy orthogroup on ${on_string}"> + <filter>options_type['options_type_selector'] == 'advanced' and options_type['specify_single_copy_cond']['specify_single_copy'] == 'yes'</filter> + </data> <collection name="orthos" type="list"> <discover_datasets pattern="__name__" directory="geneFamilyClassification_dir" visible="false" ext="tabular" /> </collection>