diff --git a/scripts/load_sqlite.sh b/scripts/load_sqlite.sh index 42d02aca..7a4c432f 100755 --- a/scripts/load_sqlite.sh +++ b/scripts/load_sqlite.sh @@ -33,7 +33,7 @@ pigz --force output/monarch-kg-denormalized-edges.tsv echo "Populate phenio db term_association..." cp data/monarch/phenio.db.gz output/phenio.db.gz gunzip output/phenio.db.gz -sqlite3 -cmd "attach 'output/monarch-kg.db' as monarch" output/phenio.db "insert into term_association (id, subject, predicate, object, evidence_type, publication, source) select id, subject, predicate, object, has_evidence as evidence_type, publications as publication, primary_knowledge_source as source from monarch.edges where predicate = 'biolink:has_phenotype' and negated <> 'True'" +sqlite3 -cmd "attach 'output/monarch-kg.db' as monarch" output/phenio.db "insert into term_association (id, subject, predicate, object, evidence_type, publication, source) select id, subject, predicate, object, has_evidence as evidence_type, publications as publication, primary_knowledge_source as source from monarch.edges where category in ('biolink:GeneToPhenotypicFeatureAssociation','biolink:DiseaseToPhenotypicFeatureAssociation') and predicate = 'biolink:has_phenotype' and negated <> 'True' and has_count <> 0 and has_percentage <> 0" echo "Compressing databases" pigz --force output/phenio.db