more test cases
diff --git a/genomix/genomix-hadoop/src/test/java/edu/uci/ics/genomix/hadoop/graphclean/mergepaths/h3/TestPathMergeH3.java b/genomix/genomix-hadoop/src/test/java/edu/uci/ics/genomix/hadoop/graphclean/mergepaths/h3/TestPathMergeH3.java
index 7a65d59..d2f37bc 100644
--- a/genomix/genomix-hadoop/src/test/java/edu/uci/ics/genomix/hadoop/graphclean/mergepaths/h3/TestPathMergeH3.java
+++ b/genomix/genomix-hadoop/src/test/java/edu/uci/ics/genomix/hadoop/graphclean/mergepaths/h3/TestPathMergeH3.java
@@ -37,9 +37,47 @@
@Test
public void TestBuildGraph() throws Exception {
+ LOCAL_SEQUENCE_FILE = "src/test/resources/data/sequence/bubble_test1.txt";
+ GRAPHBUILD_FILE = "bubble_test1.txt";
cleanUpOutput();
copyLocalToDFS(LOCAL_SEQUENCE_FILE, HDFS_SEQUENCE);
buildGraph();
+
+ LOCAL_SEQUENCE_FILE = "src/test/resources/data/sequence/fr_test.txt";
+ GRAPHBUILD_FILE = "fr_test.txt";
+ cleanUpOutput();
+ copyLocalToDFS(LOCAL_SEQUENCE_FILE, HDFS_SEQUENCE);
+ buildGraph();
+
+ LOCAL_SEQUENCE_FILE = "src/test/resources/data/sequence/fr_test2.txt";
+ GRAPHBUILD_FILE = "fr_test2.txt";
+ cleanUpOutput();
+ copyLocalToDFS(LOCAL_SEQUENCE_FILE, HDFS_SEQUENCE);
+ buildGraph();
+
+ LOCAL_SEQUENCE_FILE = "src/test/resources/data/sequence/rf_test.txt";
+ GRAPHBUILD_FILE = "rf_test.txt";
+ cleanUpOutput();
+ copyLocalToDFS(LOCAL_SEQUENCE_FILE, HDFS_SEQUENCE);
+ buildGraph();
+
+ LOCAL_SEQUENCE_FILE = "src/test/resources/data/sequence/singleread.txt";
+ GRAPHBUILD_FILE = "single_read.txt";
+ cleanUpOutput();
+ copyLocalToDFS(LOCAL_SEQUENCE_FILE, HDFS_SEQUENCE);
+ buildGraph();
+
+ LOCAL_SEQUENCE_FILE = "src/test/resources/data/sequence/text.txt";
+ GRAPHBUILD_FILE = "text.txt";
+ cleanUpOutput();
+ copyLocalToDFS(LOCAL_SEQUENCE_FILE, HDFS_SEQUENCE);
+ buildGraph();
+
+ LOCAL_SEQUENCE_FILE = "src/test/resources/data/sequence/tworeads.txt";
+ GRAPHBUILD_FILE = "tworeads.txt";
+ cleanUpOutput();
+ copyLocalToDFS(LOCAL_SEQUENCE_FILE, HDFS_SEQUENCE);
+ buildGraph();
}
// @Test
@@ -71,7 +109,7 @@
FileOutputFormat.setOutputPath(buildConf, new Path(HDFS_GRAPHBUILD));
buildConf.set(GenomixJobConf.OUTPUT_FORMAT, GenomixJobConf.OUTPUT_FORMAT_BINARY);
buildConf.set(GenomixJobConf.GROUPBY_TYPE, GenomixJobConf.GROUPBY_TYPE_PRECLUSTER);
- driver.runJob(new GenomixJobConf(buildConf), Plan.BUILD_DEBRUJIN_GRAPH, true);
+ driver.runJob(new GenomixJobConf(buildConf), Plan.BUILD_UNMERGED_GRAPH, true);
String fileFormat = buildConf.get(GenomixJobConf.OUTPUT_FORMAT);
boolean resultsAreText = GenomixJobConf.OUTPUT_FORMAT_TEXT.equalsIgnoreCase(fileFormat);
copyResultsToLocal(HDFS_GRAPHBUILD, ACTUAL_ROOT + GRAPHBUILD_FILE, resultsAreText, buildConf);
diff --git a/genomix/genomix-hadoop/src/test/java/edu/uci/ics/genomix/hadoop/graphclean/mergepaths/h4/TestPathMergeH4.java b/genomix/genomix-hadoop/src/test/java/edu/uci/ics/genomix/hadoop/graphclean/mergepaths/h4/TestPathMergeH4.java
index 249af29..2836981 100644
--- a/genomix/genomix-hadoop/src/test/java/edu/uci/ics/genomix/hadoop/graphclean/mergepaths/h4/TestPathMergeH4.java
+++ b/genomix/genomix-hadoop/src/test/java/edu/uci/ics/genomix/hadoop/graphclean/mergepaths/h4/TestPathMergeH4.java
@@ -36,7 +36,7 @@
@Test
public void testTwoReads() throws Exception {
- setupTestConf(5, 8, false, "tworeads.txt");
+ setupTestConf(5, 8, true, "tworeads.txt");
// testPathNode();
testMergeOneIteration();
// testMergeToCompletion();
diff --git a/genomix/genomix-hadoop/src/test/java/edu/uci/ics/genomix/hadoop/pmcommon/GenomixMiniClusterTest.java b/genomix/genomix-hadoop/src/test/java/edu/uci/ics/genomix/hadoop/pmcommon/GenomixMiniClusterTest.java
index 1f4a2d2..e906c7a 100644
--- a/genomix/genomix-hadoop/src/test/java/edu/uci/ics/genomix/hadoop/pmcommon/GenomixMiniClusterTest.java
+++ b/genomix/genomix-hadoop/src/test/java/edu/uci/ics/genomix/hadoop/pmcommon/GenomixMiniClusterTest.java
@@ -163,11 +163,11 @@
* Remove the local "actual" folder and any hdfs folders in use by this test
*/
public void cleanUpOutput() throws IOException {
- // local cleanup
- FileSystem lfs = FileSystem.getLocal(new Configuration());
- if (lfs.exists(new Path(ACTUAL_ROOT))) {
- lfs.delete(new Path(ACTUAL_ROOT), true);
- }
+// // local cleanup
+// FileSystem lfs = FileSystem.getLocal(new Configuration());
+// if (lfs.exists(new Path(ACTUAL_ROOT))) {
+// lfs.delete(new Path(ACTUAL_ROOT), true);
+// }
// dfs cleanup
for (String path : HDFS_PATHS) {
if (dfs.exists(new Path(path))) {
diff --git a/genomix/genomix-hadoop/src/test/python/convert_graphviz.py b/genomix/genomix-hadoop/src/test/python/convert_graphviz.py
index abd38ce..f5d5cd1 100644
--- a/genomix/genomix-hadoop/src/test/python/convert_graphviz.py
+++ b/genomix/genomix-hadoop/src/test/python/convert_graphviz.py
@@ -52,8 +52,8 @@
FF_kmer = '<TR><TD BGCOLOR="%s">%s</TD></TR>' % (edge_colors['FF'], kmer) if kmers else ''
RR_kmer = '<TR><TD BGCOLOR="%s">%s</TD></TR>' % (edge_colors['RR'], reverse_complement(kmer)) if kmers else ''
node_label = r'''<<FONT POINT-SIZE="10"><TABLE ALIGN="CENTER" BORDER="0" CELLBORDER="0" CELLSPACING="0">
- {FF_kmer}
<TR><TD>{nodeid}{flag}</TD></TR>
+ {FF_kmer}
{RR_kmer}
</TABLE></FONT>>'''.format(**locals())
node = pydot.Node(nodeid, rank=readid, group=readid, label=node_label)