Mercurial > repos > fubar > toolfactory
comparison rgToolFactory.py @ 12:a898ba82496e draft
Uploaded
author | fubar |
---|---|
date | Thu, 20 Mar 2014 05:57:09 -0400 |
parents | 704ccaade924 |
children | d5a5f9c2c108 |
comparison
equal
deleted
inserted
replaced
11:704ccaade924 | 12:a898ba82496e |
---|---|
347 if self.opts.help_text: | 347 if self.opts.help_text: |
348 hlp = open(self.opts.help_text,'r').read() | 348 hlp = open(self.opts.help_text,'r').read() |
349 else: | 349 else: |
350 hlp = 'Please ask the tool author for help as none was supplied at tool generation\n' | 350 hlp = 'Please ask the tool author for help as none was supplied at tool generation\n' |
351 tooldeps = toolhtmldep % hlp | 351 tooldeps = toolhtmldep % hlp |
352 depf = open('tool_dependencies.xml','w') | 352 depf = open(os.path.join(tdir,'tool_dependencies.xml'),'w') |
353 depf.write(hlp) | 353 depf.write(hlp) |
354 depf.write('\n') | 354 depf.write('\n') |
355 depf.close() | 355 depf.close() |
356 if self.opts.input_tab <> 'None': # no reproducible test otherwise? TODO: maybe.. | 356 if self.opts.input_tab <> 'None': # no reproducible test otherwise? TODO: maybe.. |
357 testdir = os.path.join(tdir,'test-data') | 357 testdir = os.path.join(tdir,'test-data') |
361 shutil.copyfile(self.opts.output_tab,os.path.join(testdir,self.test1Output)) | 361 shutil.copyfile(self.opts.output_tab,os.path.join(testdir,self.test1Output)) |
362 if self.opts.make_HTML: | 362 if self.opts.make_HTML: |
363 shutil.copyfile(self.opts.output_html,os.path.join(testdir,self.test1HTML)) | 363 shutil.copyfile(self.opts.output_html,os.path.join(testdir,self.test1HTML)) |
364 if self.opts.output_dir: | 364 if self.opts.output_dir: |
365 shutil.copyfile(self.tlog,os.path.join(testdir,'test1_out.log')) | 365 shutil.copyfile(self.tlog,os.path.join(testdir,'test1_out.log')) |
366 op = '%s.py' % self.toolname # new name | 366 outpif = '%s.py' % self.toolname # new name |
367 outpiname = os.path.join(tdir,op) # path for the tool tarball | 367 outpiname = os.path.join(tdir,outpif) # path for the tool tarball |
368 pyin = os.path.basename(self.pyfile) # our name - we rewrite ourselves (TM) | 368 pyin = os.path.basename(self.pyfile) # our name - we rewrite ourselves (TM) |
369 notes = ['# %s - a self annotated version of %s generated by running %s\n' % (op,pyin,pyin),] | 369 notes = ['# %s - a self annotated version of %s generated by running %s\n' % (op,pyin,pyin),] |
370 notes.append('# to make a new Galaxy tool called %s\n' % self.toolname) | 370 notes.append('# to make a new Galaxy tool called %s\n' % self.toolname) |
371 notes.append('# User %s at %s\n' % (self.opts.user_email,timenow())) | 371 notes.append('# User %s at %s\n' % (self.opts.user_email,timenow())) |
372 pi = open(self.pyfile,'r').readlines() # our code becomes new tool wrapper (!) - first Galaxy worm | 372 pi = open(self.pyfile,'r').readlines() # our code becomes new tool wrapper (!) - first Galaxy worm |