Commit 57b83cc0 authored by Penom Nom's avatar Penom Nom
Browse files

No commit message

No commit message
parent 429e38d1
......@@ -26,7 +26,7 @@ class MothurChimeraUchime(Component):
"""
"""
def define_parameters(self, fasta_files, names_files, groups_files=None, processors=1):
def define_parameters(self, fasta_files, reference_files=None, names_files=None, groups_files=None, processors=1):
"""
Define chimera.uchime component parameters.
:param fasta_files: fasta files to process
......@@ -43,7 +43,10 @@ class MothurChimeraUchime(Component):
self.processors = processors
#define input files
self.fasta_files = InputFileList(fasta_files, Formats.FASTA)
self.names_files = InputFileList(names_files, Formats.MOTHUR_NAMES)
if reference_files : self.reference_files = InputFileList(reference_files)
else : self.reference_files = None
if names_files : self.names_files = InputFileList(names_files, Formats.MOTHUR_NAMES)
else : self.names_files = None
if groups_files : self.groups_files = InputFileList(groups_files, Formats.MOTHUR_GROUPS)
else: self.groups_files = None
#define output files
......@@ -53,13 +56,20 @@ class MothurChimeraUchime(Component):
def process(self):
print ">>>Process chimera.uchime"
if self.groups_files:
chimerauchime = ShellFunction(self.get_exec_path("mothur") + ' "#chimera.uchime(fasta=$1,name=$2,group=$3,outputdir='+self.output_directory+\
'/,processors='+str(self.processors)+')" > $4', cmd_format='{EXE} {IN} {OUT}')
chimerauchime = MultiMap(chimerauchime, inputs=[self.fasta_files,self.names_files,self.groups_files], \
if self.reference_files:
chimerauchime = ShellFunction(self.get_exec_path("mothur") + ' "#chimera.uchime(fasta=$1,reference=$2,outputdir='+self.output_directory+\
'/,processors='+str(self.processors)+')" > $3', cmd_format='{EXE} {IN} {OUT}')
chimerauchime = MultiMap(chimerauchime, inputs=[self.fasta_files,self.reference_files], \
outputs=[self.stdout,self.uchime_chimera_files,self.uchime_accnos_files])
else:
elif self.names_files and not self.groups_files:
chimerauchime = ShellFunction(self.get_exec_path("mothur") + ' "#chimera.uchime(fasta=$1,name=$2,outputdir='+self.output_directory+\
'/,processors='+str(self.processors)+')" > $3', cmd_format='{EXE} {IN} {OUT}')
chimerauchime = MultiMap(chimerauchime, inputs=[self.fasta_files,self.names_files], \
outputs=[self.stdout,self.uchime_chimera_files,self.uchime_accnos_files])
\ No newline at end of file
outputs=[self.stdout,self.uchime_chimera_files,self.uchime_accnos_files])
else:
chimerauchime = ShellFunction(self.get_exec_path("mothur") + ' "#chimera.uchime(fasta=$1,name=$2,group=$3,outputdir='+self.output_directory+\
'/,processors='+str(self.processors)+')" > $4', cmd_format='{EXE} {IN} {OUT}')
chimerauchime = MultiMap(chimerauchime, inputs=[self.fasta_files,self.names_files,self.groups_files], \
outputs=[self.stdout,self.uchime_chimera_files,self.uchime_accnos_files])
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment