From 9e9531c8d55513b04321403768112d2ec8ea7dfd Mon Sep 17 00:00:00 2001 From: Anthony Gitter Date: Mon, 4 Nov 2019 17:18:31 -0600 Subject: [PATCH 1/6] Add expected output for IL2 example --- tests/reference/il2_ranking.txt | 127 ++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 tests/reference/il2_ranking.txt diff --git a/tests/reference/il2_ranking.txt b/tests/reference/il2_ranking.txt new file mode 100644 index 0000000..c46c5a9 --- /dev/null +++ b/tests/reference/il2_ranking.txt @@ -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 From f793a735ffc59a6057c4adeb70baf1a4382a9f1f Mon Sep 17 00:00:00 2001 From: Anthony Gitter Date: Mon, 4 Nov 2019 17:23:35 -0600 Subject: [PATCH 2/6] Compare the generated IL2 output with the reference output --- .travis.yml | 2 ++ scripts/runNetBoxIL2.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ca2bf43..911ebc7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/scripts/runNetBoxIL2.sh b/scripts/runNetBoxIL2.sh index 6445e83..3e143b3 100644 --- a/scripts/runNetBoxIL2.sh +++ b/scripts/runNetBoxIL2.sh @@ -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 From 2dc2568ec73daeb055fd9f5e1b6bb9a1b573cfc0 Mon Sep 17 00:00:00 2001 From: Anthony Gitter Date: Mon, 4 Nov 2019 20:30:10 -0600 Subject: [PATCH 3/6] Confirm test fails when files do not match --- tests/reference/il2_ranking.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/reference/il2_ranking.txt b/tests/reference/il2_ranking.txt index c46c5a9..cd2fc71 100644 --- a/tests/reference/il2_ranking.txt +++ b/tests/reference/il2_ranking.txt @@ -123,5 +123,5 @@ p6e-10 0.8246 p7e-10 0.8246 p1e-9 0.8252 p8e-10 0.8252 -p9e-10 0.8252 p2e-9 0.8301 +p9e-10 0.8252 From 423af99467a2c8b84037390ad4f99fbe0e4ff586 Mon Sep 17 00:00:00 2001 From: Anthony Gitter Date: Mon, 4 Nov 2019 20:34:54 -0600 Subject: [PATCH 4/6] Revert "Confirm test fails when files do not match" This reverts commit 2dc2568ec73daeb055fd9f5e1b6bb9a1b573cfc0. --- tests/reference/il2_ranking.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/reference/il2_ranking.txt b/tests/reference/il2_ranking.txt index cd2fc71..c46c5a9 100644 --- a/tests/reference/il2_ranking.txt +++ b/tests/reference/il2_ranking.txt @@ -123,5 +123,5 @@ p6e-10 0.8246 p7e-10 0.8246 p1e-9 0.8252 p8e-10 0.8252 -p2e-9 0.8301 p9e-10 0.8252 +p2e-9 0.8301 From 0213e1aad0b5ac26d2e8bda1173e7186d2c1875e Mon Sep 17 00:00:00 2001 From: Anthony Gitter Date: Mon, 4 Nov 2019 20:41:57 -0600 Subject: [PATCH 5/6] Update version formatting --- scripts/pathwayParameterAdvising.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/pathwayParameterAdvising.py b/scripts/pathwayParameterAdvising.py index 1c728d5..141c587 100755 --- a/scripts/pathwayParameterAdvising.py +++ b/scripts/pathwayParameterAdvising.py @@ -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 @@ -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.") From c0b92bcf924b8654fd10428b7cdb3dc830636986 Mon Sep 17 00:00:00 2001 From: Anthony Gitter Date: Mon, 4 Nov 2019 20:48:54 -0600 Subject: [PATCH 6/6] Update readme Remove version number Describe example script --- README.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 556a613..84a09c7 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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`. \ No newline at end of file +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`.