add testcase for pathmerge
diff --git a/genomix/genomix-hadoop/data/webmap/PathMerge_TestSet/head_6/6 b/genomix/genomix-hadoop/data/webmap/PathMerge_TestSet/head_6/6
new file mode 100644
index 0000000..be614fb
--- /dev/null
+++ b/genomix/genomix-hadoop/data/webmap/PathMerge_TestSet/head_6/6
@@ -0,0 +1,2 @@
+1 AATAGAAC
+2 CATAGAAG
diff --git a/genomix/genomix-hadoop/src/test/java/edu/uci/ics/genomix/hadoop/contrailgraphbuilding/GraphBuildingTestSuite.java b/genomix/genomix-hadoop/src/test/java/edu/uci/ics/genomix/hadoop/contrailgraphbuilding/GraphBuildingTestSuite.java
index 4e5cdd0..00b29fd 100644
--- a/genomix/genomix-hadoop/src/test/java/edu/uci/ics/genomix/hadoop/contrailgraphbuilding/GraphBuildingTestSuite.java
+++ b/genomix/genomix-hadoop/src/test/java/edu/uci/ics/genomix/hadoop/contrailgraphbuilding/GraphBuildingTestSuite.java
@@ -22,9 +22,9 @@
public class GraphBuildingTestSuite extends TestSuite{
private static int SIZE_KMER = 3;
- public static final String PreFix = "data/webmap/Scaffolding_TestSet";
+ public static final String PreFix = "data/webmap/PathMerge_TestSet";
public static final String[] TestDir = { PreFix + File.separator
- + "PairedEnd"};
+ + "head_6"};
// + "2", PreFix + File.separator
// + "3", PreFix + File.separator
// + "4", PreFix + File.separator
diff --git a/genomix/genomix-pregelix/data/TestSet/PathMerge/head_6/bin/.part-00000.crc b/genomix/genomix-pregelix/data/TestSet/PathMerge/head_6/bin/.part-00000.crc
new file mode 100644
index 0000000..13aef38
--- /dev/null
+++ b/genomix/genomix-pregelix/data/TestSet/PathMerge/head_6/bin/.part-00000.crc
Binary files differ
diff --git a/genomix/genomix-pregelix/data/TestSet/PathMerge/head_6/bin/part-00000 b/genomix/genomix-pregelix/data/TestSet/PathMerge/head_6/bin/part-00000
new file mode 100755
index 0000000..74b94a2
--- /dev/null
+++ b/genomix/genomix-pregelix/data/TestSet/PathMerge/head_6/bin/part-00000
Binary files differ
diff --git a/genomix/genomix-pregelix/data/TestSet/PathMerge/head_6/graphviz/result.ps b/genomix/genomix-pregelix/data/TestSet/PathMerge/head_6/graphviz/result.ps
new file mode 100644
index 0000000..6da55ef
--- /dev/null
+++ b/genomix/genomix-pregelix/data/TestSet/PathMerge/head_6/graphviz/result.ps
@@ -0,0 +1,849 @@
+%!PS-Adobe-3.0
+%%Creator: graphviz version 2.26.3 (20100126.1600)
+%%Title: G
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+ dup dup findfont dup length dict begin
+ { 1 index /FID ne { def }{ pop pop } ifelse
+ } forall
+ /Encoding EncodingVector def
+ currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+ dup 1 exch div /InvScaleFactor exch def
+ scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage { % i j npages
+ /npages exch def
+ /j exch def
+ /i exch def
+ /str 10 string def
+ npages 1 gt {
+ gsave
+ coordfont setfont
+ 0 0 moveto
+ (\() show i str cvs show (,) show j str cvs show (\)) show
+ grestore
+ } if
+} bind def
+
+/set_font {
+ findfont exch
+ scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext { % width text
+ /text exch def
+ /width exch def
+ gsave
+ width 0 gt {
+ [] 0 setdash
+ text stringwidth pop width exch sub text length div 0 text ashow
+ } if
+ grestore
+} def
+
+/boxprim { % xcorner ycorner xsize ysize
+ 4 2 roll
+ moveto
+ 2 copy
+ exch 0 rlineto
+ 0 exch rlineto
+ pop neg 0 rlineto
+ closepath
+} bind def
+
+/ellipse_path {
+ /ry exch def
+ /rx exch def
+ /y exch def
+ /x exch def
+ matrix currentmatrix
+ newpath
+ x y translate
+ rx ry scale
+ 0 0 1 0 360 arc
+ setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+ [ % layer color sequence - darkest to lightest
+ [0 0 0]
+ [.2 .8 .8]
+ [.4 .8 .8]
+ [.6 .8 .8]
+ [.8 .8 .8]
+ ]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+ layercolorseq curlayer 1 sub layerlen mod get
+ aload pop sethsbcolor
+ /nodecolor {nopcolor} def
+ /edgecolor {nopcolor} def
+ /graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+ /myupper exch def
+ /mylower exch def
+ curlayer mylower lt
+ curlayer myupper gt
+ or
+ {invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+ userdict (<<) cvn ([) cvn load put
+ userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 708 453
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 672 417 boxprim clip newpath
+1 1 set_scale 0 rotate 40 41 translate
+% GAA
+gsave
+1 setlinewidth
+0 0 0 nodecolor
+newpath 0 197 moveto
+0 301 lineto
+56 301 lineto
+56 197 lineto
+closepath stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+12 284.4 moveto 32 (GAA) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 0 275 moveto
+56 275 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+14 258.4 moveto 28 (5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 0 249 moveto
+56 249 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+8 232.4 moveto 40 (~5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 0 223 moveto
+56 223 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+16.5 206.4 moveto 23 (2.0) alignedtext
+grestore
+% AAG
+gsave
+1 setlinewidth
+0 0 0 nodecolor
+newpath 154 305 moveto
+154 409 lineto
+210 409 lineto
+210 305 lineto
+closepath stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+166 392.4 moveto 32 (AAG) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 154 383 moveto
+210 383 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+168 366.4 moveto 28 (5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 154 357 moveto
+210 357 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+162 340.4 moveto 40 (~5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 154 331 moveto
+210 331 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+170.5 314.4 moveto 23 (1.0) alignedtext
+grestore
+% GAA->AAG
+gsave
+1 setlinewidth
+0 0 0 edgecolor
+newpath 47.76 301.32 moveto
+54.46 313.25 63.1 324.81 74 333 curveto
+93.89 347.94 121.29 353.9 143.51 356.15 curveto
+stroke
+0 0 0 edgecolor
+newpath 143.39 359.65 moveto
+153.63 356.96 lineto
+143.94 352.68 lineto
+closepath fill
+1 setlinewidth
+solid
+0 0 0 edgecolor
+newpath 143.39 359.65 moveto
+153.63 356.96 lineto
+143.94 352.68 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+82.5 360.4 moveto 45 (FF: [2]) alignedtext
+grestore
+% AAC
+gsave
+1 setlinewidth
+0 0 0 nodecolor
+newpath 154 183 moveto
+154 287 lineto
+210 287 lineto
+210 183 lineto
+closepath stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+166.5 270.4 moveto 31 (AAC) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 154 261 moveto
+210 261 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+168 244.4 moveto 28 (5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 154 235 moveto
+210 235 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+162 218.4 moveto 40 (~5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 154 209 moveto
+210 209 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+170.5 192.4 moveto 23 (1.0) alignedtext
+grestore
+% GAA->AAC
+gsave
+1 setlinewidth
+0 0 0 edgecolor
+newpath 56.13 250.77 moveto
+78.01 251.67 109.09 251.86 136 248 curveto
+138.52 247.64 141.09 247.18 143.67 246.65 curveto
+stroke
+0 0 0 edgecolor
+newpath 144.62 250.02 moveto
+153.54 244.31 lineto
+143.01 243.21 lineto
+closepath fill
+1 setlinewidth
+solid
+0 0 0 edgecolor
+newpath 144.62 250.02 moveto
+153.54 244.31 lineto
+143.01 243.21 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+82.5 256.4 moveto 45 (FF: [1]) alignedtext
+grestore
+% AGA
+gsave
+1 setlinewidth
+0 0 0 nodecolor
+newpath 154 61 moveto
+154 165 lineto
+210 165 lineto
+210 61 lineto
+closepath stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+166.5 148.4 moveto 31 (AGA) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 154 139 moveto
+210 139 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+168 122.4 moveto 28 (5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 154 113 moveto
+210 113 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+162 96.4 moveto 40 (~5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 154 87 moveto
+210 87 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+170.5 70.4 moveto 23 (2.0) alignedtext
+grestore
+% GAA->AGA
+gsave
+1 setlinewidth
+0 1 1 edgecolor
+newpath 56.15 217.33 moveto
+61.87 211.38 67.99 205.35 74 200 curveto
+99.62 177.18 109.39 175.66 136 154 curveto
+139.27 151.34 142.62 148.53 145.95 145.68 curveto
+stroke
+0 1 1 edgecolor
+newpath 148.38 148.2 moveto
+153.64 138.99 lineto
+143.79 142.91 lineto
+closepath fill
+1 setlinewidth
+solid
+0 1 1 edgecolor
+newpath 148.38 148.2 moveto
+153.64 138.99 lineto
+143.79 142.91 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+74.5 205.4 moveto 61 (RR: [1,2]) alignedtext
+grestore
+% AAG->GAA
+gsave
+1 setlinewidth
+0 1 1 edgecolor
+newpath 153.88 326.56 moveto
+148.2 321.1 142.1 315.67 136 311 curveto
+123.68 301.57 91.21 283.21 65.06 268.91 curveto
+stroke
+0 1 1 edgecolor
+newpath 66.58 265.75 moveto
+56.12 264.04 lineto
+63.23 271.9 lineto
+closepath fill
+1 setlinewidth
+solid
+0 1 1 edgecolor
+newpath 66.58 265.75 moveto
+56.12 264.04 lineto
+63.23 271.9 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+81 316.4 moveto 48 (RR: [2]) alignedtext
+grestore
+% AAC->GAA
+gsave
+1 setlinewidth
+0 1 1 edgecolor
+newpath 153.67 227.86 moveto
+131.67 223.45 100.55 219.73 74 226 curveto
+71.32 226.63 68.62 227.45 65.95 228.39 curveto
+stroke
+0 1 1 edgecolor
+newpath 64.37 225.25 moveto
+56.43 232.26 lineto
+67.01 231.73 lineto
+closepath fill
+1 setlinewidth
+solid
+0 1 1 edgecolor
+newpath 64.37 225.25 moveto
+56.43 232.26 lineto
+67.01 231.73 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+81 231.4 moveto 48 (RR: [1]) alignedtext
+grestore
+% AGA->GAA
+gsave
+1 setlinewidth
+0 0 0 edgecolor
+newpath 153.63 110.79 moveto
+129.83 110.47 96.26 113.81 74 132 curveto
+57 145.89 46.26 166.92 39.48 187.35 curveto
+stroke
+0 0 0 edgecolor
+newpath 36.12 186.39 moveto
+36.55 196.97 lineto
+42.81 188.42 lineto
+closepath fill
+1 setlinewidth
+solid
+0 0 0 edgecolor
+newpath 36.12 186.39 moveto
+36.55 196.97 lineto
+42.81 188.42 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+76 137.4 moveto 58 (FF: [1,2]) alignedtext
+grestore
+% CTA
+gsave
+1 setlinewidth
+0 0 0 nodecolor
+newpath 306 61 moveto
+306 165 lineto
+362 165 lineto
+362 61 lineto
+closepath stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+320 148.4 moveto 28 (CTA) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 306 139 moveto
+362 139 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+320 122.4 moveto 28 (5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 306 113 moveto
+362 113 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+314 96.4 moveto 40 (~5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 306 87 moveto
+362 87 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+322.5 70.4 moveto 23 (2.0) alignedtext
+grestore
+% AGA->CTA
+gsave
+1 setlinewidth
+0.33333 1 1 edgecolor
+newpath 210.23 113 moveto
+234.34 113 269.22 113 295.81 113 curveto
+stroke
+0.33333 1 1 edgecolor
+newpath 295.92 116.5 moveto
+305.92 113 lineto
+295.92 109.5 lineto
+closepath fill
+1 setlinewidth
+solid
+0.33333 1 1 edgecolor
+newpath 295.92 116.5 moveto
+305.92 113 lineto
+295.92 109.5 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+228 118.4 moveto 60 (RF: [1,2]) alignedtext
+grestore
+% CTA->AGA
+gsave
+1 setlinewidth
+0.33333 1 1 edgecolor
+newpath 305.51 96.99 moveto
+299.87 94.51 293.87 92.33 288 91 curveto
+261.99 85.1 254.01 85.1 228 91 curveto
+225.34 91.6 222.65 92.38 219.99 93.28 curveto
+stroke
+0.33333 1 1 edgecolor
+newpath 218.53 90.09 moveto
+210.49 96.99 lineto
+221.08 96.61 lineto
+closepath fill
+1 setlinewidth
+solid
+0.33333 1 1 edgecolor
+newpath 218.53 90.09 moveto
+210.49 96.99 lineto
+221.08 96.61 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+228 96.4 moveto 60 (RF: [1,2]) alignedtext
+grestore
+% ATA
+gsave
+1 setlinewidth
+0 0 0 nodecolor
+newpath 458 61 moveto
+458 165 lineto
+514 165 lineto
+514 61 lineto
+closepath stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+472 148.4 moveto 28 (ATA) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 458 139 moveto
+514 139 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+472 122.4 moveto 28 (5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 458 113 moveto
+514 113 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+466 96.4 moveto 40 (~5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 458 87 moveto
+514 87 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+474.5 70.4 moveto 23 (2.0) alignedtext
+grestore
+% CTA->ATA
+gsave
+1 setlinewidth
+0.66667 1 1 edgecolor
+newpath 362.23 113 moveto
+386.34 113 421.22 113 447.81 113 curveto
+stroke
+0.66667 1 1 edgecolor
+newpath 447.92 116.5 moveto
+457.92 113 lineto
+447.92 109.5 lineto
+closepath fill
+1 setlinewidth
+solid
+0.66667 1 1 edgecolor
+newpath 447.92 116.5 moveto
+457.92 113 lineto
+447.92 109.5 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+380 118.4 moveto 60 (FR: [1,2]) alignedtext
+grestore
+% ATA->CTA
+gsave
+1 setlinewidth
+0.66667 1 1 edgecolor
+newpath 457.83 99.35 moveto
+452.06 97.13 445.93 95.18 440 94 curveto
+413.84 88.81 406.16 88.81 380 94 curveto
+377.31 94.53 374.58 95.23 371.87 96.03 curveto
+stroke
+0.66667 1 1 edgecolor
+newpath 370.5 92.8 moveto
+362.17 99.35 lineto
+372.76 99.42 lineto
+closepath fill
+1 setlinewidth
+solid
+0.66667 1 1 edgecolor
+newpath 370.5 92.8 moveto
+362.17 99.35 lineto
+372.76 99.42 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+380 99.4 moveto 60 (FR: [1,2]) alignedtext
+grestore
+% ATG
+gsave
+0 0 0.75294 nodecolor
+newpath 598.5 122 moveto
+598.5 226 lineto
+663.5 226 lineto
+663.5 122 lineto
+closepath fill
+1 setlinewidth
+filled
+0 0 0 nodecolor
+newpath 598.5 122 moveto
+598.5 226 lineto
+663.5 226 lineto
+663.5 122 lineto
+closepath stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+616 209.4 moveto 30 (ATG) alignedtext
+1 setlinewidth
+filled
+0 0 0 nodecolor
+newpath 598.5 200 moveto
+663.5 200 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+617 183.4 moveto 28 (5':[]) alignedtext
+1 setlinewidth
+filled
+0 0 0 nodecolor
+newpath 598.5 174 moveto
+663.5 174 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+606.5 157.4 moveto 49 (~5':[2]) alignedtext
+1 setlinewidth
+filled
+0 0 0 nodecolor
+newpath 598.5 148 moveto
+663.5 148 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+619.5 131.4 moveto 23 (1.0) alignedtext
+grestore
+% ATA->ATG
+gsave
+1 setlinewidth
+0.33333 1 1 edgecolor
+newpath 514.07 141.25 moveto
+519.66 145.72 525.75 149.88 532 153 curveto
+549.43 161.69 570.33 166.79 588.43 169.78 curveto
+stroke
+0.33333 1 1 edgecolor
+newpath 588.02 173.26 moveto
+598.43 171.27 lineto
+589.06 166.34 lineto
+closepath fill
+1 setlinewidth
+solid
+0.33333 1 1 edgecolor
+newpath 588.02 173.26 moveto
+598.43 171.27 lineto
+589.06 166.34 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+533 173.4 moveto 46 (RF: [2]) alignedtext
+grestore
+% AAT
+gsave
+0 0 0.75294 nodecolor
+newpath 603 0 moveto
+603 104 lineto
+659 104 lineto
+659 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0 0 0 nodecolor
+newpath 603 0 moveto
+603 104 lineto
+659 104 lineto
+659 0 lineto
+closepath stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+616.5 87.4 moveto 29 (AAT) alignedtext
+1 setlinewidth
+filled
+0 0 0 nodecolor
+newpath 603 78 moveto
+659 78 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+612.5 61.4 moveto 37 (5':[1]) alignedtext
+1 setlinewidth
+filled
+0 0 0 nodecolor
+newpath 603 52 moveto
+659 52 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+611 35.4 moveto 40 (~5':[]) alignedtext
+1 setlinewidth
+filled
+0 0 0 nodecolor
+newpath 603 26 moveto
+659 26 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+619.5 9.4 moveto 23 (1.0) alignedtext
+grestore
+% ATA->AAT
+gsave
+1 setlinewidth
+0 1 1 edgecolor
+newpath 514.3 101.09 moveto
+536.86 91.6 568.64 78.23 593.34 67.84 curveto
+stroke
+0 1 1 edgecolor
+newpath 594.91 70.98 moveto
+602.77 63.88 lineto
+592.19 64.53 lineto
+closepath fill
+1 setlinewidth
+solid
+0 1 1 edgecolor
+newpath 594.91 70.98 moveto
+602.77 63.88 lineto
+592.19 64.53 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+532 99.4 moveto 48 (RR: [1]) alignedtext
+grestore
+% ATG->ATA
+gsave
+1 setlinewidth
+0.33333 1 1 edgecolor
+newpath 598.41 142.45 moveto
+592.61 138.07 586.38 134.04 580 131 curveto
+562.7 122.75 541.9 118.28 524.27 115.86 curveto
+stroke
+0.33333 1 1 edgecolor
+newpath 524.66 112.38 moveto
+514.31 114.66 lineto
+523.82 119.33 lineto
+closepath fill
+1 setlinewidth
+solid
+0.33333 1 1 edgecolor
+newpath 524.66 112.38 moveto
+514.31 114.66 lineto
+523.82 119.33 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+533 136.4 moveto 46 (RF: [2]) alignedtext
+grestore
+% AAT->ATA
+gsave
+1 setlinewidth
+0 0 0 edgecolor
+newpath 602.58 45.52 moveto
+581.91 42.3 553.84 41.11 532 52 curveto
+528.36 53.81 524.94 56.06 521.73 58.62 curveto
+stroke
+0 0 0 edgecolor
+newpath 519.19 56.21 moveto
+514.19 65.55 lineto
+523.92 61.36 lineto
+closepath fill
+1 setlinewidth
+solid
+0 0 0 edgecolor
+newpath 519.19 56.21 moveto
+514.19 65.55 lineto
+523.92 61.36 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+533.5 57.4 moveto 45 (FF: [1]) alignedtext
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 708 453
+end
+restore
+%%EOF
diff --git a/genomix/genomix-pregelix/data/TestSet/PathMerge/head_6/test.txt b/genomix/genomix-pregelix/data/TestSet/PathMerge/head_6/test.txt
new file mode 100644
index 0000000..ea21058
--- /dev/null
+++ b/genomix/genomix-pregelix/data/TestSet/PathMerge/head_6/test.txt
@@ -0,0 +1,8 @@
+GAA {[{AAG:[2]}, {AAC:[1]}] [] [] [{AGA:[1,2]}] {5':[], ~5':[]} 2.0x}
+AGA {[{GAA:[1,2]}] [] [{CTA:[1,2]}] [] {5':[], ~5':[]} 2.0x}
+ATA {[] [{CTA:[1,2]}] [{ATG:[2]}] [{AAT:[1]}] {5':[], ~5':[]} 2.0x}
+CTA {[] [{ATA:[1,2]}] [{AGA:[1,2]}] [] {5':[], ~5':[]} 2.0x}
+AAC {[] [] [] [{GAA:[1]}] {5':[], ~5':[]} 1.0x}
+AAG {[] [] [] [{GAA:[2]}] {5':[], ~5':[]} 1.0x}
+ATG {[] [] [{ATA:[2]}] [] {5':[], ~5':[(2-0_0)]} 1.0x}
+AAT {[{ATA:[1]}] [] [] [] {5':[(1-0_0)], ~5':[]} 1.0x}
diff --git a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/io/BFSTraverseMessageWritable.java b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/io/BFSTraverseMessageWritable.java
index ac74284..40dcc05 100644
--- a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/io/BFSTraverseMessageWritable.java
+++ b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/io/BFSTraverseMessageWritable.java
@@ -4,6 +4,7 @@
import java.io.DataOutput;
import java.io.IOException;
+import edu.uci.ics.genomix.pregelix.type.EdgeDirs;
import edu.uci.ics.genomix.type.VKmerBytesWritable;
import edu.uci.ics.genomix.type.VKmerListWritable;
diff --git a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/io/IncomingListWritable.java b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/io/IncomingListWritable.java
deleted file mode 100644
index 8dec857..0000000
--- a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/io/IncomingListWritable.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package edu.uci.ics.genomix.pregelix.io;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.hadoop.io.WritableComparable;
-
-import edu.uci.ics.genomix.type.PositionListWritable;
-
-public class IncomingListWritable implements WritableComparable<IncomingListWritable>{
- private PositionListWritable reverseForwardList;
- private PositionListWritable reverseReverseList;
-
- public IncomingListWritable(){
- reverseForwardList = new PositionListWritable();
- reverseReverseList = new PositionListWritable();
- }
-
- public PositionListWritable getReverseForwardList() {
- return reverseForwardList;
- }
-
- public void setReverseForwardList(PositionListWritable reverseForwardList) {
- this.reverseForwardList = reverseForwardList;
- }
-
- public PositionListWritable getReverseReverseList() {
- return reverseReverseList;
- }
-
- public void setReverseReverseList(PositionListWritable reverseReverseList) {
- this.reverseReverseList = reverseReverseList;
- }
-
- @Override
- public void readFields(DataInput in) throws IOException {
- reverseForwardList.readFields(in);
- reverseReverseList.readFields(in);
- }
-
- @Override
- public void write(DataOutput out) throws IOException {
- reverseForwardList.write(out);
- reverseReverseList.write(out);
- }
-
- @Override
- public int compareTo(IncomingListWritable o) {
- return 0;
- }
-
- public int inDegree(){
- return reverseReverseList.getCountOfPosition() + reverseForwardList.getCountOfPosition();
- }
-}
diff --git a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/io/OutgoingListWritable.java b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/io/OutgoingListWritable.java
deleted file mode 100644
index 275954d..0000000
--- a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/io/OutgoingListWritable.java
+++ /dev/null
@@ -1,56 +0,0 @@
-package edu.uci.ics.genomix.pregelix.io;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.hadoop.io.WritableComparable;
-
-import edu.uci.ics.genomix.type.PositionListWritable;
-
-public class OutgoingListWritable implements WritableComparable<OutgoingListWritable>{
- private PositionListWritable forwardForwardList;
- private PositionListWritable forwardReverseList;
-
- public OutgoingListWritable(){
- forwardForwardList = new PositionListWritable();
- forwardReverseList = new PositionListWritable();
- }
-
- public PositionListWritable getForwardForwardList() {
- return forwardForwardList;
- }
-
- public void setForwardForwardList(PositionListWritable forwardForwardList) {
- this.forwardForwardList = forwardForwardList;
- }
-
- public PositionListWritable getForwardReverseList() {
- return forwardReverseList;
- }
-
- public void setForwardReverseList(PositionListWritable forwardReverseList) {
- this.forwardReverseList = forwardReverseList;
- }
-
- @Override
- public void readFields(DataInput in) throws IOException {
- forwardForwardList.readFields(in);
- forwardReverseList.readFields(in);
- }
-
- @Override
- public void write(DataOutput out) throws IOException {
- forwardForwardList.write(out);
- forwardReverseList.write(out);
- }
-
- @Override
- public int compareTo(OutgoingListWritable o) {
- return 0;
- }
-
- public int outDegree(){
- return forwardForwardList.getCountOfPosition() + forwardReverseList.getCountOfPosition();
- }
-}
diff --git a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/pathmerge/P4ForPathMergeVertex.java b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/pathmerge/P4ForPathMergeVertex.java
index 408fd97..1716ca0 100644
--- a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/pathmerge/P4ForPathMergeVertex.java
+++ b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/pathmerge/P4ForPathMergeVertex.java
@@ -110,7 +110,7 @@
* set nextKmer to the element that's next (in the node's FF or FR list), returning true when there is a next neighbor
*/
protected boolean setNextInfo(VertexValueWritable value) {
- if (!value.getFFList().isEmpty()) {
+ if (value.getFFList().getCountOfPosition() > 0) {
nextKmer.setAsCopy(value.getFFList().get(0).getKey());
nextHead = isNodeRandomHead(nextKmer);
return true;
diff --git a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/scaffolding/BFSTraverseVertex.java b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/scaffolding/BFSTraverseVertex.java
index 22b0998..e7cd4ac 100644
--- a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/scaffolding/BFSTraverseVertex.java
+++ b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/scaffolding/BFSTraverseVertex.java
@@ -7,9 +7,9 @@
import edu.uci.ics.genomix.pregelix.format.GraphCleanOutputFormat;
import edu.uci.ics.genomix.pregelix.io.ArrayListWritable;
import edu.uci.ics.genomix.pregelix.io.BFSTraverseMessageWritable;
-import edu.uci.ics.genomix.pregelix.io.EdgeDirs;
import edu.uci.ics.genomix.pregelix.io.VertexValueWritable;
import edu.uci.ics.genomix.pregelix.operator.BasicGraphCleanVertex;
+import edu.uci.ics.genomix.pregelix.type.EdgeDirs;
import edu.uci.ics.genomix.pregelix.type.MessageFlag;
import edu.uci.ics.genomix.type.VKmerBytesWritable;
import edu.uci.ics.genomix.type.VKmerListWritable;
@@ -164,7 +164,7 @@
}
}
- public void finalProcessBTS(){
+ public void finalProcessBFS(){
kmerList.setCopy(incomingMsg.getPathList());
kmerList.append(getVertexId());
incomingMsg.setPathList(kmerList);
@@ -219,7 +219,7 @@
if(incomingMsg.getSeekedVertexId().equals(getVertexId())){
if(isValidDestination()){
/** final step to process BFS -- pathList and dirList **/
- finalProcessBTS();
+ finalProcessBFS();
/** send message to all the path nodes to add this common readId **/
sendMsgToPathNodeToAddCommondReadId();
}
diff --git a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/scaffolding/ScaffoldingVertex.java b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/scaffolding/ScaffoldingVertex.java
index 185ba07..e817a24 100644
--- a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/scaffolding/ScaffoldingVertex.java
+++ b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/scaffolding/ScaffoldingVertex.java
@@ -167,7 +167,7 @@
if(incomingMsg.getSeekedVertexId().equals(getVertexId())){
if(isValidDestination()){
/** final step to process BFS -- pathList and dirList **/
- finalProcessBTS();
+ finalProcessBFS();
/** send message to all the path nodes to add this common readId **/
sendMsgToPathNodeToAddCommondReadId();
}
diff --git a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/splitrepeat/SplitRepeatVertex.java b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/splitrepeat/SplitRepeatVertex.java
index d3dec3a..02dbd5b 100644
--- a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/splitrepeat/SplitRepeatVertex.java
+++ b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/splitrepeat/SplitRepeatVertex.java
@@ -249,5 +249,6 @@
}
voteToHalt();
}
- }
+ }
+
}
diff --git a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/unrolltandemrepeat/UnrollTandemRepeat.java b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/unrolltandemrepeat/UnrollTandemRepeat.java
index 6ea0442..01e656b 100644
--- a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/unrolltandemrepeat/UnrollTandemRepeat.java
+++ b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/unrolltandemrepeat/UnrollTandemRepeat.java
@@ -140,6 +140,18 @@
}
}
+ /**
+ * update edges
+ */
+ public void updateEdges(){
+ byte flipDir = flipDir(incomingMsg.getFlag());
+ byte prevNeighborToMe = mirrorDirection(flipDir);
+ byte curNeighborToMe = mirrorDirection(incomingMsg.getFlag());
+ tmpEdge.setAsCopy(getVertexValue().getEdgeList(prevNeighborToMe).getEdge(incomingMsg.getSourceVertexId()));
+ getVertexValue().getEdgeList(prevNeighborToMe).remove(incomingMsg.getSourceVertexId());
+ getVertexValue().getEdgeList(curNeighborToMe).add(tmpEdge);
+ }
+
@Override
public void compute(Iterator<MessageWritable> msgIterator) throws Exception {
initVertex();
@@ -152,12 +164,7 @@
while(msgIterator.hasNext()){
incomingMsg = msgIterator.next();
/** update edge **/
- byte flipDir = flipDir(incomingMsg.getFlag());
- byte prevNeighborToMe = mirrorDirection(flipDir);
- byte curNeighborToMe = mirrorDirection(incomingMsg.getFlag());
- tmpEdge.setAsCopy(getVertexValue().getEdgeList(prevNeighborToMe).getEdge(incomingMsg.getSourceVertexId()));
- getVertexValue().getEdgeList(prevNeighborToMe).remove(incomingMsg.getSourceVertexId());
- getVertexValue().getEdgeList(curNeighborToMe).add(tmpEdge);
+ updateEdges();
}
voteToHalt();
}
diff --git a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/io/EdgeDirs.java b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/type/EdgeDirs.java
similarity index 97%
rename from genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/io/EdgeDirs.java
rename to genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/type/EdgeDirs.java
index 6c4dc84..2881ee1 100644
--- a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/io/EdgeDirs.java
+++ b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/type/EdgeDirs.java
@@ -1,4 +1,4 @@
-package edu.uci.ics.genomix.pregelix.io;
+package edu.uci.ics.genomix.pregelix.type;
import java.io.DataInput;
import java.io.DataOutput;
diff --git a/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/JobRun/PathMergeTestSuite.java b/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/JobRun/PathMergeTestSuite.java
index 970a6ae..ee18c75 100644
--- a/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/JobRun/PathMergeTestSuite.java
+++ b/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/JobRun/PathMergeTestSuite.java
@@ -10,7 +10,7 @@
{
// "SimplePath",
// "ThreeDuplicate",
- "BridgePath_AfterUnroll"
+ "head_6"
// "CyclePath",
// "SelfPath"
// "TreePath"