#NEWLINE# def __init__( self , data ) : #NEWLINE# #INDENT# self . lines = self #NEWLINE# self . header = self . lines [ 0 ] #NEWLINE# self . atts = self . header . split ( ) #NEWLINE# a = len ( self . atts ) #NEWLINE# if ( a != 13 ) : #NEWLINE# #INDENT# raise Exception ( ( 'Unexpected Header length\n' + self . header ) ) #NEWLINE# #UNINDENT# self . score = int ( self . atts [ 1 ] ) #NEWLINE# self . tname = self . atts [ 2 ] #NEWLINE# self . tsize = int ( self . atts [ 3 ] ) #NEWLINE# self . tstrand = self . atts [ 4 ] #NEWLINE# self . tstart = int ( self . atts [ 5 ] ) #NEWLINE# self . tend = int ( self . atts [ 6 ] ) #NEWLINE# self . qname = self . atts [ 7 ] #NEWLINE# self . qsize = int ( self . atts [ 8 ] ) #NEWLINE# self . qstrand = self . atts [ 9 ] #NEWLINE# b = self . qstrand #NEWLINE# if ( ( b != '+' ) and ( b != '-' ) ) : #NEWLINE# #INDENT# raise Exception ( 'unexpected strand id' ) #NEWLINE# #UNINDENT# self . qstart = int ( self . atts [ 10 ] ) #NEWLINE# self . qend = int ( self . atts [ 11 ] ) #NEWLINE# self . id = int ( self . atts [ 12 ] ) #NEWLINE# self . tlength = ( self . tend - self . tstart ) #NEWLINE# self . qlength = ( self . qend - self . qstart ) #NEWLINE# self . nlines = len ( self . lines ) #NEWLINE# self . nblocks = ( self . nlines - 1 ) #NEWLINE# ( self . tgr , self . qgr ) = self . _gapped_regions ( ) #NEWLINE# ( self . tugr , self . qugr ) = self . _ungapped_regions ( )