Skip to content

Commit

Permalink
Merge pull request #3 from gitter-lab/tests-polishing
Browse files Browse the repository at this point in the history
Add test case to check NetBox IL2 output
  • Loading branch information
csmagnano authored Nov 8, 2019
2 parents ec6aad9 + c0b92bc commit 447a35a
Show file tree
Hide file tree
Showing 5 changed files with 142 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ script:
- unzip -q referencePathways/reactome/reactomeGraphlets.zip -d referencePathways/reactome
- cd scripts
- bash runNetBoxIL2.sh
# Compare the generated IL2 output with the reference output
- cmp ../tests/reference/il2_ranking.txt il2_ranking.txt
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# pathway-parameter-advising
# Pathway parameter advising
[![Build Status](https://travis-ci.com/gitter-lab/pathway-parameter-advising.svg?branch=master)](https://travis-ci.com/gitter-lab/pathway-parameter-advising)
Parameter advising for biological pathway creation algorithms

Version 0.10.
Parameter advising for biological pathway creation algorithms.

## Dependencies

Expand Down Expand Up @@ -32,6 +31,13 @@ Arguments:
>
> --verbose If set, will print intermediate status updates. Optional, default = False.
## Example

`scripts/runNetBoxIL2.sh` runs pathway parameter advising for the precomputed graphlet files for NetBox IL2 pathways using Reactome reference pathways.
It must be run from the `scripts` directory.
Unzip the Reactome pathway graphlets file `reactomeGraphlets.zip` before running the example script.

## Graphlet Creation

Graphlet decomposition files are created with the [Parallel Graphlet Decomposition library](http://nesreenahmed.com/graphlets/). Files are the piped output from the pgd script: `./pgd inputGraphFile >> graphletOutputFile.gOut`.
Graphlet decomposition files are created with the [Parallel Graphlet Decomposition library](http://nesreenahmed.com/graphlets/).
Files are the piped output from the pgd script: `./pgd inputGraphFile >> graphletOutputFile.gOut`.
5 changes: 2 additions & 3 deletions scripts/pathwayParameterAdvising.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import os
import argparse
import networkx as nx
import numpy as np
import sys
__version__ = 0.10
__version__ = "0.1.0"

"""
Author: Chris Magnano
Expand All @@ -16,7 +15,7 @@

def main():
#Handle command line arguments
parser = argparse.ArgumentParser(description="The pathway parameter advisor creates a ranking of pathways based on their topological distance to a set of reference pathways. Version %0.2f, released under the MIT liscense."%(__version__))
parser = argparse.ArgumentParser(description="The pathway parameter advisor creates a ranking of pathways based on their topological distance to a set of reference pathways. Version %s, released under the MIT license."%(__version__))
parser.add_argument("--genPathwayGraphlets", help="File where each line is a graphlets file of a generated pathway.",required=True)
parser.add_argument("--refPathwayGraphlets", help="File where each line is a graphlets file of a reference pathway.",required=True)
parser.add_argument("--outFile", default="parameterRanking.txt", help="File to store output in.")
Expand Down
2 changes: 1 addition & 1 deletion scripts/runNetBoxIL2.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#Example using included IL2 data to run pathway parameter advising and get data
python pathwayParameterAdvising.py --genPathwayGraphlets=../data/IL2/graphletNames.txt --refPathwayGraphlets=../referencePathways/reactomeGraphlets.txt --outFile=test --minSize=15 --outputScore --verbose
python pathwayParameterAdvising.py --genPathwayGraphlets=../data/IL2/graphletNames.txt --refPathwayGraphlets=../referencePathways/reactomeGraphlets.txt --outFile=il2_ranking.txt --minSize=15 --outputScore --verbose

127 changes: 127 additions & 0 deletions tests/reference/il2_ranking.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
Run Score
p8e-3 0.2125
p9e-3 0.2132
p1e-2 0.2133
p7e-3 0.2135
p6e-3 0.2140
p5e-3 0.2147
p2e-2 0.2149
p4e-2 0.2162
p3e-2 0.2163
p5e-2 0.2164
p6e-2 0.2171
p7e-2 0.2174
p8e-2 0.2174
p9e-2 0.2174
p3e-3 0.2199
p4e-3 0.2201
p2e-3 0.2277
p1e-3 0.2741
p9e-4 0.2802
p8e-4 0.3008
p7e-4 0.3115
p6e-4 0.3219
p5e-4 0.3434
p2e-14 0.3518
p3e-14 0.3518
p4e-4 0.3854
p3e-4 0.3954
p2e-4 0.4059
p1e-11 0.4124
p1e-12 0.4124
p1e-13 0.4124
p2e-12 0.4124
p2e-13 0.4124
p3e-12 0.4124
p3e-13 0.4124
p4e-12 0.4124
p4e-13 0.4124
p4e-14 0.4124
p5e-12 0.4124
p5e-13 0.4124
p5e-14 0.4124
p6e-12 0.4124
p6e-13 0.4124
p6e-14 0.4124
p7e-12 0.4124
p7e-13 0.4124
p7e-14 0.4124
p8e-12 0.4124
p8e-13 0.4124
p8e-14 0.4124
p9e-12 0.4124
p9e-13 0.4124
p9e-14 0.4124
p1e-4 0.4516
p9e-5 0.4573
p8e-5 0.4672
p7e-5 0.4852
p6e-5 0.4964
p1e-14 0.5187
p1e-15 0.5187
p2e-15 0.5187
p3e-15 0.5187
p4e-15 0.5187
p5e-15 0.5187
p6e-15 0.5187
p7e-15 0.5187
p8e-15 0.5187
p9e-15 0.5187
p5e-5 0.5415
p4e-5 0.5485
p3e-5 0.5496
p2e-11 0.5697
p3e-11 0.5697
p2e-5 0.5733
p1e-5 0.5898
p9e-6 0.6027
p4e-11 0.6069
p5e-11 0.6069
p6e-11 0.6069
p7e-11 0.6069
p8e-11 0.6069
p9e-11 0.6069
p8e-6 0.6207
p7e-6 0.6333
p5e-6 0.6509
p6e-6 0.6509
p3e-6 0.6581
p4e-6 0.6581
p2e-6 0.6754
p1e-6 0.7404
p1e-10 0.7533
p2e-10 0.7533
p3e-10 0.7663
p4e-10 0.7663
p5e-7 0.7677
p6e-7 0.7733
p7e-7 0.7733
p8e-7 0.7733
p9e-7 0.7765
p1e-7 0.7848
p2e-7 0.7848
p3e-7 0.7848
p4e-7 0.7848
p5e-8 0.7848
p6e-8 0.7848
p7e-8 0.7848
p8e-8 0.7848
p9e-8 0.7848
p4e-8 0.7899
p3e-9 0.8013
p4e-9 0.8013
p5e-9 0.8013
p2e-8 0.8091
p3e-8 0.8091
p1e-8 0.8147
p6e-9 0.8147
p7e-9 0.8147
p8e-9 0.8147
p9e-9 0.8147
p5e-10 0.8246
p6e-10 0.8246
p7e-10 0.8246
p1e-9 0.8252
p8e-10 0.8252
p9e-10 0.8252
p2e-9 0.8301

0 comments on commit 447a35a

Please sign in to comment.