⚖️Create Graph Models

Bipartite graphs allow you to identify important relationships between 2 concepts within your graph. For example, when prioritizing targets you may be interested in specific relationships between a (Concept 1) and a Gene (Concept 2)

To create a bipartite graph navigate to the Foundry using the top application tool bar. Select “New Graph”

You will be required to provide a name, description, and 2 concepts from your graph.

The bipartite graph will be used to create reports that rank data points (objects) within your graph. For example, if you create a Disease to Gene bipartite graph, this will allow you to obtain a ranked list of genes associated with a specific disease. Each gene will be provided with a score that represents the amount of evidence that associates it to the disease of interest.

Lines of evidence

Evidence is criteria that you define to be important to connect the two concepts within your bipartite graph.

Create new line of evidence by specifying the following

  • Name

    • Short descriptive title that will appear within your report.

    • Example: Gene Upregulation.

  • Description

    • Longer description with additional context.

    • Example: Gene is upregulated in disease population of interest compared to healthy controls.

  • Category

    • This will be used to group your lines of evidence within your report.

    • Example: Bulk RNAseq.

  • Graph Path

    • This refers to the specific path within your knowledge graph that connects concept 1 and concept 2.

    • You can test the path to ensure that it exists within your graph. This will return some example variables.

    • Example : (Disease)-is disease contrast level-(E_Data)-in dataset-(UpRegulation)-on gene target-(Gene).

  • Modifier Concept

    • This refers to the object within your graph path what will be used to to compute the score for each line of evidence. The modifier concept must be a concept found within your graph path.

    • Example: Upregulation

  • Custom formula

    • This is optional. By default the score for each line of evidence will be computed using a harmonic sum. If you would like to override this calculation you can write a python script with a custom formula.

    • If you are using a custom formula the code must be tested for errors and saved prior to submitting the evidence

    • Example

from math import log10
result_list = []
for r in anchorArray:
    result_list.append(r['https://ontology.biobox.io/BX_000000049'] * -log10(r['https://ontology.biobox.io/BX_000000050']))
sorted_scores = sorted(result_list, key=lambda x: abs(x), reverse=True)
j = 0
sumScore = 0
for i in sorted_scores:
    j += 1
    sumScore += i/j
resulting_score = sumScore
  • Weight

    • This refers to the numerical value associated with the line of evidence. The larger the weight, the greater the importance of the line of evidence.

Updating the Graph

Once all lines of evidence have been created a workflow must be launched to compute the scores within your graph. The graph must be updated when ever new evidence is created or existing evidence is updated.

Selecting “Update Graph” will launch this workflow. While the workflow is running, you will be unable to create or update existing evidence within your bipartite graph. Once the workflow is complete you will be able to use the bipartite graph to create reports.

Last updated