changeset 31:a3eed59297ea

Patches courtesy of Peter Briggs, Bioinformatics Core Facility University of Manchester make.contigs.xml.patch:# make.contigs.xml.patch make.contigs.xml.patch:# make.contigs.xml.patch:# 1. Fix cosmetic typo in <description> (forard -> forward) make.contigs.xml.patch:# 2. Address error due to having 'mismatch' as the name for both an input and an output parameter: make.contigs.xml.patch:# rename output parameter to 'cmismatch' make.contigs.xml.patch:# 3. Remove 'threshold' parameter: make.contigs in mothur doesn't support a 'threshold' parameter metagenomics.py.patch:# metagenomics.py.patch metagenomics.py.patch:# metagenomics.py.patch:# 1. Groups class: names were being taken from the wrong field (affected shhh.flows tool) metagenomics.py.patch:# 2. Axes class: make 'sniff' method more sensitive to try and restrict arbitrary tabular metagenomics.py.patch:# data uploads being sniffed as this type mothur_wrapper.py.patch:# mothur_wrapper.py.patch mothur_wrapper.py.patch:# mothur_wrapper.py.patch:# 1. Update 'cmd_dict' settings for shhh.flows and shhh.seqs (otherwise these functions will mothur_wrapper.py.patch:# fail on execution) mothur_wrapper.py.patch:# 2. Fix add_option calls defining '--match' and '--mismatch' command line options (otherwise mothur_wrapper.py.patch:# syntax error causes immediate failure) screen.seqs.xml.patch:# screen.seqs.xml.patch screen.seqs.xml.patch:# screen.seqs.xml.patch:# Replace pattern for align.report output file in definiting of 'results' parameter in screen.seqs.xml.patch:# <command> section (otherwise output_alignreport data item is empty). shhh.flows.xml.patch:# shhh.flows.xml.patch shhh.flows.xml.patch:# shhh.flows.xml.patch:# Replace 'format_source' with 'format' for output parameters (otherwise formats are not shhh.flows.xml.patch:# correctly assigned to output datasets) shhh.seqs.xml.patch:# shhh.seqs.xml.patch shhh.seqs.xml.patch:# shhh.seqs.xml.patch:# 1. Fix patterns in --result (in <command> section) for shhh_seqs.fasta and shhh_seqs.names shhh.seqs.xml.patch:# output files (otherwise files are not collected and associated data items are empty) shhh.seqs.xml.patch:# 2. Replace 'format_source' with 'format' for output parameters (otherwise formats are not shhh.seqs.xml.patch:# correctly assigned to output datasets) trim.flows.xml.patch:# trim.flows.xml.patch trim.flows.xml.patch:# trim.flows.xml.patch:# Remove erroneous space from --result definition in <command> section (otherwise causes tool trim.flows.xml.patch:# failure) trim.seqs.xml.patch:# trim.seqs.xml.patch trim.seqs.xml.patch:# trim.seqs.xml.patch:# 1. Remove reference to undefined 'oligo.allvalues' varible in <command> section (otherwise trim.seqs.xml.patch:# causes failure on execution) trim.seqs.xml.patch:# 2. Fix format for input parameter 'names' (format should be 'names' not 'name') trim.seqs.xml.patch:# 3. Add output parameter 'scrap_names' (to ensure consistent collection of all outputs) trim.seqs.xml.patch:# 4. Update --result definition in <command> section to collect both trim.names and scrap.names
author Jim Johnson <jj@umn.edu>
date Tue, 30 Jul 2013 09:26:31 -0500
parents a90d1915a176
children ec8df51e841a
files mothur/tools/mothur/make.contigs.xml mothur/tools/mothur/mothur_wrapper.py mothur/tools/mothur/screen.seqs.xml mothur/tools/mothur/shhh.flows.xml mothur/tools/mothur/shhh.seqs.xml mothur/tools/mothur/trim.flows.xml mothur/tools/mothur/trim.seqs.xml
diffstat 7 files changed, 30 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/mothur/tools/mothur/make.contigs.xml	Thu May 30 08:59:17 2013 -0500
+++ b/mothur/tools/mothur/make.contigs.xml	Tue Jul 30 09:26:31 2013 -0500
@@ -1,9 +1,9 @@
 <tool id="mothur_make_contigs" name="Make.contigs" version="1.26.0">
- <description>Aligns paired forard and reverse fastq files to contigs as fasta and quality</description>
+ <description>Aligns paired forward and reverse fastq files to contigs as fasta and quality</description>
  <command interpreter="python">
   mothur_wrapper.py 
   --cmd='make.contigs'
