+
generate principle components plot data
mothur_wrapper.py
@@ -55,7 +55,7 @@
- mothur
+ mothur
@@ -74,5 +74,7 @@
.. _metastats: http://www.mothur.org/wiki/Metastats
+v.1.21.0: Updated to mothur 1.33
+
diff -r 1be61ceb20d7 -r 95d75b35e4d2 mothur/tools/mothur/mothur_wrapper.py
--- a/mothur/tools/mothur/mothur_wrapper.py Mon Sep 22 11:19:09 2014 -0400
+++ b/mothur/tools/mothur/mothur_wrapper.py Fri Oct 31 15:09:32 2014 -0400
@@ -44,8 +44,8 @@
assert sys.version_info[:2] >= ( 2, 4 )
-debug = False
-#debug = True
+#debug = False
+debug = True
max_processors = os.getenv('MOTHUR_MAX_PROCESSORS') if os.getenv('MOTHUR_MAX_PROCESSORS') else 8
def stop_err( msg ):
@@ -53,6 +53,7 @@
sys.exit()
def __main__():
+ global debug
# tranform the logfile into html
# add extra file ouput
# add object tags for svg files
@@ -67,15 +68,15 @@
html.write("%s\n\n\n" % title)
try:
for line in txt:
- if line.find('set.dir') >= 0:
+ if line.find('set.dir') >= 0:
continue
- elif line.find('put directory to ') >= 0:
+ elif line.find('put directory to ') >= 0:
continue
- elif line.startswith('Mothur\'s directories:') :
+ elif line.startswith('Mothur\'s directories:') :
continue
- elif line.startswith('outputDir=') :
+ elif line.startswith('outputDir=') :
continue
- elif line.startswith('Type ') :
+ elif line.startswith('Type ') :
continue
elif line.find(tmp_output_dir_name) >= 0:
# if debug: print >> sys.stdout, 'logfile_to_html #%s#' % line
@@ -119,7 +120,7 @@
except:
shutil.copy(val,os.path.join(input_dir,fname))
vals.append(fname)
- if debug: print >> sys.stderr, "scp %s %s" % (val, os.path.join(input_dir,fname))
+ if debug: print >> sys.stdout, "scp %s %s" % (val, os.path.join(input_dir,fname))
else:
vals.append(convert_value(val))
return '-'.join(vals)
@@ -164,10 +165,10 @@
Gather parameter values for the specified mothur command 'cmd',
using the definition from the 'cmd_dict' dictionary.
"""
- if debug: print >> sys.stderr, options
+ if debug: print >> sys.stdout, options
params = []
for opt in cmd_dict[cmd]['required']:
- if debug: print >> sys.stderr, opt
+ if debug: print >> sys.stdout, opt
if isinstance(opt,list): # One of these must be present
missing = True
for sel in opt:
@@ -212,33 +213,33 @@
The complexity of inputs should be handled by the glaxy tool xml file.
"""
cmd_dict = dict()
- cmd_dict['align.check'] = dict({'required' : ['fasta','map']})
+ cmd_dict['align.check'] = dict({'required' : ['fasta','map'], 'optional' : ['name','count']})
cmd_dict['align.seqs'] = dict({'required' : ['fasta','reference',], 'optional' : ['search','ksize','align','match','mismatch','gapopen','gapextend','flip','threshold','save','processors']})
- cmd_dict['amova'] = dict({'required' : ['phylip','design'] , 'optional' : ['alpha','iters']})
+ cmd_dict['amova'] = dict({'required' : ['phylip','design'] , 'optional' : ['alpha','iters','sets']})
cmd_dict['anosim'] = dict({'required' : ['phylip','design'] , 'optional' : ['alpha','iters']})
- cmd_dict['bin.seqs'] = dict({'required' : ['list','fasta'], 'optional' : ['name','label','group']})
+ cmd_dict['bin.seqs'] = dict({'required' : ['list','fasta'], 'optional' : ['name','label','group','count']})
cmd_dict['bootstrap.shared'] = dict({'required' : ['shared'], 'optional' : ['calc','groups','iters','label']})
#catchall
cmd_dict['chimera.bellerophon'] = dict({'required' : ['fasta'], 'optional' : ['filter','correction','window','increment','processors']})
cmd_dict['chimera.ccode'] = dict({'required' : ['fasta','reference'], 'optional' : ['filter','mask','window','numwanted','save','processors']})
cmd_dict['chimera.check'] = dict({'required' : ['fasta','reference'], 'optional' : ['ksize','svg','name','increment','save','processors']})
- cmd_dict['chimera.perseus'] = dict({'required' : ['fasta','name'], 'optional' : ['group','alpha','beta','cutoff']})
+ cmd_dict['chimera.perseus'] = dict({'required' : ['fasta',['name','count']], 'optional' : ['group','alpha','beta','cutoff','dereplicate']})
cmd_dict['chimera.pintail'] = dict({'required' : ['fasta','reference'], 'optional' : ['conservation','quantile','filter','mask','window','increment','save','processors']})
- cmd_dict['chimera.slayer'] = dict({'required' : ['fasta','reference'], 'optional' : ['name','group','search','window','increment','match','mismatch','numwanted','parents','minsim','mincov','iters','minbs','minsnp','divergence','realign','split','blastlocation','save','processors']})
- cmd_dict['chimera.uchime'] = dict({'required' : ['fasta'], 'optional' : ['name','group','reference','abskew','chimealns','minh','mindiv','xn','dn','xa','chunks','minchunk','idsmoothwindow','minsmoothid','maxp','skipgaps','skipgaps2','minlen','maxlen','ucl','queryfract','processors']})
- cmd_dict['chop.seqs'] = dict({'required' : ['fasta','numbases'], 'optional' : ['countgaps','keep','short']})
- cmd_dict['classify.otu'] = dict({'required' : ['list','taxonomy'],'optional' : ['name','cutoff','label','group','probs','basis','reftaxonomy']})
- cmd_dict['classify.seqs'] = dict({'required' : ['fasta','reference','taxonomy'],'optional' : ['name','search','ksize','method','match','mismatch','gapopen','gapextend','numwanted','probs','save','processors']})
+ cmd_dict['chimera.slayer'] = dict({'required' : ['fasta','reference'], 'optional' : ['name','group','count','search','window','increment','match','mismatch','numwanted','parents','minsim','mincov','iters','minbs','minsnp','divergence','realign','split','blastlocation','save','processors','dereplicate']})
+ cmd_dict['chimera.uchime'] = dict({'required' : ['fasta'], 'optional' : ['name','group','count','dereplicate','reference','abskew','chimealns','minh','mindiv','xn','dn','xa','chunks','minchunk','idsmoothwindow','minsmoothid','maxp','skipgaps','skipgaps2','minlen','maxlen','ucl','queryfract','processors']})
+ cmd_dict['chop.seqs'] = dict({'required' : ['fasta','numbases'], 'optional' : ['countgaps','keep','short','name','group','count']})
+ cmd_dict['classify.otu'] = dict({'required' : ['list','taxonomy'],'optional' : ['name','cutoff','label','group','probs','basis','reftaxonomy','count','persample']})
+ cmd_dict['classify.seqs'] = dict({'required' : ['fasta','reference','taxonomy'],'optional' : ['name','search','ksize','method','match','mismatch','gapopen','gapextend','numwanted','probs','save','processors','count','relabund']})
cmd_dict['classify.tree'] = dict({'required' : ['taxonomy','tree'],'optional' : ['name','group','cutoff']})
#clear.memory ## not needed in galaxy framework
cmd_dict['clearcut'] = dict({'required' : [['phylip','fasta']],'optional' : ['seed','norandom','shuffle','neighbor','expblen','expdist','ntrees','matrixout','kimura','jukes','protein','DNA']})
cmd_dict['cluster'] = dict({'required' : [['phylip','column']] , 'optional' : ['name','count','method','cutoff','hard','precision','sim','showabund','timing']})
cmd_dict['cluster.classic'] = dict({'required' : ['phylip'] , 'optional' : ['name','count','method','cutoff','hard','sim','precision']})
- cmd_dict['cluster.fragments'] = dict({'required' : ['fasta'] , 'optional' : ['name','diffs','percent']})
- cmd_dict['cluster.split'] = dict({'required' : [['fasta','phylip','column']] , 'optional' : ['name','count','method','splitmethod','taxonomy','taxlevel','showabund','cutoff','hard','large','precision','classic','timing','processors']})
+ cmd_dict['cluster.fragments'] = dict({'required' : ['fasta'] , 'optional' : ['name','diffs','percent','count']})
+ cmd_dict['cluster.split'] = dict({'required' : [['fasta','phylip','column']] , 'optional' : ['name','count','method','splitmethod','taxonomy','taxlevel','showabund','cutoff','hard','large','precision','classic','timing','processors','cluster']})
cmd_dict['collect.shared'] = dict({'required' : ['shared'], 'optional' : ['calc','label','freq','groups','all']})
cmd_dict['collect.single'] = dict({'required' : [['list', 'sabund', 'rabund', 'shared']], 'optional' : ['calc','abund','size','label','freq']})
- cmd_dict['consensus.seqs'] = dict({'required' : ['fasta'], 'optional' : ['list','name','label','cutoff']})
+ cmd_dict['consensus.seqs'] = dict({'required' : ['fasta'], 'optional' : ['list','name','label','cutoff','count']})
cmd_dict['cooccurrence'] = dict({'required' : ['shared'], 'optional' : ['iters','metric','matrixmodel','groups','label']})
@@ -246,40 +247,40 @@
cmd_dict['count.groups'] = dict({'required' : [['group','shared','count']], 'optional' : ['accnos','groups']})
cmd_dict['count.seqs'] = dict({'required' : ['name'], 'optional' : ['group','groups','large']})
- cmd_dict['create.database'] = dict({'required' : [['list','shared'],'repfasta','repname','contaxonomy'], 'optional' : ['group','label']})
+ cmd_dict['create.database'] = dict({'required' : [['list','shared'],'repfasta','repname','constaxonomy','count'], 'optional' : ['group','label']})
cmd_dict['degap.seqs'] = dict({'required' : ['fasta']})
- cmd_dict['deunique.seqs'] = dict({'required' : ['fasta','name'], 'optional' : []})
+ cmd_dict['deunique.seqs'] = dict({'required' : ['fasta'], 'optional' : ['name','count']})
cmd_dict['deunique.tree'] = dict({'required' : ['tree','name'], 'optional' : []})
cmd_dict['dist.seqs'] = dict({'required' : ['fasta'], 'optional' : ['calc','countends','output','cutoff','oldfasta','column','processors']})
cmd_dict['dist.shared'] = dict({'required' : ['shared'], 'optional' : ['calc','label','groups','output','subsample','iters','processors']})
- cmd_dict['fastq.info'] = dict({'required' : ['fastq'], 'optional' : ['fasta','qfile']})
+ cmd_dict['fastq.info'] = dict({'required' : ['fastq','format'], 'optional' : ['fasta','qfile','pacbio','oligos','bdiffs','pdiffs','tdiffs','ldiffs','sdiffs']})
cmd_dict['filter.seqs'] = dict({'required' : ['fasta'], 'optional' : ['vertical','trump','soft','hard','processors']})
cmd_dict['get.group'] = dict({'required' : ['shared'], 'optional' : []})
cmd_dict['get.groups'] = dict({'required' : ['group'], 'optional' : ['groups','accnos','fasta','name','list','shared','taxonomy','design']})
cmd_dict['get.lineage'] = dict({'required' : ['taxonomy','taxon'],'optional' : ['fasta','name','group','list','alignreport','dups']})
cmd_dict['get.otulist'] = dict({'required' : ['list'], 'optional' : ['label','sort']})
- cmd_dict['get.oturep'] = dict({'required' : ['list',['phylip','column']], 'optional' : ['fasta','name','label','group','groups','sorted','precision','cutoff','large','weighted']})
+ cmd_dict['get.oturep'] = dict({'required' : ['list',['phylip','column']], 'optional' : ['fasta','name','label','group','groups','sorted','precision','cutoff','large','weighted','count','method']})
cmd_dict['get.otus'] = dict({'required' : ['group','list','label'], 'optional' : ['groups','accnos']})
- cmd_dict['get.rabund'] = dict({'required' : [['list','sabund']],'optional' : ['sorted','label']})
+ cmd_dict['get.rabund'] = dict({'required' : [['list','sabund']],'optional' : ['sorted','label','count']})
cmd_dict['get.relabund'] = dict({'required' : ['shared'],'optional' : ['scale','label','groups']})
- cmd_dict['get.sabund'] = dict({'required' : [['list','rabund']],'optional' : ['label']})
- cmd_dict['get.seqs'] = dict({'required' : ['accnos',['fasta','qfile','name','group','list','alignreport','taxonomy']], 'optional' : ['dups']})
- cmd_dict['get.sharedseqs'] = dict({'required' : ['list','group'], 'optional' : ['label', 'unique', 'shared', 'output', 'fasta']})
+ cmd_dict['get.sabund'] = dict({'required' : [['list','rabund']],'optional' : ['label','count']})
+ cmd_dict['get.seqs'] = dict({'required' : ['accnos',['fasta','qfile','name','group','list','alignreport','taxonomy']], 'optional' : ['dups','count','fastq']})
+ cmd_dict['get.sharedseqs'] = dict({'required' : ['list','group'], 'optional' : ['label', 'unique', 'shared', 'output', 'fasta','shared']})
cmd_dict['hcluster'] = dict({'required' : [['column','phylip']] , 'optional' : ['name','method','cutoff','hard','precision','sorted','showabund','timing']})
cmd_dict['heatmap.bin'] = dict({'required' : [['list', 'sabund', 'rabund', 'shared']], 'optional' : ['label','groups','scale','sorted','numotu','fontsize']})
- cmd_dict['heatmap.sim'] = dict({'required' : [['shared','phylip','column']], 'optional' : ['calc','name','label','groups','fontsize']})
- cmd_dict['homova'] = dict({'required' : ['phylip','design'] , 'optional' : ['alpha','iters']})
+ cmd_dict['heatmap.sim'] = dict({'required' : [['shared','phylip','column']], 'optional' : ['calc','name','label','groups','fontsize','count']})
+ cmd_dict['homova'] = dict({'required' : ['phylip','design'] , 'optional' : ['alpha','iters','sets']})
cmd_dict['indicator'] = dict({'required' : [['tree','design'],['shared','relabund']], 'optional' : ['groups','label','processors']})
cmd_dict['libshuff'] = dict({'required' : ['phylip','group'],'optional' : ['groups','iters','form','sim','step','cutoff']})
cmd_dict['list.seqs'] = dict({'required' : [['fasta','name','group','list','alignreport','taxonomy']]})
-
- cmd_dict['make.biom'] = dict({'required' : ['shared'] , 'optional' : ['contaxonomy','matrixtype','groups','label']})
- cmd_dict['make.contigs'] = dict({'required' : ['ffastq','rfastq',], 'optional' : ['align','match','mismatch','gapopen','gapextend','threshold','oligos','bdiffs','pdiffs','tdiffs','processors']})
+ cmd_dict['list.otulabels'] = dict({'required': [['shared','relabund','list']], 'optional': ['group','label']})
+ cmd_dict['make.biom'] = dict({'required' : ['shared'] , 'optional' : ['constaxonomy','matrixtype','groups','label','metadata','picrust','reftaxonomy']})
+ cmd_dict['make.contigs'] = dict({'required' : ['ffastq','rfastq',], 'optional' : ['align','match','mismatch','gapopen','gapextend','threshold','oligos','bdiffs','pdiffs','tdiffs','processors','rindex','findex']})
- cmd_dict['make.fastq'] = dict({'required' : ['fasta','qfile'] , 'optional' : []})
+ cmd_dict['make.fastq'] = dict({'required' : ['fasta','qfile'] , 'optional' : ['format']})
cmd_dict['make.group'] = dict({'required' : ['fasta','groups'], 'optional' : []})
- cmd_dict['make.shared'] = dict({'required' : [['list','group','biom']], 'optional' : ['label','groups']})
+ cmd_dict['make.shared'] = dict({'required' : [['list','group','biom','count']], 'optional' : ['label','groups']})
cmd_dict['mantel'] = dict({'required' : ['phylip','phylip2'] , 'optional' : ['method','iters']})
cmd_dict['merge.files'] = dict({'required' : ['input','output']})
cmd_dict['merge.groups'] = dict({'required' : [['shared','group'],'design'], 'optional' : ['groups', 'label']})
@@ -289,46 +290,48 @@
cmd_dict['otu.association'] = dict({'required' : [['shared','relabund']], 'optional' : ['groups', 'label','method','metadata']})
cmd_dict['otu.hierarchy'] = dict({'required' : ['list','label'], 'optional' : ['output']})
cmd_dict['pairwise.seqs'] = dict({'required' : ['fasta'], 'optional' : ['align','calc','countends','output','cutoff','match','mismatch','gapopen','gapextend','processors']})
- cmd_dict['parse.list'] = dict({'required' : ['list','group'], 'optional' : ['label']})
- cmd_dict['parsimony'] = dict({'required' : ['tree'], 'optional' : ['group','groups','name','iters','random','processors']})
+ cmd_dict['parse.list'] = dict({'required' : ['list','group'], 'optional' : ['label','count']})
+ cmd_dict['parsimony'] = dict({'required' : ['tree'], 'optional' : ['group','groups','name','iters','random','processors','count']})
cmd_dict['pca'] = dict({'required' : [['shared','relabund']], 'optional' : ['label','groups','metric']})
cmd_dict['pcoa'] = dict({'required' : ['phylip'], 'optional' : ['metric']})
- cmd_dict['pcr.seqs'] = dict({'required' : ['fasta'], 'optional' : ['oligos','name','group','taxonomy','ecoli','start','end','nomatch','keepprimer','keepdots','processors']})
+ cmd_dict['pcr.seqs'] = dict({'required' : ['fasta'], 'optional' : ['oligos','name','group','taxonomy','ecoli','start','end','nomatch','keepprimer','keepdots','processors','count','pdiffs']})
- cmd_dict['phylo.diversity'] = dict({'required' : ['tree'],'optional' : ['group','name','groups','iters','freq','scale','rarefy','collect','summary','processors']})
+ cmd_dict['phylo.diversity'] = dict({'required' : ['tree'],'optional' : ['group','name','groups','iters','freq','scale','rarefy','collect','summary','processors','count']})
cmd_dict['phylotype'] = dict({'required' : ['taxonomy'],'optional' : ['name','cutoff','label']})
- cmd_dict['pre.cluster'] = dict({'required' : ['fasta'], 'optional' : ['name','diffs','group','processors']})
- cmd_dict['rarefaction.shared'] = dict({'required' : ['shared'], 'optional' : ['calc','label','iters','groups','jumble','design','sets','groupmode']})
+ cmd_dict['pre.cluster'] = dict({'required' : ['fasta'], 'optional' : ['name','count','diffs','group','processors','topdown']})
+ cmd_dict['rarefaction.shared'] = dict({'required' : ['shared'], 'optional' : ['calc','label','iters','groups','jumble','design','sets','groupmode','subsample','subsampleiters']})
cmd_dict['rarefaction.single'] = dict({'required' : [['list', 'sabund', 'rabund', 'shared']], 'optional' : ['calc','abund','iters','label','freq','processors']})
- cmd_dict['remove.groups'] = dict({'required' : ['group'], 'optional' : ['groups','accnos','fasta','name','list','shared','taxonomy','design']})
- cmd_dict['remove.lineage'] = dict({'required' : ['taxonomy','taxon'],'optional' : ['fasta','name','group','list','alignreport','dups']})
+ cmd_dict['remove.groups'] = dict({'required' : ['group'], 'optional' : ['groups','accnos','fasta','name','list','shared','taxonomy','design','count']})
+ cmd_dict['remove.lineage'] = dict({'required' : [['taxonomy','constaxonomy'],'taxon'],'optional' : ['fasta','name','group','list','alignreport','dups','shared','list','count']})
cmd_dict['remove.otus'] = dict({'required' : ['group','list','label'], 'optional' : ['groups','accnos']})
- cmd_dict['remove.rare'] = dict({'required' : [['list','sabund','rabund','shared'],'nseqs'], 'optional' : ['group','groups','label','bygroup']})
- cmd_dict['remove.seqs'] = dict({'required' : ['accnos',['fasta','qfile','name','group','list','alignreport','taxonomy']], 'optional' : ['dups']})
+ cmd_dict['remove.rare'] = dict({'required' : [['list','sabund','rabund','shared'],'nseqs'], 'optional' : ['group','groups','label','bygroup','count']})
+ cmd_dict['remove.seqs'] = dict({'required' : ['accnos',['fasta','qfile','name','group','list','alignreport','taxonomy']], 'optional' : ['dups','count','fastq']})
cmd_dict['reverse.seqs'] = dict({'required' : ['fasta']})
- cmd_dict['screen.seqs'] = dict({'required' : ['fasta'], 'optional' : ['start','end','maxambig','maxhomop','minlength','maxlength','criteria','optimize','name','group','alignreport','taxonomy','processors']})
+ cmd_dict['screen.seqs'] = dict({'required' : ['fasta'], 'optional' : ['start','end','maxambig','maxhomop','minlength','maxlength','criteria','optimize','name','group','alignreport','taxonomy','processors','count','summary','contigsreport']})
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['sffinfo'] = dict({'required' : [['sff','sfftxt']], 'optional' : ['oligos','bdiffs','pdiffs','tdiffs','ldiffs','sdiffs','fasta','qfile','trim','sfftxt','flow','accnos']})
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']})
- cmd_dict['sub.sample'] = dict({'required' : [['fasta','list','sabund','rabund','shared']], 'optional' : ['name','group','groups','label','size','persample']})
- cmd_dict['summary.qual'] = dict({'required' : ['qfile'], 'optional' : ['name']})
- cmd_dict['summary.seqs'] = dict({'required' : ['fasta'], 'optional' : ['name','processors']})
- cmd_dict['summary.shared'] = dict({'required' : ['shared'], 'optional' : ['calc','label','groups','all','distance','processors']})
- cmd_dict['summary.single'] = dict({'required' : [['list','sabund','rabund','shared']], 'optional' : ['calc','abund','size','label','groupmode']})
- cmd_dict['summary.tax'] = dict({'required' : ['taxonomy'], 'optional' : ['name','group','reftaxonomy']})
- cmd_dict['tree.shared'] = dict({'required' : [['shared','phylip','column']], 'optional' : ['name','groups','calc','cutoff','precision','label','subsample','iters','processors']})
+ cmd_dict['split.abund'] = dict({'required' : ['fasta',['name','list','count']], 'optional' : ['cutoff','group','groups','label','accnos']})
+ cmd_dict['split.groups'] = dict({'required' : ['fasta','group'], 'optional' : ['name','groups','count']})
+ cmd_dict['sort.seqs'] = dict({'required' : [['fasta','qfile','name','group','flow','taxonomy']], 'optional' : ['accnos','large','count']})
+ cmd_dict['sub.sample'] = dict({'required' : [['fasta','list','sabund','rabund','shared']], 'optional' : ['name','group','groups','label','size','persample','count','taxonomy']})
+ cmd_dict['summary.qual'] = dict({'required' : ['qfile'], 'optional' : ['name','count']})
+ cmd_dict['summary.seqs'] = dict({'required' : ['fasta'], 'optional' : ['name','processors','count']})
+ cmd_dict['summary.shared'] = dict({'required' : ['shared'], 'optional' : ['calc','label','groups','all','distance','processors','subsample','iters']})
+ cmd_dict['summary.single'] = dict({'required' : [['list','sabund','rabund','shared']], 'optional' : ['calc','abund','size','label','groupmode','subsample','iters']})
+ cmd_dict['summary.tax'] = dict({'required' : ['taxonomy'], 'optional' : ['name','group','reftaxonomy','count','relabund']})
+ cmd_dict['tree.shared'] = dict({'required' : [['shared','phylip','column']], 'optional' : ['name','groups','calc','cutoff','precision','label','subsample','iters','processors','count']})
cmd_dict['trim.flows'] = dict({'required' : ['flow'], 'optional' : ['oligos','bdiffs','pdiffs','tdiffs','ldiffs','sdiffs','minflows','maxflows','fasta','signal','noise','maxhomop','order','processors']})
- cmd_dict['trim.seqs'] = dict({'required' : ['fasta'], 'optional' : ['name','group','oligos','qfile','qaverage','qthreshold','qwindowaverage','qwindowsize','rollaverage','qstepsize','qtrim','flip','maxambig','maxhomop','minlength','maxlength','bdiffs','pdiffs','tdiffs','ldiffs','sdiffs','keepforward','allfiles','keepfirst','removelast','processors']})
- cmd_dict['unifrac.unweighted'] = dict({'required' : ['tree'], 'optional' : ['name','group','groups','iters','distance','random','root','subsample','consensus','processors']})
- cmd_dict['unifrac.weighted'] = dict({'required' : ['tree'], 'optional' : ['name','group','groups','iters','distance','random','root','subsample','consensus','processors']})
- cmd_dict['unique.seqs'] = dict({'required' : ['fasta'], 'optional' : ['name']})
- cmd_dict['venn'] = dict({'required' : [['list','shared']], 'optional' : ['calc','label','groups','abund','nseqs','permute','fontsize']})
+ cmd_dict['trim.seqs'] = dict({'required' : ['fasta'], 'optional' : ['name','group','oligos','qfile','qaverage','qthreshold','qwindowaverage','qwindowsize','rollaverage','qstepsize','qtrim','flip','maxambig','maxhomop','minlength','maxlength','bdiffs','pdiffs','tdiffs','ldiffs','sdiffs','keepforward','allfiles','keepfirst','removelast','processors','count','checkorient','logtransform']})
+ cmd_dict['unifrac.unweighted'] = dict({'required' : ['tree'], 'optional' : ['name','group','groups','iters','distance','random','root','subsample','consensus','processors','count']})
+ cmd_dict['unifrac.weighted'] = dict({'required' : ['tree'], 'optional' : ['name','group','groups','iters','distance','random','root','subsample','consensus','processors','count']})
+ cmd_dict['unique.seqs'] = dict({'required' : ['fasta'], 'optional' : ['name','count']})
+ cmd_dict['venn'] = dict({'required' : [['list','shared']], 'optional' : ['calc','label','groups','abund','nseqs','permute','fontsize','sharedotus']})
+
+ cmd_dict['merge.sfffiles'] = dict({'required' : ['sff','output']})
parser = optparse.OptionParser()
# Options for managing galaxy interaction
@@ -405,7 +408,7 @@
parser.add_option( '--report', dest='report', help='' )
parser.add_option( '--taxonomy', dest='taxonomy', help='A Taxonomy file' )
parser.add_option( '--reftaxonomy', dest='reftaxonomy', help='A Taxonomy file' )
- parser.add_option( '--contaxonomy', dest='contaxonomy', help='The Taxonomy file output by classify.otu' )
+ parser.add_option( '--constaxonomy', dest='constaxonomy', help='The Taxonomy file output by classify.otu' )
parser.add_option( '--taxon', dest='taxon', help='A Taxon' )
parser.add_option( '--taxlevel', dest='taxlevel', type="int", help='A Taxonomy level' )
# parser.add_option( '--taxon', dest='taxon', action="callback", callback=remove_confidence_callback, help='A Taxon' )
@@ -532,6 +535,7 @@
parser.add_option( '--persample', dest='persample', help='sub sample option' )
parser.add_option( '--timing', dest='timing', help='timing option' )
parser.add_option( '--processors', dest='processors', type='int', action='callback', callback=processors_callback, help='Number of processors to use' )
+ parser.add_option( '--dereplicate', dest='dereplicate', help='Boolean - remove chimeric sequences from all groups, default=f')
parser.add_option( '--abskew', dest='abskew', type="float", help='Minimum abundance skew.')
parser.add_option( '--chimealns', dest='chimealns', help='Boolean - produce a file containing multiple alignments of query sequences')
parser.add_option( '--minh', dest='minh', type="float", help='mininum score to report chimera.')
@@ -568,11 +572,20 @@
# include read.tree options
parser.add_option( '--tree', dest='tree', help='' )
+ # trim.seq options
+ parser.add_option( '--checkorient', dest='checkorient', help='' )
+ parser.add_option( '--logtransform', dest='logtransform', help='' )
+ #fastq.info options
+ parser.add_option( '--format', dest='format', help='' )
+ parser.add_option( '--pacbio', dest='pacbio', help='' )
+ parser.add_option( '--picrust', dest='picrust', help='' )
+ parser.add_option( '--subsampleiters', dest='subsampleiters', help='' )
+
(options, args) = parser.parse_args()
"""
"""
# print >> sys.stderr, options # so will appear as blurb for file
- if options.debug != None:
+ if debug == None and options.debug != None:
debug = options.debug
params = []
inputdir = None
@@ -658,20 +671,26 @@
tmp_stderr.close()
tmp_stdout.close()
if debug: print >> sys.stdout, 'parse %s' % tmp_stdout_name
+
if returncode != 0:
- try:
- # try to copy stdout to the logfile
- for output in options.result.split(','):
- # Each item has a regex pattern and a file path to a galaxy dataset
- (pattern,path) = output.split(':')
- if debug: print >> sys.stdout, '%s -> %s' % (pattern,path)
- if pattern.find('\.logfile') > 0:
- if path != None and os.path.exists(path):
- logfile_to_html(tmp_stdout_name,path,inputdir,outputdir,title="Mothur %s Error Logfile" % options.cmd)
- break
- except:
- pass
- raise Exception, stderr
+ if returncode == -11 and options.cmd == 'seq.error':
+ if debug: print >> sys.stdout, 'seq.error produced a segmentation fault but we are ignoring it.'
+ else:
+ try:
+ # try to copy stdout to the logfile
+ for output in options.result.split(','):
+ # Each item has a regex pattern and a file path to a galaxy dataset
+ (pattern,path) = output.split(':')
+ if debug: print >> sys.stdout, '%s -> %s' % (pattern,path)
+ if pattern.find('\.logfile') > 0:
+ if path != None and os.path.exists(path):
+ logfile_to_html(tmp_stdout_name,path,inputdir,outputdir,title="Mothur %s Error Logfile" % options.cmd)
+ break
+ except:
+ pass
+
+ raise Exception, stderr + " Return code: " + str(returncode)
+
stdout = ''
# Parse stdout to provide info
tmp_stdout = open( tmp_stdout_name, 'rb' )
@@ -713,7 +732,7 @@
continue
if line.find(outputdir) >= 0:
continue
- if line.startswith('**************'):
+ if line.startswith('**************'):
continue
if re.match('^Processing.*',line):
continue
@@ -733,7 +752,7 @@
continue
if re.match('Output .*',line):
break
- if re.match('mothur > quit()',line):
+ if re.match('mothur > quit()',line):
break
if found_begin and info_chars < 200:
info += "%s" % line
diff -r 1be61ceb20d7 -r 95d75b35e4d2 mothur/tools/mothur/nmds.xml
--- a/mothur/tools/mothur/nmds.xml Mon Sep 22 11:19:09 2014 -0400
+++ b/mothur/tools/mothur/nmds.xml Fri Oct 31 15:09:32 2014 -0400
@@ -1,4 +1,4 @@
-
+
generate non-metric multidimensional scaling data
mothur_wrapper.py
@@ -41,7 +41,7 @@
- mothur
+ mothur
@@ -61,6 +61,7 @@
.. _phylip_distance_matrix: http://www.mothur.org/wiki/Phylip-formatted_distance_matrix
.. _nmds: http://www.mothur.org/wiki/Nmds
+v1.20.0: Updated to mothur 1.33
diff -r 1be61ceb20d7 -r 95d75b35e4d2 mothur/tools/mothur/normalize.shared.xml
--- a/mothur/tools/mothur/normalize.shared.xml Mon Sep 22 11:19:09 2014 -0400
+++ b/mothur/tools/mothur/normalize.shared.xml Fri Oct 31 15:09:32 2014 -0400
@@ -1,4 +1,4 @@
-
+
Normalize the number of sequences per group to a specified level
mothur_wrapper.py
@@ -50,7 +50,7 @@
- mothur
+ mothur
diff -r 1be61ceb20d7 -r 95d75b35e4d2 mothur/tools/mothur/otu.association.xml
--- a/mothur/tools/mothur/otu.association.xml Mon Sep 22 11:19:09 2014 -0400
+++ b/mothur/tools/mothur/otu.association.xml Fri Oct 31 15:09:32 2014 -0400
@@ -1,4 +1,4 @@
-
+
Calculate the correlation coefficient for the otus
mothur_wrapper.py
@@ -24,6 +24,10 @@
#if $metadata.__str__ != "None" and len($method.__str__) > 0:
--metadata=$metadata
#end if
+ #if $cutoff.__str__ != '':
+ --cutoff=$cutoff
+ #end if
+
@@ -43,12 +47,13 @@
+
- mothur
+ mothur
@@ -69,5 +74,7 @@
.. _relabund: http://www.mothur.org/wiki/Get.relabund
.. _otu.association: http://www.mothur.org/wiki/Otu.association
+v.1.25.0: Updated to mothur 1.33, added cutoff option
+
diff -r 1be61ceb20d7 -r 95d75b35e4d2 mothur/tools/mothur/otu.hierarchy.xml
--- a/mothur/tools/mothur/otu.hierarchy.xml Mon Sep 22 11:19:09 2014 -0400
+++ b/mothur/tools/mothur/otu.hierarchy.xml Fri Oct 31 15:09:32 2014 -0400
@@ -1,4 +1,4 @@
-
+
Relate OTUs at different distances
mothur_wrapper.py
@@ -33,7 +33,7 @@
- mothur
+ mothur
diff -r 1be61ceb20d7 -r 95d75b35e4d2 mothur/tools/mothur/pairwise.seqs.xml
--- a/mothur/tools/mothur/pairwise.seqs.xml Mon Sep 22 11:19:09 2014 -0400
+++ b/mothur/tools/mothur/pairwise.seqs.xml Fri Oct 31 15:09:32 2014 -0400
@@ -1,4 +1,4 @@
-
+
calculate uncorrected pairwise distances between sequences
mothur_wrapper.py
@@ -74,7 +74,7 @@
- mothur
+ mothur
diff -r 1be61ceb20d7 -r 95d75b35e4d2 mothur/tools/mothur/parse.list.xml
--- a/mothur/tools/mothur/parse.list.xml Mon Sep 22 11:19:09 2014 -0400
+++ b/mothur/tools/mothur/parse.list.xml Fri Oct 31 15:09:32 2014 -0400
@@ -12,6 +12,9 @@
#if $label.__str__ != "None" and len($label.__str__) > 0:
--label='$label'
#end if
+ #if $count.__str__ != "None" and len($count.__str__) > 0:
+ --count=$count
+ #end if
@@ -22,12 +25,13 @@