comparison rgToolFactory.py @ 13:d5a5f9c2c108 draft

Uploaded
author fubar
date Thu, 20 Mar 2014 06:00:21 -0400
parents a898ba82496e
children 43ab59672f78
comparison
equal deleted inserted replaced
12:a898ba82496e 13:d5a5f9c2c108
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 outpif = '%s.py' % self.toolname # new name 366 outpif = '%s.py' % self.toolname # new name
367 outpiname = os.path.join(tdir,outpif) # 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' % (outpiname,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
373 notes += pi 373 notes += pi
374 outpi = open(outpiname,'w') 374 outpi = open(outpiname,'w')