#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# self . tmpdir = tempfile . mkdtemp ( ) #NEWLINE# self . workspace = os . path . join ( self . tmpdir , 'workspace.gtf' ) #NEWLINE# self . segments = os . path . join ( self . tmpdir , 'segments.gtf' ) #NEWLINE# outfile = open ( self . workspace , 'w' ) #NEWLINE# e = GTF . Entry ( ) #NEWLINE# ( e . contig , e . strand , e . gene_id , e . transcript_id ) = ( 'chr1' , '+' , 'gene1' , 'trans1' ) #NEWLINE# for x in range ( 100000 , 10000000 , 100000 ) : #NEWLINE# #INDENT# ( e . gene_id , e . transcript_id ) = ( ( 'gene%i' % x ) , 'trans1' ) #NEWLINE# ( e . start , e . end ) = ( x , ( x + 10000 ) ) #NEWLINE# outfile . write ( ( str ( e ) + '\n' ) ) #NEWLINE# #UNINDENT# outfile . close ( ) #NEWLINE# outfile = open ( self . segments , 'w' ) #NEWLINE# e = GTF . Entry ( ) #NEWLINE# ( e . contig , e . strand ) = ( 'chr1' , '+' ) #NEWLINE# for x in range ( 0 , 10000000 , 1000 ) : #NEWLINE# #INDENT# ( e . gene_id , e . transcript_id ) = ( ( 'gene%i' % x ) , 'trans1' ) #NEWLINE# ( e . start , e . end ) = ( x , ( x + random . randint ( 50 , 150 ) ) ) #NEWLINE# outfile . write ( ( str ( e ) + '\n' ) ) #NEWLINE# #UNINDENT# outfile . close ( )