aboutsummaryrefslogtreecommitdiff
path: root/test/uk/ac/ox/cs/pagoda/junit/JAIR_Scalability.java
blob: 5e2b1d78fc0aa4cf0ba289e340acb647ddd55523 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
package uk.ac.ox.cs.pagoda.junit;

import org.junit.Test;

import uk.ac.ox.cs.pagoda.tester.PagodaTester;
import uk.ac.ox.cs.pagoda.util.Properties;

public class JAIR_Scalability {
	
	private static final String date = "_0123"; 

	@Test
	public void reactome() {
		testReactome(10, false);
	}
	
	@Test
	public void chembl() {
		testChEMBL(1, false);
	}

	@Test
	public void uniprot() {
		testUniProt(1, false);
	}

	public void testReactome(int percentage, boolean save) {
		String[] args = new String[] {
				PagodaTester.onto_dir + "bio2rdf/reactome/biopax-level3-processed.owl", 
				PagodaTester.onto_dir + "bio2rdf/reactome/graph sampling/simplifed_sample_" + percentage + ".ttl", 
				PagodaTester.onto_dir + "bio2rdf/reactome/queries/test.sparql"
				, "reactome.ans"
		}; 
		if (percentage == 10)
			args[1] = args[1].replace("simplifed", "reactome");
		
		PagodaTester.main(args); 
		if (save)
			AllTests.copy("log4j.log", "/home/yzhou/java-workspace/test-share/results_new/reactome/pagoda_" + percentage + "p" + date); 
	}
	
	public void testChEMBL(int percentage, boolean save) {
		String[] args = new String[] {
				PagodaTester.onto_dir + "bio2rdf/chembl/cco-noDPR.ttl", 
				PagodaTester.onto_dir + "bio2rdf/chembl/sample_" + percentage + ".nt",
//				PagodaTester.onto_dir + "bio2rdf/chembl/queries/atomic_ground.sparql"
				PagodaTester.onto_dir + "bio2rdf/chembl/queries/test.sparql"
				, "chembl.ans"
		}; 
		if (percentage == 1 || percentage == 10 || percentage == 50)
			args[1] = args[1].replace("chembl", "chembl/graph sampling");
		else 
			if (percentage == 100)
				args[1] = "/home/yzhou/RDFData/ChEMBL/facts/ChEMBL.ttl"; 
		
		PagodaTester.main(args);
		if (save)
		AllTests.copy("log4j.log", "/home/yzhou/java-workspace/test-share/results_new/chembl/pagoda_" + percentage + "p" + date); 
	}
	
	public void testUniProt(int percentage, boolean save) {
		String[] args = new String[] {
				PagodaTester.onto_dir + "bio2rdf/uniprot/core-sat-processed.owl", 
				PagodaTester.onto_dir + "bio2rdf/uniprot/sample_" + percentage + ".nt",
//				PagodaTester.onto_dir + "bio2rdf/uniprot/queries/atomic_ground.sparql"
				PagodaTester.onto_dir + "bio2rdf/uniprot/queries/test.sparql"
				, "uniprot.ans"
		}; 
		
		if (percentage == 1 || percentage == 10 || percentage == 50)
			args[1] = args[1].replace("uniprot", "uniprot/graph sampling");
		else 
			if (percentage == 100)
				args[1] = "/home/yzhou/krr-nas-share/Yujiao/ontologies/bio2rdf/uniprot/data/uniprot_cleaned.nt"; 
		
		PagodaTester.main(args); 
		if (save)
			AllTests.copy("log4j.log", "/home/yzhou/java-workspace/test-share/results_new/uniprot/pagoda_" + percentage + "p" + date); 
	}
	
	public static void main(String... args) {
		Properties.ShellModeDefault = true; 
		new JAIR_Scalability().testUniProt(50, false);
	}

}