Skip to content

Instantly share code, notes, and snippets.

View cmungall's full-sized avatar
💭
linkml hacking

Chris Mungall cmungall

💭
linkml hacking
View GitHub Profile
@cmungall
cmungall / nucleus_query.pro
Created October 23, 2018 00:10
Example of bash datalog on GO
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").
## Original Ontology
* IRI: http://purl.obolibrary.org/obo/ro.owl
* VersionIRI: http://purl.obolibrary.org/obo/ro/releases/2018-05-11/ro.owl
## New Ontology
* IRI: http://purl.obolibrary.org/obo/ro.owl
#!/usr/bin/env python3
"""
Command line wrapper to mygene for bulk operations
Type:
bulkgene -h
For instructions
Proposed schema for evolved processes. Evolved processes are either (1) the realization of a single function (2) a causally connected mereological sum of (1)s
The schema could be generalized to other processes arise from non-evolved functions such as building a house.
For simplicity this initial elucidation focuses on evolved processes (aka biological programs).
Subsubmption hierarchy (`P` = process, `C` = independent continuant, `Q` = quality)
* enabled by (aka has agent) `P->C`
* has participant `P->C`
* modifies or consumes (aka has initial participant)
fact(is_a(a,b)).
fact(is_a(b,c)).
rule((is_aT(A,B) :- is_a(A,B))).
rule((is_aT(A,B) :- is_a(A,Z),is_aT(Z,B))).
prove(Goal,[Goal]) :-
fact(Goal).
prove(Goal, [Rule|Steps]) :-
Rule = rule( (Goal :- Body) ),
## Type Definitions (contract)
type Drug {
id: ID!
name: String!
drugInteractions: [DrugInteraction]
drugTargets: [DrugTarger]
}
type DrugTarget {

Bold Hypothesis: GO BPs can be cleanly separated into cellular processes and larger processes formed from assemblages of these. Any process should be diagrammable. If the diagram is expressed using cell parts and molecules, it is cellular. If the diagram is expressed using cells or tissues it is at a larger level of organization.

Additionally, we may have grouping classes which can abstract over both branches, in terms of some objective or phenotype. Examples are: growth (to increase the size of the organism or a part), immune system

@cmungall
cmungall / README.md
Created November 30, 2015 15:09
No name

README is empty

# see thea/benchmarks directory
TIME THEA CARO 0.0697942
MEM THEA CARO 1.885792
TIME THEA CL 1.38948
MEM THEA CL 8.553492
TIME THEA FBbt 19.0624
MEM THEA FBbt 38.238024
TIME THEA GO 411.418
MEM THEA GO 381.50792
TIME THEA SO 3.1424