fields = line.split("\t"); GeneTraitAssociation disease = new GeneTraitAssociation(fields[0], fields[4], fields[3], 0f, 0, new ArrayList<>(), new ArrayList<>(), "hpo"); addValueToMapElement(geneDiseaseAssociationMap, fields[1], disease); while ((line = bufferedReader.readLine()) != null) { fields = line.split("\t"); GeneTraitAssociation disease = new GeneTraitAssociation(fields[3], fields[4], "", Float.parseFloat(fields[5]), Integer.parseInt(fields[6]), Arrays.asList(fields[7]), Arrays.asList(fields[8].split(", ")), "disgenet"); addValueToMapElement(geneDiseaseAssociationMap, fields[1], disease);
case "HP": GeneTraitAssociation geneTraitAssociation = new GeneTraitAssociation(); geneTraitAssociation.setHpo(fields[1]); geneTraitAssociation.setId(fields[2]);
List<Document> list = (List) object.get(GENE_TRAIT_FIELD); for (Document document : list) { geneTraitAssociations.add(new GeneTraitAssociation( getDefault(document, GENE_TRAIT_ID_FIELD, ""), getDefault(document, GENE_TRAIT_NAME_FIELD, ""),
@Override public GeneTraitAssociation build() { try { GeneTraitAssociation record = new GeneTraitAssociation(); record.id = fieldSetFlags()[0] ? this.id : (java.lang.String) defaultValue(fields()[0]); record.name = fieldSetFlags()[1] ? this.name : (java.lang.String) defaultValue(fields()[1]); record.hpo = fieldSetFlags()[2] ? this.hpo : (java.lang.String) defaultValue(fields()[2]); record.score = fieldSetFlags()[3] ? this.score : (java.lang.Float) defaultValue(fields()[3]); record.numberOfPubmeds = fieldSetFlags()[4] ? this.numberOfPubmeds : (java.lang.Integer) defaultValue(fields()[4]); record.associationTypes = fieldSetFlags()[5] ? this.associationTypes : (java.util.List<java.lang.String>) defaultValue(fields()[5]); record.sources = fieldSetFlags()[6] ? this.sources : (java.util.List<java.lang.String>) defaultValue(fields()[6]); record.source = fieldSetFlags()[7] ? this.source : (java.lang.String) defaultValue(fields()[7]); return record; } catch (Exception e) { throw new org.apache.avro.AvroRuntimeException(e); } } }