-  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.contigs\.fasta$:'$fasta,'^\S+\.contigs\.qual$:'$qual,'^\S+\.contigs\.mismatch$:'$mismatch
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.contigs\.fasta$:'$fasta,'^\S+\.contigs\.qual$:'$qual,'^\S+\.contigs\.mismatch$:'$cmismatch
   --outputdir='$logfile.extra_files_path'
   --ffastq=$ffastq
   --rfastq=$rfastq
@@ -33,9 +33,9 @@
   #if $gapextend.__str__ != '':
    --gapextend=$gapextend
   #end if
-  #if $threshold.__str__ != '':
-   --threshold=$threshold
-  #end if
+  ###if $threshold.__str__ != '':
+  ## --threshold=$threshold
+  ###end if
   --processors=8
  </command>
  <inputs>
@@ -71,16 +71,18 @@
   <param name="mismatch" type="integer" value="-1" optional="true" label="mismatch - Pairwise alignment penalty for a mismatch"/>
   <param name="gapopen" type="integer" value="-2" optional="true" label="gapopen - Pairwise alignment penalty for opening a gap"/>
   <param name="gapextend" type="integer" value="-1" optional="true" label="gapextend - Pairwise alignment penalty for extending a gap"/>
+  <!-- make.contigs doesn't support "threshold" option, see http://www.mothur.org/wiki/Make.contigs
   <param name="threshold" type="integer" value="40" optional="true" label="threshold - for quality scores" 
          help="When we are merging the overlapping regions, in the case where we are trying to decide whether to keep a base or remove it because the base is compared to a gap in the other fragment, if the base has a quality score below the threshold we eliminate it.">
       <validator type="in_range" message="threshold can't be negative" min="0"/>
   </param>
+  -->
  </inputs>
  <outputs>
   <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
   <data format="fasta" name="fasta" label="${tool.name} on ${on_string}: contigs.fasta"/>
   <data format="qual" name="qual" label="${tool.name} on ${on_string}: contigs.qual"/>
-  <data format="txt" name="mismatch" label="${tool.name} on ${on_string}: contigs.mismatch"/>
+  <data format="txt" name="cmismatch" label="${tool.name} on ${on_string}: contigs.mismatch"/>
  </outputs>
  <requirements>
   <requirement type="package" version="1.27">mothur</requirement>
--- a/mothur/tools/mothur/mothur_wrapper.py	Thu May 30 08:59:17 2013 -0500
+++ b/mothur/tools/mothur/mothur_wrapper.py	Tue Jul 30 09:26:31 2013 -0500
@@ -274,8 +274,8 @@
     cmd_dict['sens.spec'] = dict({'required' : ['list',['column','phylip']] , 'optional' : ['label','cutoff','hard','precision']})
     cmd_dict['seq.error'] = dict({'required' : ['fasta','reference'] , 'optional' : ['name','qfile','report','ignorechimeras','threshold','processors']})
     cmd_dict['sffinfo'] = dict({'required' : [['sff','sfftxt']], 'optional' : ['fasta','qfile','trim','sfftxt','flow','accnos']})
-    cmd_dict['shhh.flows'] = dict({'required' : [['flow','files']], 'optional' : ['lookup','maxiter','mindelta','cutoff','sigma','order','large','processors']})
-    cmd_dict['shhh.seqs'] = dict({'required' : [['fasta','files']], 'optional' : ['group','sigma','processors']})
+    cmd_dict['shhh.flows'] = dict({'required' : [['flow']], 'optional' : ['lookup','maxiter','mindelta','cutoff','sigma','order','large','processors']})
+    cmd_dict['shhh.seqs'] = dict({'required' : [['fasta','name']], 'optional' : ['group','sigma','processors']})
     cmd_dict['split.abund'] = dict({'required' : ['fasta',['name','list']], 'optional' : ['cutoff','group','groups','label','accnos']})
     cmd_dict['split.groups'] = dict({'required' : ['fasta','group'], 'optional' : ['name','groups']})
     cmd_dict['sort.seqs'] = dict({'required' : [['fasta','qfile','name','group','flow','taxonomy']], 'optional' : ['accnos','large']})
@@ -380,8 +380,8 @@
     parser.add_option( '--search', dest='search', help='Method for finding the template sequence: kmer, blast, suffix' )
     parser.add_option( '--ksize', dest='ksize',  type="int", help='Size of kmers (5 - 12)' )
     parser.add_option( '--align', dest='align', help='Alignment method: needleman, blastn, gotoh' )
