#NEWLINE# def get_regions( self ) : #NEWLINE# #INDENT# eta = ETA ( self . gtf . fsize ( ) , fileobj = self . gtf ) #NEWLINE# for gene in self . gtf . genes : #NEWLINE# #INDENT# eta . print_status ( extra = gene . gene_name ) #NEWLINE# starts = [ ] #NEWLINE# ends = [ ] #NEWLINE# for ( num , start , end , const , names ) in gene . regions : #NEWLINE# #INDENT# starts . append ( start ) #NEWLINE# ends . append ( end ) #NEWLINE# #UNINDENT# out = [ gene . gene_id , gene . gene_name ] #NEWLINE# if self . has_isoform : #NEWLINE# #INDENT# out . append ( ( gene . attributes [ 'isoform_id' ] if ( 'isoform_id' in gene . attributes ) else '' ) ) #NEWLINE# #UNINDENT# if self . has_biotype : #NEWLINE# #INDENT# out . append ( ( gene . attributes [ 'gene_biotype' ] if ( 'gene_biotype' in gene . attributes ) else '' ) ) #NEWLINE# #UNINDENT# out . extend ( [ gene . chrom , gene . strand , gene . start , gene . end ] ) #NEWLINE# ( yield ( gene . chrom , starts , ends , gene . strand , out , None ) ) #NEWLINE# #UNINDENT# eta . done ( )