Commit 78bdb21d authored by Penom Nom's avatar Penom Nom
Browse files

add new component

parent e0dd583d
from jflow.component import Component
from jflow.iotypes import OutputFile, OutputFileList, InputFile, InputFileList, Formats
from jflow.abstraction import MultiMap
from weaver.function import ShellFunction
class MothurTreeShared(Component):
"""
"""
def define_parameters(self, shared_files, calc="thetayc", label="0.01"):
"""
:param shared_files: shared files to process
:type shared_files: str
:param calc :
:type calc : str
:param label :
:type label : st
"""
#define parameters
self.calc = calc
self.label = label
#define input files
self.shared_files = InputFileList(shared_files)
#define output files
self.tree_files = OutputFileList(self.get_outputs('{basename_woext}.'+self.calc+'.'+self.label+'.tre', self.shared_files))
self.stdout = OutputFileList(self.get_outputs('{basename_woext}.stdout', self.shared_files))
def process(self):
print ">>>Process make.shared"
treeshared = ShellFunction(self.get_exec_path("mothur") + ' "#tree.shared(shared=$1,calc='+self.calc+',label='+self.label+',outputdir='+self.output_directory+'/)" > $2',\
cmd_format='{EXE} {IN} {OUT}')
treeshared = MultiMap(treeshared, inputs=[self.shared_files], outputs=[self.stdout,self.tree_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