#NEWLINE# @ transform ( runSICER , regex ( '(\\S+)/sicer/(\\S+).sicer' ) , '\\1/sicer/\\2.sicer.load' ) #NEWLINE# def loadSICER( infile , outfile ) : #NEWLINE# #INDENT# track = P . snip ( os . path . basename ( infile ) , '.sicer' ) #NEWLINE# sicerdir = os . path . dirname ( infile ) #NEWLINE# window = PARAMS [ 'sicer_window' ] #NEWLINE# gap = PARAMS [ 'sicer_gap' ] #NEWLINE# FDR = PARAMS [ 'sicer_fdr' ] #NEWLINE# bedfile = ( ( ( ( ( ( ( ( sicerdir + '/' ) + track ) + '-W' ) + str ( window ) ) + '-G' ) + str ( gap ) ) + '-islands-summary-FDR' ) + str ( statement ) ) #NEWLINE# tablename = ( '%s_sicer_intervals' % track ) #NEWLINE# headers = 'contig,start,stop,chip_reads,control_reads,pvalue,fold,fdr' #NEWLINE# statement = 'python %(scriptsdir)s/csv2db.py %(csv2db_options)s \n                       --header=%(headers)s\n                       --index=contig,start\n                       --table=%(tablename)s\n                       --allow-empty \n                   < %(bedfile)s > %(outfile)s' #NEWLINE# P . run ( )