-    parser.add_option( '--match', dest='match' help='Reward for a match, default is +1.0' )
-    parser.add_option( '--mismatch', dest='mismatch' help='Penalty for a mismatch, default is -1.0' )
+    parser.add_option( '--match', dest='match', help='Reward for a match, default is +1.0' )
+    parser.add_option( '--mismatch', dest='mismatch', help='Penalty for a mismatch, default is -1.0' )
     parser.add_option( '--gapopen', dest='gapopen', help='Penalty for a opening, default is -2.0' )
     parser.add_option( '--gapextend', dest='gapextend',  help='Penalty for extending a gap, default is -1.0' )
     parser.add_option( '--precision', dest='precision',  help='' )
--- a/mothur/tools/mothur/screen.seqs.xml	Thu May 30 08:59:17 2013 -0500
+++ b/mothur/tools/mothur/screen.seqs.xml	Tue Jul 30 09:26:31 2013 -0500
@@ -48,7 +48,8 @@
   #end if
   #if $input_alignreport != None and $input_alignreport.__str__ != "None":
    --alignreport=$input_alignreport
-   #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)$',r'\1.good.\2',$os.path.basename($input_alignreport.__str__)) + ":'" + $output_alignreport.__str__]
+   ###set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)$',r'\1.good.\2',$os.path.basename($input_alignreport.__str__)) + ":'" + $output_alignreport.__str__]
+   #set results = $results + ["'^\S+\.good\.align\.report$:'" + $output_alignreport.__str__]
   #end if
   #if $input_taxonomy != None and $input_taxonomy.__str__ != "None":
    --taxonomy=$input_taxonomy
--- a/mothur/tools/mothur/shhh.flows.xml	Thu May 30 08:59:17 2013 -0500
+++ b/mothur/tools/mothur/shhh.flows.xml	Tue Jul 30 09:26:31 2013 -0500
@@ -79,11 +79,11 @@
  </inputs>
  <outputs>
   <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
-  <data format_source="fasta" name="shhh_fasta" label="${tool.name} on ${on_string}: shhh.fasta"/>
-  <data format_source="qual454" name="shhh_qual" label="${tool.name} on ${on_string}: shhh.qual"/>
-  <data format_source="names" name="shhh_names" label="${tool.name} on ${on_string}: shhh.names"/>
-  <data format_source="groups" name="shhh_groups" label="${tool.name} on ${on_string}: shhh.groups"/>
-  <data format_source="tabular" name="shhh_counts" label="${tool.name} on ${on_string}: shhh.counts"/>
+  <data format="fasta" name="shhh_fasta" label="${tool.name} on ${on_string}: shhh.fasta"/>
+  <data format="qual454" name="shhh_qual" label="${tool.name} on ${on_string}: shhh.qual"/>
+  <data format="names" name="shhh_names" label="${tool.name} on ${on_string}: shhh.names"/>
+  <data format="groups" name="shhh_groups" label="${tool.name} on ${on_string}: shhh.groups"/>
+  <data format="tabular" name="shhh_counts" label="${tool.name} on ${on_string}: shhh.counts"/>
  </outputs>
  <requirements>
   <requirement type="package" version="1.27">mothur</requirement>
--- a/mothur/tools/mothur/shhh.seqs.xml	Thu May 30 08:59:17 2013 -0500
+++ b/mothur/tools/mothur/shhh.seqs.xml	Tue Jul 30 09:26:31 2013 -0500
@@ -4,7 +4,7 @@
   mothur_wrapper.py 
   #import re, os.path
   --cmd='shhh.seqs'
-  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.shhh\.fasta$:'$shhh_fasta,'^\S+\.shhh\.names$:'$shhh_names,'^\S+\.shhh\.map$:'$shhh_map
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.shhh_seqs\.fasta$:'$shhh_fasta,'^\S+\.shhh_seqs\.names$:'$shhh_names,'^\S+\.shhh\.\S+\.map$:'$shhh_map
   --outputdir='$logfile.extra_files_path'
   --fasta=$fasta
   --name=$name
@@ -27,9 +27,9 @@
  </inputs>
  <outputs>
   <data format="html" name="logfile" label="${tool.name} on ${on_string}: logfile" />
-  <data format_source="fasta" name="shhh_fasta" label="${tool.name} on ${on_string}: shhh.fasta"/>
-  <data format_source="names" name="shhh_names" label="${tool.name} on ${on_string}: shhh.names"/>
-  <data format_source="txt" name="shhh_map" label="${tool.name} on ${on_string}: shhh.map"/>
+  <data format="fasta" name="shhh_fasta" label="${tool.name} on ${on_string}: shhh.fasta"/>
+  <data format="names" name="shhh_names" label="${tool.name} on ${on_string}: shhh.names"/>
+  <data format="txt" name="shhh_map" label="${tool.name} on ${on_string}: shhh.map"/>
  </outputs>
  <requirements>
   <requirement type="package" version="1.27">mothur</requirement>
