aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMunyoki Kilyungi2022-08-19 00:10:30 +0300
committerArun Isaac2022-08-20 15:31:21 +0530
commit8ff50fe6b48d9855c887b718547a8d4802e6ccba (patch)
tree6ef4adcf1d3237bc4c565f321d48c21372bd0f27
parent3b19dc04b14e27a12a3152d0cc3a52d1048854a8 (diff)
downloadgn-transform-databases-8ff50fe6b48d9855c887b718547a8d4802e6ccba.tar.gz
Add gn:traitId and gn:publicationId.
In GeneNetwork, a phenonytpe is currently identified by it's ID (primary key of the table from MariaDB). The only way to relate it to a publication is through a publication ID. This is important because there are some publications with a NULL value for "pubmed ID" and as such without the publication ID, some data is lost as there's no way to point to publication with a NULL "pubmed ID." * dump.scm (dump-publish-xref): Define gn:traitId and gn:publicationId. Signed-off-by: Arun Isaac <arunisaac@systemreboot.net>
-rwxr-xr-xdump.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/dump.scm b/dump.scm
index 2a893ae..439f9e2 100755
--- a/dump.scm
+++ b/dump.scm
@@ -489,7 +489,11 @@ must be remedied."
(gn:phenotypeOfSpecies rdfs:domain gn:phenotype)
(gn:phenotypeOfSpecies rdfs:range gn:species))
(triples (phenotype-id->id (field PublishXRef PhenotypeId))
- (set gn:phenotypeOfSpecies (inbred-set-name->id (field InbredSet Name)))))
+ (set gn:phenotypeOfSpecies (inbred-set-name->id (field InbredSet Name)))
+ (set gn:traitId (field PublishXRef id))
+ (set gn:publicationId
+ (string->identifier "publication"
+ (number->string (field PublishXRef PublicationId))))))
(define tissue-short-name->id
(cut string->identifier "tissue" <>))