#NEWLINE# def load( self ) : #NEWLINE# #INDENT# log = self . log #NEWLINE# array_type = self . array_type #NEWLINE# vcf_fn = self . vcf_fn #NEWLINE# region = self . region #NEWLINE# cache = self . cache #NEWLINE# cachedir = self . cachedir #NEWLINE# skip_cached = self . skip_cached #NEWLINE# if cache : #NEWLINE# #INDENT# log ( 'caching is enabled' ) #NEWLINE# ( cache_fn , is_cached ) = _get_cache ( vcf_fn , array_type = array_type , region = region , cachedir = cachedir , log = log ) #NEWLINE# if ( not is_cached ) : #NEWLINE# #INDENT# log ( 'building array' ) #NEWLINE# arr = self . build ( ) #NEWLINE# log ( 'saving to cache file' , cache_fn ) #NEWLINE# np . save ( cache_fn , arr ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if skip_cached : #NEWLINE# #INDENT# log ( 'skipping load from cache file' , cache_fn ) #NEWLINE# arr = None #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# log ( 'loading from cache file' , cache_fn ) #NEWLINE# arr = np . load ( cache_fn ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# log ( 'caching is disabled' ) #NEWLINE# log ( 'building array' ) #NEWLINE# arr = self . build ( ) #NEWLINE# #UNINDENT# return arr