test cases
diff --git a/genomix/genomix-hadoop/src/main/java/edu/uci/ics/genomix/hadoop/graphclean/mergepaths/h4/MergePathsH4.java b/genomix/genomix-hadoop/src/main/java/edu/uci/ics/genomix/hadoop/graphclean/mergepaths/h4/MergePathsH4.java
index afdb46e..2f12606 100644
--- a/genomix/genomix-hadoop/src/main/java/edu/uci/ics/genomix/hadoop/graphclean/mergepaths/h4/MergePathsH4.java
+++ b/genomix/genomix-hadoop/src/main/java/edu/uci/ics/genomix/hadoop/graphclean/mergepaths/h4/MergePathsH4.java
@@ -342,9 +342,11 @@
+ outputValue.getNode() + " current self: " + inputValue.getNode());
if (inMsg == MessageFlag.MSG_SELF) {
outPosn.set(outputValue.getNode().getNodeID());
- } else { // MSG_UPDATE_MERGE
+ } else if (inMsg == MessageFlag.MSG_UPDATE_MERGE) {
// merge messages are sent to their merge recipient
outPosn.set(outputValue.getNode().getListFromDir(inMsg).getPosition(0));
+ } else {
+ throw new IOException("Unrecongized MessageFlag MSG: " + inMsg);
}
outputValue.set(inFlag, inputValue.getNode());
sawCurNode = true;
@@ -392,6 +394,7 @@
private int mergeMsgsCount;
public void configure(JobConf conf) {
+ mos = new MultipleOutputs(conf);
KMER_SIZE = conf.getInt("sizeKmer", 0);
inputValue = new NodeWithFlagWritable(KMER_SIZE);
outputValue = new NodeWithFlagWritable(KMER_SIZE);
@@ -500,6 +503,9 @@
// step 2: process merges
FileInputFormat.addInputPaths(conf, outputUpdatesTmp);
+ for (Path out : FileInputFormat.getInputPaths(conf)) {
+ System.out.println(out);
+ }
Path outputMergeTmp = new Path("h4.mergeProcessed." + new Random().nextDouble() + ".tmp"); // random filename
FileOutputFormat.setOutputPath(conf, outputMergeTmp);
MultipleOutputs.addNamedOutput(conf, H4MergeReducer.TO_UPDATE_OUTPUT, MergePathMultiSeqOutputFormat.class,
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 058271e..7a65d59 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
@@ -16,7 +16,7 @@
@SuppressWarnings("deprecation")
public class TestPathMergeH3 extends GenomixMiniClusterTest {
- protected String LOCAL_SEQUENCE_FILE = "src/test/resources/data/sequence/fr_test2.txt";
+ protected String LOCAL_SEQUENCE_FILE = "src/test/resources/data/sequence/bubble_test1.txt";
protected String HDFS_SEQUENCE = "/00-sequence/";
protected String HDFS_GRAPHBUILD = "/01-graphbuild/";
protected String HDFS_MARKPATHS = "/02-pathmark/";
@@ -71,7 +71,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_UNMERGED_GRAPH, true);
+ driver.runJob(new GenomixJobConf(buildConf), Plan.BUILD_DEBRUJIN_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 126e7a5..249af29 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
@@ -37,8 +37,8 @@
@Test
public void testTwoReads() throws Exception {
setupTestConf(5, 8, false, "tworeads.txt");
- testPathNode();
-// testMergeOneIteration();
+// testPathNode();
+ testMergeOneIteration();
// testMergeToCompletion();
}
@@ -90,9 +90,9 @@
if (regenerateGraph) {
copyLocalToDFS(LOCAL_SEQUENCE_FILE, SEQUENCE);
buildGraph();
- copyLocalToDFS(ACTUAL_ROOT + GRAPHBUILD + ".bindir", GRAPHBUILD);
+ copyLocalToDFS(ACTUAL_ROOT + GRAPHBUILD + readsFile + ".binmerge", GRAPHBUILD);
} else {
- copyLocalToDFS(EXPECTED_ROOT + GRAPHBUILD + ".bindir", GRAPHBUILD);
+ copyLocalToDFS(EXPECTED_ROOT + GRAPHBUILD + readsFile + ".binmerge", GRAPHBUILD);
}
}
}