Skip to content

Commit

Permalink
Merge pull request #601 from monarch-initiative/issue-807-limit-pheni…
Browse files Browse the repository at this point in the history
…o-db-associations

Updates phenio.db association population to gene & disease phenotype associations
  • Loading branch information
kevinschaper authored Oct 14, 2024
2 parents bc7ca71 + 3d86eb2 commit 363b0c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/load_sqlite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 363b0c1

Please sign in to comment.