--- a/mothur/tools/mothur/trim.flows.xml	Thu May 30 08:59:17 2013 -0500
+++ b/mothur/tools/mothur/trim.flows.xml	Tue Jul 30 09:26:31 2013 -0500
@@ -6,7 +6,7 @@
   --cmd='trim.flows'
   ## #set results = ["'^mothur.\S+\.logfile$:'" + $logfile.__str__]
   ## #set results = $results + ["'" + $re.sub(r'(^.*)\.(.*?)$',r'\1.good.\2',$os.path.basename($flow.__str__)) + ":'" + $trim_flow.__str__]
-  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.trim\.flow$:'$trim_flow, '^\S+\.scrap\.flow$:'$scrap_flow,'^\S+\.flow\.files$:'$flow_files,'^\S+\.flow\.fasta$:'$flow_fasta
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.trim\.flow$:'$trim_flow,'^\S+\.scrap\.flow$:'$scrap_flow,'^\S+\.flow\.files$:'$flow_files,'^\S+\.flow\.fasta$:'$flow_fasta
   --outputdir='$logfile.extra_files_path'
   --flow=$flow
   #if $minflows.__str__ != '':
--- a/mothur/tools/mothur/trim.seqs.xml	Thu May 30 08:59:17 2013 -0500
+++ b/mothur/tools/mothur/trim.seqs.xml	Tue Jul 30 09:26:31 2013 -0500
@@ -3,7 +3,7 @@
  <command interpreter="python">
   mothur_wrapper.py 
   --cmd='trim.seqs'
-  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.trim\.fasta$:'$trim_fasta,'^\S+\.trim\.qual$:'$trim_qual,'^\S+\.scrap\.fasta$:'$scrap_fasta,'^\S+\.scrap\.qual$:'$scrap_qual,'^\S+\.groups$:'$groups_file
+  --result='^mothur.\S+\.logfile$:'$logfile,'^\S+\.trim\.fasta$:'$trim_fasta,'^\S+\.trim\.names$:'$trim_names,'^\S+\.trim\.qual$:'$trim_qual,'^\S+\.scrap\.fasta$:'$scrap_fasta,'^\S+\.scrap\.names$:'$scrap_names,'^\S+\.scrap\.qual$:'$scrap_qual,'^\S+\.groups$:'$groups_file
   --outputdir='$logfile.extra_files_path'
   #if int($minlength.__str__) > 0:
    --minlength=$minlength 
@@ -41,7 +41,7 @@
     --sdiffs=$oligo.sdiffs
    #end if
    $oligo.keepforward
-   $oligo.allvalues
+   ##$oligo.allvalues
    #if $oligo.allfiles == True:
     --datasetid='$logfile.id' --new_file_path='$__new_file_path__'
     --new_datasets='^\S+?\.(\S+\.fasta)$:${fasta.ext}','^\S+?\.(\S+\.groups)$:groups'
@@ -78,7 +78,7 @@
  </command>
  <inputs>
   <param name="fasta" type="data" format="fasta" label="fasta - Sequences"/>
-  <param name="names" type="data" format="name" optional="true" label="name - Sequence representative name list"/>
+  <param name="names" type="data" format="names" optional="true" label="name - Sequence representative name list"/>
   <param name="minlength" type="integer" value="0" label="minlength - Minimum Sequence Length (default 0, ignored if &#060; 1 )"/>
   <param name="maxlength" type="integer" value="0" label="maxlength - Maximum Sequence Length (default 0, ignored if &#060; 1)"/>
   <param name="maxambig" type="integer" value="-1" label="maxambig - Maximum ambiguous bases (default -1, ignored if &#060; 0)"/>
@@ -143,6 +143,9 @@
    <filter>(qual['add'] == 'yes'  and len(qual['qfile'].__str__) > 0)</filter>
   </data>
   <data format_source="fasta" name="scrap_fasta" label="${tool.name} on ${on_string}: scrap.fasta"/>
+  <data format_source="names" name="scrap_names" label="${tool.name} on ${on_string}: scrap.names">
+   <filter>names != None</filter>
+  </data>
   <data format_source="qfile" name="scrap_qual" label="${tool.name} on ${on_string}: scrap.qual">
    <filter>(qual['add'] == 'yes'  and len(qual['qfile'].__str__) > 0)</filter>
   </data>