Skip to content

Commit

Permalink
moving to package-private
Browse files Browse the repository at this point in the history
  • Loading branch information
iimpulse committed Oct 24, 2023
1 parent 254ce91 commit a3f205d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions oan-etl/src/main/java/org/jax/oan/ontology/HpoGraphLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void load(Path hpoDataDirectory) throws IOException, OntologyAnnotationNe
}
}

protected void assayToPhenotype(Session session, Path loinc){
static void assayToPhenotype(Session session, Path loinc){
logger.info("Loading Assay Relationships...");
Transaction tx = session.beginTransaction();
try (BufferedReader reader = new BufferedReader(new FileReader(loinc.toFile()))) {
Expand All @@ -85,7 +85,7 @@ protected void assayToPhenotype(Session session, Path loinc){
}
}

protected void diseaseToGene(Session session, HpoAssociationData associations){
static void diseaseToGene(Session session, HpoAssociationData associations){
Transaction tx = session.beginTransaction();
logger.info("Loading Disease to Gene Relationships...");
associations.associations().diseaseIdToGeneAssociations().forEach((key, value) -> value.forEach(x ->
Expand All @@ -99,7 +99,7 @@ protected void diseaseToGene(Session session, HpoAssociationData associations){
tx.close();
}

protected void diseaseToPhenotype(Session session, HpoaDiseaseDataContainer diseases, Ontology ontology){
static void diseaseToPhenotype(Session session, HpoaDiseaseDataContainer diseases, Ontology ontology){
Transaction tx = session.beginTransaction();
logger.info("Loading Disease to Phenotype Relationships...");
diseases.diseaseData().stream().flatMap(d -> d.annotationLines().stream()).forEach(line -> {
Expand Down Expand Up @@ -128,7 +128,7 @@ protected void diseaseToPhenotype(Session session, HpoaDiseaseDataContainer dise
tx.close();
}

protected void phenotypes(Session session, List<TermId> termIds, Ontology ontology){
static void phenotypes(Session session, List<TermId> termIds, Ontology ontology){
Transaction tx = session.beginTransaction();
logger.info("Loading Phenotypes...");
for (TermId termId: termIds){
Expand All @@ -141,7 +141,7 @@ protected void phenotypes(Session session, List<TermId> termIds, Ontology ontolo
tx.close();
}

protected void genes(Session session, HpoAssociationData associations){
static void genes(Session session, HpoAssociationData associations){
Transaction tx = session.beginTransaction();
logger.info("Loading Genes...");
associations.getGeneIdentifiers().forEach( g ->
Expand All @@ -153,7 +153,7 @@ protected void genes(Session session, HpoAssociationData associations){
tx.close();
}

protected void diseases(Session session, HpoaDiseaseDataContainer diseases){
static void diseases(Session session, HpoaDiseaseDataContainer diseases){
Transaction tx = session.beginTransaction();
logger.info("Loading Diseases...");
diseases.diseaseData().forEach(d ->
Expand All @@ -165,12 +165,12 @@ protected void diseases(Session session, HpoaDiseaseDataContainer diseases){
tx.close();
}

protected String formatSources(List<AnnotationReference> sources){
static String formatSources(List<AnnotationReference> sources){
final String joinedSources = sources.stream().map(AnnotationReference::id).map(TermId::toString).collect(Collectors.joining(","));
return joinedSources.length() > 1 ? joinedSources : "UNKNOWN";
}

protected String formatFrequency(String frequency, Ontology ontology){
static String formatFrequency(String frequency, Ontology ontology){
if(frequency.startsWith("HP:")){
return ontology.getTermLabel(TermId.of(frequency)).orElse("");
} else if(frequency.equals("n/a") || frequency.equals("")) {
Expand Down

0 comments on commit a3f205d

Please sign in to comment.