#NEWLINE# @ transform ( runZinba , regex ( '(\\S+)/zinba/(\\S+).peaks' ) , '\\1/zinba/\\2.zinba.load' ) #NEWLINE# def loadZinba( infile , outfile ) : #NEWLINE# #INDENT# track = P . snip ( os . path . basename ( tablename ) , '.peaks' ) #NEWLINE# tablename = ( '%s_zinba_intervals' % track ) #NEWLINE# headers = 'peakid,contig,start,stop,strand,sig,maxloc,maxval,pstart,pstop,median,qvalue' #NEWLINE# statement = "cat | sed -v 'PEAKID'\n                   | python %(scriptsdir)s/csv2db.py %(csv2db_options)s \n                       --header=%(headers)s\n                       --index=contig,start\n                       --table=%(tablename)s\n                       --allow-empty \n                   > %(outfile)s" #NEWLINE# P . run ( )