Created
October 23, 2018 00:10
-
-
Save cmungall/213444c1becc0d9caad5416272992236 to your computer and use it in GitHub Desktop.
Example of bash datalog on GO
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
rel(S,P,O) :~ cat relationships.tsv | |
anc(S,O) :- rel(S,_,O). | |
anc(S,O) :- anc(S,Z),anc(Z,O). | |
main(X) :- anc(X, "GO:0005634"). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The input is a TSV of S-P-O edges.
e.g.
compiling to bash yields: