Load variant metadata file.

@param path          Path to the variant metadata file
@throws IOException  IOException
161146
public void load(Path path) throws IOException {
        FileUtils.checkPath(path);
        logger.debug("Loading variant metadata from '{}'", path.toAbsolutePath().toString());
        variantMetadata = mapper.readValue(path.toFile(), VariantMetadata.class);

        // We need to add Individual info fields to their sample annotations to allow more complex queries
        for (VariantStudyMetadata variantStudyMetadata: variantMetadata.getStudies()) {
            if (variantStudyMetadata.getIndividuals() != null) {
                for (org.opencb.biodata.models.metadata.Individual individual : variantStudyMetadata.getIndividuals()) {
                    for (Sample sample : individual.getSamples()) {
                        sample.getAnnotations().put(INDIVIDUAL_ID, individual.getId());
                        sample.getAnnotations().put(INDIVIDUAL_FAMILY, individual.getFamily());
                        sample.getAnnotations().put(INDIVIDUAL_FATHER, individual.getFather());
                        sample.getAnnotations().put(INDIVIDUAL_MOTHER, individual.getMother());
                        sample.getAnnotations().put(INDIVIDUAL_SEX, individual.getSex());
                        sample.getAnnotations().put(INDIVIDUAL_PHENOTYPE, individual.getPhenotype());
                    }
                }
            }
        }
    }
13719
protected Spec readSpecFromFile(Path path) throws IOException {
    Spec spec;

    try (FSDataInputStream fis = fs.open(path)) {
      spec = this.specSerDe.deserialize(ByteStreams.toByteArray(fis));
    }

    return spec;
  }
817234
public void readPOSDICT(String path, String suffix) throws IOException {
		DictPOS dp = new DictPOS();
		dp.loadPath(path,suffix);
		set.addAll(dp.dict.keySet());
	}
462698
public synchronized void loadConfig(String filePath) throws Exception {

        if (isLoaded) {
            return;
        }

        String filePathInternal = filename;

        if (filePath != null) {

            filePathInternal = filePath;
        }

        DisconfAutowareConfig.autowareConfig(INSTANCE, filePathInternal);

        isLoaded = true;
    }
464611
def load(self, path, name):
        

        filename = name + '.fgic'
        filepath = aux.joinpath(path, filename)
        with zipfile.ZipFile(filepath, 'r') as containerZip:
            #Convert the zipfile data into a str object, necessary since
            #containerZip.read() returns a bytes object.
            jsonString = io.TextIOWrapper(containerZip.open('data'),
                                          encoding='utf-8'
                                          ).read()
            infoString = io.TextIOWrapper(containerZip.open('info'),
                                          encoding='utf-8'
                                          ).read()
        self.container = json.loads(jsonString, object_hook=Fgi.jsonHook)
        self.info.update(json.loads(infoString))
        self._matrixTemplate = self.info['_matrixTemplate']
        del self.info['_matrixTemplate']
682585
private void buildTemplatedMetadataFile(String path) throws IOException {
    try (InputStream is = getClass().getResourceAsStream("/content-package-template/" + path)) {
      String xmlContent = IOUtils.toString(is);
      for (Map.Entry<String, Object> entry : metadata.getVars().entrySet()) {
        xmlContent = StringUtils.replace(xmlContent, "{{" + entry.getKey() + "}}",
            StringEscapeUtils.escapeXml10(entry.getValue().toString()));
      }
      zip.putNextEntry(new ZipEntry(path));
      try {
        zip.write(xmlContent.getBytes(Charsets.UTF_8));
      }
      finally {
        zip.closeEntry();
      }
    }
  }
