# HG changeset patch # User Jim Johnson # Date 1354547383 21600 # Node ID 729e90f1e874efd6e4c41e17eb2954fe4bacb79b # Parent 2088a8d469c9d1d236a7428e670ea9d52326ea5b remove group.metadata from datatypes, remove add_value from rarefaction.shared until lib issue solved, have mothur_wrapper.py special case count.groups diff -r 2088a8d469c9 -r 729e90f1e874 mothur/datatypes_conf.xml --- a/mothur/datatypes_conf.xml Fri Nov 30 11:46:37 2012 -0600 +++ b/mothur/datatypes_conf.xml Mon Dec 03 09:09:43 2012 -0600 @@ -13,7 +13,9 @@ + diff -r 2088a8d469c9 -r 729e90f1e874 mothur/tools/mothur/mothur_wrapper.py --- a/mothur/tools/mothur/mothur_wrapper.py Fri Nov 30 11:46:37 2012 -0600 +++ b/mothur/tools/mothur/mothur_wrapper.py Mon Dec 03 09:09:43 2012 -0600 @@ -206,7 +206,7 @@ cmd_dict['cooccurrence'] = dict({'required' : ['shared'], 'optional' : ['iters','metric','matrixmodel','groups','label']}) cmd_dict['corr.axes'] = dict({'required' : [['shared','relabund','metadata'],'axes'], 'optional' : ['label','groups','method','numaxes']}) - cmd_dict['count.groups'] = dict({'required' : ['group','shared','count'], 'optional' : ['accnos','groups']}) + 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']}) @@ -658,10 +658,21 @@ if re.match(pattern,line): chimera_count += 1 info += "Chimeras: %d" % chimera_count + elif options.cmd == 'count.groups': + fh = open(os.path.join(outputdir,'tmp.groups.count'),'w') + for line in tmp_stdout: + m = re.match('(.+) contains (\d+)\.',line) + if m and len(m.groups()) == 2: + info += line + print >> fh, "%s\t%s\n" % (m.group(1),m.group(2)) + fh.close() else: found_begin = False info_chars = 0 for line in tmp_stdout: + if re.match('mothur > ' + options.cmd + '\(.*\)', line): + found_begin = True + continue if line.find(outputdir) >= 0: continue if line.startswith('**************'): @@ -676,18 +687,19 @@ continue if re.match('.*\.\.\.\s*$',line): continue - if re.match('^\d*\s*$',line): + if re.match('^\d*\s*$',line) and not line.find(' contains '): continue # if re.match('^(unique|[0-9.]*)(\t\d+)+',line): # abundance from cluster commands - if not options.cmd.startswith('unifrac') and re.match('^(unique|[0-9.]+)(\t\d+)*',line): # abundance from cluster commands, allow unique line into info + if (not (options.cmd.startswith('unifrac') or options.cmd.startswith('count.groups')) + and re.match('^(unique|[0-9.]+)(\t\d+)*',line)): # abundance from cluster commands, allow unique line into info continue if re.match('Output .*',line): break + if re.match('mothur > quit()',line): + break if found_begin and info_chars < 200: info += "%s" % line info_chars += len(line) - if re.match('mothur > ' + options.cmd + '\(.*\)', line): - found_begin = True tmp_stdout.close() print >> sys.stdout, info # Collect output files diff -r 2088a8d469c9 -r 729e90f1e874 mothur/tools/mothur/rarefaction.shared.xml --- a/mothur/tools/mothur/rarefaction.shared.xml Fri Nov 30 11:46:37 2012 -0600 +++ b/mothur/tools/mothur/rarefaction.shared.xml Mon Dec 03 09:09:43 2012 -0600 @@ -49,7 +49,9 @@ All groups will be analyzed by default if none are selected +