public void writeQa4dsInputYamlFile(String templatePath, int gsThreshold, String yamlPath)
          throws IOException {
    System.out.println("Creating object and dumping...");
    YamlSequenceDumper dumper = new YamlSequenceDumper(yamlPath, Charsets.UTF_8);
    // add template
    Map<String, String> templateData = Maps.newHashMap();
    templateData.put("template", templatePath);
    dumper.add(templateData);
    dumper.flush();
    // add variable values, candidatas and gs
    for (String dname : getDiseaseNames()) {
      // add variable values
      Map<String, String> var2value = Maps.newHashMap();
      var2value.put("DISEASE", dname);
      var2value.put("PHENOTYPE", getPhenotypeName(dname));
      var2value.put("NORMAL_TISSUE", getNormalTissueName(dname));
      var2value.put("DISEASE_TISSUE", getDiseaseTissueName(dname));
      var2value.put("DISEASE_CELL", getDiseaseCellName(dname));
      Map<String, Map<String, String>> valuesData = Maps.newHashMap();
      valuesData.put("values", var2value);
      dumper.add(valuesData);
      // add candidates
      Map<String, List<String>> candidateData = Maps.newHashMap();
      ImmutableList<String> geneList = ImmutableList.copyOf(getGeneNames());
      candidateData.put("candidates", geneList);
      dumper.add(candidateData);
      // add gs
      Map<String, List<String>> gname2relations = table.column(dname);
      List<String> gs = Lists.newArrayList();
      for (String gname : gname2relations.keySet()) {
        if (gname2relations.get(gname).size() >= gsThreshold) {
          gs.add(gname);
        }
      }
      Map<String, List<String>> gsData = Maps.newHashMap();
      gsData.put("gs", gs);
      dumper.add(gsData);
      dumper.flush();
    }
    dumper.close();
  }