diff options
Diffstat (limited to 'test/uk/ac/ox/cs/pagoda/junit/JAIR_Scalability.java')
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/junit/JAIR_Scalability.java | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/test/uk/ac/ox/cs/pagoda/junit/JAIR_Scalability.java b/test/uk/ac/ox/cs/pagoda/junit/JAIR_Scalability.java new file mode 100644 index 0000000..5bd3134 --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/junit/JAIR_Scalability.java | |||
| @@ -0,0 +1,85 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | ||
| 2 | |||
| 3 | import org.junit.Test; | ||
| 4 | |||
| 5 | import uk.ac.ox.cs.pagoda.tester.PagodaTester; | ||
| 6 | |||
| 7 | public class JAIR_Scalability { | ||
| 8 | |||
| 9 | private static final String date = "_0123"; | ||
| 10 | |||
| 11 | @Test | ||
| 12 | public void reactome() { | ||
| 13 | testReactome(10, false); | ||
| 14 | } | ||
| 15 | |||
| 16 | @Test | ||
| 17 | public void chembl() { | ||
| 18 | testChEMBL(1, false); | ||
| 19 | } | ||
| 20 | |||
| 21 | @Test | ||
| 22 | public void uniprot() { | ||
| 23 | testUniProt(1, false); | ||
| 24 | } | ||
| 25 | |||
| 26 | public void testReactome(int percentage, boolean save) { | ||
| 27 | String[] args = new String[] { | ||
| 28 | PagodaTester.onto_dir + "bio2rdf/reactome/biopax-level3-processed.owl", | ||
| 29 | PagodaTester.onto_dir + "bio2rdf/reactome/graph sampling/simplifed_sample_" + percentage + ".ttl", | ||
| 30 | PagodaTester.onto_dir + "bio2rdf/reactome/queries/test.sparql" | ||
| 31 | , "reactome.ans" | ||
| 32 | }; | ||
| 33 | if (percentage == 10) | ||
| 34 | args[1] = args[1].replace("simplifed", "reactome"); | ||
| 35 | |||
| 36 | PagodaTester.main(args); | ||
| 37 | if (save) | ||
| 38 | AllTests.copy("log4j.log", "/home/yzhou/java-workspace/test-share/results_new/reactome/pagoda_" + percentage + "p" + date); | ||
| 39 | } | ||
| 40 | |||
| 41 | public void testChEMBL(int percentage, boolean save) { | ||
| 42 | String[] args = new String[] { | ||
| 43 | PagodaTester.onto_dir + "bio2rdf/chembl/cco-noDPR.ttl", | ||
| 44 | PagodaTester.onto_dir + "bio2rdf/chembl/sample_" + percentage + ".nt", | ||
| 45 | // PagodaTester.onto_dir + "bio2rdf/chembl/queries/atomic_ground.sparql" | ||
| 46 | PagodaTester.onto_dir + "bio2rdf/chembl/queries/test.sparql" | ||
| 47 | , "chembl.ans" | ||
| 48 | }; | ||
| 49 | if (percentage == 1 || percentage == 10 || percentage == 50) | ||
| 50 | args[1] = args[1].replace("chembl", "chembl/graph sampling"); | ||
| 51 | else | ||
| 52 | if (percentage == 100) | ||
| 53 | args[1] = "/home/yzhou/RDFData/ChEMBL/facts/ChEMBL.ttl"; | ||
| 54 | |||
| 55 | PagodaTester.main(args); | ||
| 56 | if (save) | ||
| 57 | AllTests.copy("log4j.log", "/home/yzhou/java-workspace/test-share/results_new/chembl/pagoda_" + percentage + "p" + date); | ||
| 58 | } | ||
| 59 | |||
| 60 | public void testUniProt(int percentage, boolean save) { | ||
| 61 | String[] args = new String[] { | ||
| 62 | PagodaTester.onto_dir + "bio2rdf/uniprot/core-sat-processed.owl", | ||
| 63 | PagodaTester.onto_dir + "bio2rdf/uniprot/sample_" + percentage + ".nt", | ||
| 64 | // PagodaTester.onto_dir + "bio2rdf/uniprot/queries/atomic_ground.sparql" | ||
| 65 | PagodaTester.onto_dir + "bio2rdf/uniprot/queries/test.sparql" | ||
| 66 | , "uniprot.ans" | ||
| 67 | }; | ||
| 68 | |||
| 69 | if (percentage == 1 || percentage == 10 || percentage == 50) | ||
| 70 | args[1] = args[1].replace("uniprot", "uniprot/graph sampling"); | ||
| 71 | else | ||
| 72 | if (percentage == 100) | ||
| 73 | args[1] = "/home/yzhou/krr-nas-share/Yujiao/ontologies/bio2rdf/uniprot/data/uniprot_cleaned.nt"; | ||
| 74 | |||
| 75 | PagodaTester.main(args); | ||
| 76 | if (save) | ||
| 77 | AllTests.copy("log4j.log", "/home/yzhou/java-workspace/test-share/results_new/uniprot/pagoda_" + percentage + "p" + date); | ||
| 78 | } | ||
| 79 | |||
| 80 | public static void main(String... args) { | ||
| 81 | PagodaTester.ShellMode = true; | ||
| 82 | new JAIR_Scalability().testUniProt(50, false); | ||
| 83 | } | ||
| 84 | |||
| 85 | } | ||
