#NEWLINE# def hitmap( self ) : #NEWLINE# #INDENT# output = [ ] #NEWLINE# output . append ( self . name ) #NEWLINE# output . append ( ( '%s\t%s\t%s\t%s' % ( self . sequence , 'offset' , 'size' , 'num reads' ) ) ) #NEWLINE# for pos_size in sorted ( self . dicmap ) : #NEWLINE# #INDENT# seq = self . sequence [ pos_size [ 0 ] : ( pos_size [ 0 ] + pos_size [ 1 ] ) ] #NEWLINE# output . append ( ( '%s%s%s\t%s\t%s\t%s' % ( ( '.' * len ( self . sequence [ : pos_size [ 0 ] ] ) ) , seq , ( '.' * len ( self . sequence [ ( pos_size [ 0 ] + output [ 1 ] ) : ] ) ) , ( pos_size [ 0 ] + 1 ) , pos_size [ 1 ] , self . dicmap [ pos_size ] ) ) ) #NEWLINE# #UNINDENT# return '\n' . join ( output )