Skip to content

Commit

Permalink
downloader: add MONDO ontology
Browse files Browse the repository at this point in the history
  • Loading branch information
imedina committed Jan 2, 2024
1 parent 0004be6 commit 7e72929
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions cellbase-core/src/main/resources/configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,16 @@ download:
version: "2.1.1"
hpoObo:
host: http://purl.obolibrary.org/obo/hp.obo
version: "2023-12-01"
goObo:
host: http://purl.obolibrary.org/obo/go/go-basic.obo
version: "2023-12-01"
doidObo:
host: http://purl.obolibrary.org/obo/doid.obo
version: "2023-12-01"
mondoObo:
host: http://purl.obolibrary.org/obo/mondo.obo
version: "2023-12-01"
goAnnotation:
host: http://geneontology.org/gene-associations/goa_human.gaf.gz
revel:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,32 @@ public OntologyDownloadManager(String species, String assembly, Path targetDirec


public List<DownloadFile> download() throws IOException, InterruptedException {
logger.info("Downloading obo files ...");
logger.info("Downloading OBO files ...");

List<DownloadFile> downloadFiles = new ArrayList<>();
Path oboFolder = downloadFolder.resolve("ontology");
Files.createDirectories(oboFolder);

String url = configuration.getDownload().getHpoObo().getHost();
downloadFiles.add(downloadFile(url, oboFolder.resolve("hp.obo").toString()));

saveVersionData(EtlCommons.OBO_DATA, "HPO", getTimeStamp(), getTimeStamp(),
Collections.singletonList(url), buildFolder.resolve(EtlCommons.HPO_VERSION_FILE));

url = configuration.getDownload().getGoObo().getHost();
downloadFiles.add(downloadFile(url, oboFolder.resolve("go-basic.obo").toString()));

saveVersionData(EtlCommons.OBO_DATA, "GO", getTimeStamp(), getTimeStamp(),
Collections.singletonList(url), buildFolder.resolve(EtlCommons.GO_VERSION_FILE));

url = configuration.getDownload().getDoidObo().getHost();
downloadFiles.add(downloadFile(url, oboFolder.resolve("doid.obo").toString()));

saveVersionData(EtlCommons.OBO_DATA, "DO", getTimeStamp(), getTimeStamp(),
Collections.singletonList(url), buildFolder.resolve(EtlCommons.DO_VERSION_FILE));

url = configuration.getDownload().getMondoObo().getHost();
downloadFiles.add(downloadFile(url, oboFolder.resolve("mondo.obo").toString()));
saveVersionData(EtlCommons.OBO_DATA, "MONDO", getTimeStamp(), getTimeStamp(),
Collections.singletonList(url), buildFolder.resolve(EtlCommons.DO_VERSION_FILE));

return downloadFiles;
}
}

0 comments on commit 7e72929

Please sign in to comment.