1328396
def _load(self, file_path: Text) -> None:
        

        # noinspection PyUnresolvedReferences
        module_ = types.ModuleType('settings')
        module_.__file__ = file_path

        try:
            with open(file_path, encoding='utf-8') as f:
                exec(compile(f.read(), file_path, 'exec'), module_.__dict__)
        except IOError as e:
            e.strerror = 'Unable to load configuration file ({})'\
                .format(e.strerror)
            raise

        for key in dir(module_):
            if CONFIG_ATTR.match(key):
                self[key] = getattr(module_, key)
276593
public static void loadTag(String path) throws LoadModelException {
		if(pos==null){

			String file = path+posModel;
			if(seg==null)
				pos = new POSTagger(file);
			else{
				pos = new POSTagger(seg,file);					
			}
		}
	}
14393
public void loadModel(String path) {
        Config cfg = Config.newConfig(path);

        loadSection(this, cfg, "r");
        loadSection(this, cfg, "p");
        loadSection(this, cfg, "e");
        loadSection(this, cfg, "m");

        loadSection(this, cfg, "g");
    }
1316672
def load(self, path):
        
        meta = self._loadMetaFromJson(path)
        return CompleteMeasurement(meta, self.dataDir) if meta is not None else None
636467
public static void loadDict(String... path) throws LoadModelException {

		for(String file:path){
			dict.addFile(file);
		}
		setDict();

	}
828533
def metadata_path(self, m_path):
        
        if not m_path:
            self.metadata_dir = None
            self.metadata_file = None

        else:
            if not op.exists(m_path):
                raise OSError('{}: file does not exist!'.format(m_path))

            if not op.dirname(m_path):
                self.metadata_dir = '.'
            else:
                self.metadata_dir = op.dirname(m_path)
            self.metadata_file = op.basename(m_path)

            # Parse the metadata file using Biopython's built in SeqRecord parser
            # Just updating IDs and stuff
            tmp_sr = SeqIO.read(self.metadata_path, 'uniprot-xml')
            parsed = parse_uniprot_xml_metadata(tmp_sr)
            self.update(parsed, overwrite=True)
378074
public void load(String path,String tag) throws IOException{
		if(path == null) return;
		dict = MyCollection.loadTSet(path);
		maxLen = 0;
		TObjectHashIterator<String> it = dict.iterator();
		while(it.hasNext()){
			String k = it.next();
			if(k.length()>maxLen){
				maxLen = k.length();
			}
		}		
		name = tag;		
	}
1325853
public static PrototypeMeasurementFilterSpecification loadFromPath(String path)
      throws IOException {
    byte[] jsonData = Files.readAllBytes(Paths.get(path));
    ObjectMapper objectMapper = new ObjectMapper();
    return objectMapper.readValue(
        jsonData, PrototypeMeasurementFilterSpecification.class);
  }
448565
public void loadPath(File path, String suffix, boolean recursively) {
    loadPath(path, new ExtensionFileFilter(suffix, recursively));
  }
254213
public Set<String> getGeneratedResourceVariantTypes(String path) {

		Set<String> variantTypes = new HashSet<>();
		ResourceGenerator generator = resolveResourceGenerator(path);
		if (generator != null) {
			if (generator instanceof VariantResourceGenerator) {

				Set<String> tempResult = ((VariantResourceGenerator) generator)
						.getAvailableVariants(generator.getResolver().getResourcePath(path)).keySet();
				if (tempResult != null) {
					variantTypes = tempResult;
				}
			} else if (generator instanceof LocaleAwareResourceGenerator) {
				variantTypes = new HashSet<>();
				variantTypes.add(JawrConstant.LOCALE_VARIANT_TYPE);
			}
		}

		return variantTypes;
	}
254069
private ProfileFileElement loadProfileFile(Path base, String path) throws IOException {
    Source source = source(base, path);
    if (source == null) return null;
    try {
      Location location = Location.get(base.toString(), path);
      String data = Okio.buffer(source).readUtf8();
      return new ProfileParser(location, data).read();
    } catch (IOException e) {
      throw new IOException("Failed to load " + source + " from " + base, e);
    } finally {
      source.close();
    }
  }