aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-06-09 14:58:53 +0300
committerBonfaceKilz2023-06-12 19:06:36 +0300
commitaede661b55eb6b2f4b4b9eeb8972ab2a73a98d83 (patch)
treef11263499d699ece73ba4e2be9b1063a44dd38f1
parent632b922a580bc08affbc7700a7f892868e3606ac (diff)
downloadgn-transform-databases-aede661b55eb6b2f4b4b9eeb8972ab2a73a98d83.tar.gz
Annotate publications without a pmid with "unpublished"
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
-rwxr-xr-xexamples/dump-phenotype.scm4
-rwxr-xr-xexamples/dump-publication.scm4
2 files changed, 4 insertions, 4 deletions
diff --git a/examples/dump-phenotype.scm b/examples/dump-phenotype.scm
index 51ecb64..7582d94 100755
--- a/examples/dump-phenotype.scm
+++ b/examples/dump-phenotype.scm
@@ -102,9 +102,9 @@
pmid)))
(publication-id (field Publication Id)))
(if (string-null? pmid)
- (string->identifier "publication"
+ (string->identifier "unpublished"
(number->string publication-id))
- (ontology 'pubmed: pmid))))))
+ (ontology 'publication: pmid))))))
(call-with-target-database
diff --git a/examples/dump-publication.scm b/examples/dump-publication.scm
index ef2a36d..ba77256 100755
--- a/examples/dump-publication.scm
+++ b/examples/dump-publication.scm
@@ -39,8 +39,8 @@
pmid)))
(publication-id (field Publication Id)))
(if (string-null? pmid)
- (ontology 'publication:
- publication-id)
+ (string->identifier "unpublished"
+ (number->string publication-id))
(ontology 'publication: pmid)))
(set rdf:type 'gn:publication)
(set gn:pubMedId (ontology 'pubmed: (field ("IFNULL(PubMed_ID, '')" pubmedId))))