public static JannovarData loadJannovarData(Path transcriptFilePath){ //first try loading the file using the new protobuf-based format (larger file-size, but faster load-time) try { return JannovarDataProtoSerialiser.load(transcriptFilePath); } catch (Exception e) { logger.warn("Unable to load Jannovar data - {}", e.getMessage()); logger.warn("Incorrect Jannovar data format? Will try the old version..."); } try { // if we've got here, try again using the original java serializable-based format (small file-size, but slower load-time) return new JannovarDataSerializer(transcriptFilePath.toString()).load(); } catch (SerializationException e) { throw new ExomiserAutoConfigurationException("Could not load Jannovar data from " + transcriptFilePath, e); } } }
/** * Deserialize the transcript definition file from {@link pathToDataFile}. * * @param pathToDataFile * String with the path to the data file to deserialize * @throws JannovarException * when there is a problem with the deserialization * @throws HelpRequestedException * when the user requested the help page */ protected void deserializeTranscriptDefinitionFile(String pathToDataFile) throws JannovarException, HelpRequestedException { this.jannovarData = new JannovarDataSerializer(pathToDataFile).load(); this.refDict = this.jannovarData.getRefDict(); this.chromosomeMap = this.jannovarData.getChromosomes(); }