Skip to content

Instantly share code, notes, and snippets.

@cmungall
Last active June 16, 2017 19:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cmungall/28b4c4d2aef7cb8fa3cb38f2c00e8c8d to your computer and use it in GitHub Desktop.
Save cmungall/28b4c4d2aef7cb8fa3cb38f2c00e8c8d to your computer and use it in GitHub Desktop.
## Type Definitions (contract)
type Drug {
id: ID!
name: String!
drugInteractions: [DrugInteraction]
drugTargets: [DrugTarger]
}
type DrugTarget {
gene: Gene!
...
}
type Gene {
id: ID!
name: String!
functions: [Function]
}
type DrugInteraction {
drug1: Drug!
drug2: Drug!
interactionType: RelationshipType!
evidence: Evidence
}
## query
# find all drug interactions for any drugs that target a gene with a particular function
{
drug
drugInteractions
drugTargets {
gene {
function(GO:0001234)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment