public static SiftsChainToUniprotMapping load ( boolean useOnlyLocal ) throws IOException { UserConfiguration config = new UserConfiguration ( ) ; File cacheDir = new File ( config . getCacheFilePath ( ) ) ; DEFAULT_FILE = new File ( cacheDir , DEFAULT_FILENAME ) ; if ( ! DEFAULT_FILE . exists ( ) || DEFAULT_FILE . length ( ) == 0 ) { if ( useOnlyLocal ) throw new IOException ( DEFAULT_FILE + " does not exist, and did not download" ) ; download ( ) ; } try { return build ( ) ; } catch ( IOException e ) { logger . info ( "Caught IOException while reading {}. Error: {}" , DEFAULT_FILE , e . getMessage ( ) ) ; if ( useOnlyLocal ) throw new IOException ( DEFAULT_FILE + " could not be read, and did not redownload" ) ; download ( ) ; return build ( ) ; } }
Loads the SIFTS mapping . Attempts to load the mapping file in the PDB cache directory . If the file does not exist or could not be parsed downloads and stores a GZ - compressed file .