-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ad38261
commit 7310bcb
Showing
9 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
HPO |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
md5: | ||
Rscript -e 'source("generate-md5.R")' | ||
|
||
|
||
hpo: | ||
Rscript -e 'source("create-HPO.R")' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
## Human Phenotype Ontology | ||
## repo: https://github.com/obophenotype/human-phenotype-ontology | ||
## release: https://github.com/obophenotype/human-phenotype-ontology/releases | ||
|
||
|
||
pg <- read.delim("HPO/phenotype_to_genes.txt") | ||
hpo2gene <- pg[, c("hpo_id", "ncbi_gene_id")] | ||
hpo2gene <- na.omit(unique(hpo2gene)) |> setNames(c("id", "gene")) | ||
|
||
# updated date | ||
date <- 20240813 | ||
|
||
|
||
library(obolite) | ||
create_sqlite("HPO/hp.obo", "HPO.sqlite", | ||
name = "Human Phenotype Ontology", | ||
date = date, | ||
url = 'https://github.com/obophenotype/human-phenotype-ontology/releases/download/v2024-08-13/hp.obo', | ||
ont2gene = hpo2gene | ||
) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,14 @@ | ||
ff <- list.files(pattern = ".sqlite$") | ||
md5 <- vapply(ff, function(f) digest::digest(f, algo='md5', file=TRUE), character(1)) | ||
|
||
if (file.exists("md5.txt")) { | ||
x <- read.delim("md5.txt", header=F) | ||
oldmd5 <- setNames(x[,2], x[,1]) | ||
md5 <- c(md5, oldmd5[!names(oldmd5) %in% names(md5)]) | ||
} | ||
|
||
|
||
cat(sprintf("%s\t%s\n", ff, md5), file="md5.txt", sep="") | ||
|
||
sapply(ff, R.utils::gzip, overwrite = TRUE) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
HDO.sqlite 41c0d4dc996b5bb4df194fc7d3c3f5b7 | ||
HPO.sqlite 1722ff49c2eb7162c77d1d48b055df1c |