Adapt RemoveLowCoverageVertex to new graph structure. Finally, all the patterns are adapted to new graph
diff --git a/genomix/genomix-pregelix/data/TestSet/RemoveLowCoverage/MaxCoverage_6/bin/part-00000 b/genomix/genomix-pregelix/data/TestSet/RemoveLowCoverage/MaxCoverage_6/bin/part-00000
new file mode 100755
index 0000000..c1b4e20
--- /dev/null
+++ b/genomix/genomix-pregelix/data/TestSet/RemoveLowCoverage/MaxCoverage_6/bin/part-00000
Binary files differ
diff --git a/genomix/genomix-pregelix/data/TestSet/RemoveLowCoverage/MaxCoverage_6/graphviz/result.ps b/genomix/genomix-pregelix/data/TestSet/RemoveLowCoverage/MaxCoverage_6/graphviz/result.ps
new file mode 100644
index 0000000..96623fa
--- /dev/null
+++ b/genomix/genomix-pregelix/data/TestSet/RemoveLowCoverage/MaxCoverage_6/graphviz/result.ps
@@ -0,0 +1,693 @@
+%!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 962 184
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 926 148 boxprim clip newpath
+1 1 set_scale 0 rotate 40 41 translate
+% AAA
+gsave
+0 0 0.75294 nodecolor
+newpath 0 0 moveto
+0 104 lineto
+80 104 lineto
+80 0 lineto
+closepath fill
+1 setlinewidth
+filled
+0 0 0 nodecolor
+newpath 0 0 moveto
+0 104 lineto
+80 104 lineto
+80 0 lineto
+closepath stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+24.5 87.4 moveto 31 (AAA) alignedtext
+1 setlinewidth
+filled
+0 0 0 nodecolor
+newpath 0 78 moveto
+80 78 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+8 61.4 moveto 64 (5':[2,3,1]) alignedtext
+1 setlinewidth
+filled
+0 0 0 nodecolor
+newpath 0 52 moveto
+80 52 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+20 35.4 moveto 40 (~5':[]) alignedtext
+1 setlinewidth
+filled
+0 0 0 nodecolor
+newpath 0 26 moveto
+80 26 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+28.5 9.4 moveto 23 (3.0) alignedtext
+grestore
+% AAT
+gsave
+1 setlinewidth
+0 0 0 nodecolor
+newpath 192 0 moveto
+192 104 lineto
+248 104 lineto
+248 0 lineto
+closepath stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+205.5 87.4 moveto 29 (AAT) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 192 78 moveto
+248 78 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+206 61.4 moveto 28 (5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 192 52 moveto
+248 52 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+200 35.4 moveto 40 (~5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 192 26 moveto
+248 26 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+208.5 9.4 moveto 23 (3.0) alignedtext
+grestore
+% AAA->AAT
+gsave
+1 setlinewidth
+0 0 0 edgecolor
+newpath 80.4 52 moveto
+110.72 52 151.96 52 181.75 52 curveto
+stroke
+0 0 0 edgecolor
+newpath 181.77 55.5 moveto
+191.77 52 lineto
+181.77 48.5 lineto
+closepath fill
+1 setlinewidth
+solid
+0 0 0 edgecolor
+newpath 181.77 55.5 moveto
+191.77 52 lineto
+181.77 48.5 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+100 57.4 moveto 72 (FF: [1,2,3]) alignedtext
+grestore
+% AAT->AAA
+gsave
+1 setlinewidth
+0 1 1 edgecolor
+newpath 191.51 35.99 moveto
+185.87 33.51 179.87 31.33 174 30 curveto
+141.06 22.53 131.22 23.91 98 30 curveto
+95.31 30.49 92.59 31.1 89.86 31.81 curveto
+stroke
+0 1 1 edgecolor
+newpath 88.64 28.52 moveto
+80.03 34.69 lineto
+90.61 35.23 lineto
+closepath fill
+1 setlinewidth
+solid
+0 1 1 edgecolor
+newpath 88.64 28.52 moveto
+80.03 34.69 lineto
+90.61 35.23 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+98.5 35.4 moveto 75 (RR: [1,2,3]) alignedtext
+grestore
+% ATC
+gsave
+1 setlinewidth
+0 0 0 nodecolor
+newpath 360 0 moveto
+360 104 lineto
+416 104 lineto
+416 0 lineto
+closepath stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+374 87.4 moveto 28 (ATC) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 360 78 moveto
+416 78 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+374 61.4 moveto 28 (5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 360 52 moveto
+416 52 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+368 35.4 moveto 40 (~5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 360 26 moveto
+416 26 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+376.5 9.4 moveto 23 (3.0) alignedtext
+grestore
+% AAT->ATC
+gsave
+1 setlinewidth
+0 0 0 edgecolor
+newpath 248.12 52 moveto
+275.86 52 318.48 52 349.39 52 curveto
+stroke
+0 0 0 edgecolor
+newpath 349.79 55.5 moveto
+359.79 52 lineto
+349.79 48.5 lineto
+closepath fill
+1 setlinewidth
+solid
+0 0 0 edgecolor
+newpath 349.79 55.5 moveto
+359.79 52 lineto
+349.79 48.5 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+268 57.4 moveto 72 (FF: [1,2,3]) alignedtext
+grestore
+% GAA
+gsave
+1 setlinewidth
+0 0 0 nodecolor
+newpath 694 0 moveto
+694 104 lineto
+750 104 lineto
+750 0 lineto
+closepath stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+706 87.4 moveto 32 (GAA) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 694 78 moveto
+750 78 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+708 61.4 moveto 28 (5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 694 52 moveto
+750 52 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+702 35.4 moveto 40 (~5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 694 26 moveto
+750 26 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+710.5 9.4 moveto 23 (3.0) alignedtext
+grestore
+% AAC
+gsave
+1 setlinewidth
+0 0 0 nodecolor
+newpath 862 0 moveto
+862 104 lineto
+918 104 lineto
+918 0 lineto
+closepath stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+874.5 87.4 moveto 31 (AAC) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 862 78 moveto
+918 78 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+876 61.4 moveto 28 (5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 862 52 moveto
+918 52 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+870 35.4 moveto 40 (~5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 862 26 moveto
+918 26 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+878.5 9.4 moveto 23 (3.0) alignedtext
+grestore
+% GAA->AAC
+gsave
+1 setlinewidth
+0 0 0 edgecolor
+newpath 750.12 52 moveto
+777.86 52 820.48 52 851.39 52 curveto
+stroke
+0 0 0 edgecolor
+newpath 851.79 55.5 moveto
+861.79 52 lineto
+851.79 48.5 lineto
+closepath fill
+1 setlinewidth
+solid
+0 0 0 edgecolor
+newpath 851.79 55.5 moveto
+861.79 52 lineto
+851.79 48.5 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+770 57.4 moveto 72 (FF: [1,2,3]) alignedtext
+grestore
+% CGA
+gsave
+1 setlinewidth
+0 0 0 nodecolor
+newpath 526 0 moveto
+526 104 lineto
+582 104 lineto
+582 0 lineto
+closepath stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+538.5 87.4 moveto 31 (CGA) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 526 78 moveto
+582 78 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+540 61.4 moveto 28 (5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 526 52 moveto
+582 52 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+534 35.4 moveto 40 (~5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 526 26 moveto
+582 26 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+542.5 9.4 moveto 23 (6.0) alignedtext
+grestore
+% GAA->CGA
+gsave
+1 setlinewidth
+0 1 1 edgecolor
+newpath 693.83 38.35 moveto
+688.06 36.13 681.93 34.18 676 33 curveto
+642.87 26.43 633.13 26.43 600 33 curveto
+597.31 33.53 594.58 34.23 591.87 35.03 curveto
+stroke
+0 1 1 edgecolor
+newpath 590.5 31.8 moveto
+582.17 38.35 lineto
+592.76 38.42 lineto
+closepath fill
+1 setlinewidth
+solid
+0 1 1 edgecolor
+newpath 590.5 31.8 moveto
+582.17 38.35 lineto
+592.76 38.42 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+600.5 38.4 moveto 75 (RR: [1,2,3]) alignedtext
+grestore
+% AAC->GAA
+gsave
+1 setlinewidth
+0 1 1 edgecolor
+newpath 861.51 35.99 moveto
+855.87 33.51 849.87 31.33 844 30 curveto
+811.06 22.53 800.94 22.53 768 30 curveto
+765.34 30.6 762.65 31.38 759.99 32.28 curveto
+stroke
+0 1 1 edgecolor
+newpath 758.53 29.09 moveto
+750.49 35.99 lineto
+761.08 35.61 lineto
+closepath fill
+1 setlinewidth
+solid
+0 1 1 edgecolor
+newpath 758.53 29.09 moveto
+750.49 35.99 lineto
+761.08 35.61 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+768.5 35.4 moveto 75 (RR: [1,2,3]) alignedtext
+grestore
+% CGA->GAA
+gsave
+1 setlinewidth
+0 0 0 edgecolor
+newpath 582.12 52 moveto
+609.86 52 652.48 52 683.39 52 curveto
+stroke
+0 0 0 edgecolor
+newpath 683.79 55.5 moveto
+693.79 52 lineto
+683.79 48.5 lineto
+closepath fill
+1 setlinewidth
+solid
+0 0 0 edgecolor
+newpath 683.79 55.5 moveto
+693.79 52 lineto
+683.79 48.5 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+602 57.4 moveto 72 (FF: [1,2,3]) alignedtext
+grestore
+% CGA->CGA
+gsave
+1 setlinewidth
+0.33333 1 1 edgecolor
+newpath 539.26 104.2 moveto
+540.92 114.59 545.83 122 554 122 curveto
+559.23 122 563.13 118.96 565.69 114.04 curveto
+stroke
+0.33333 1 1 edgecolor
+newpath 569.12 114.79 moveto
+568.74 104.2 lineto
+562.44 112.72 lineto
+closepath fill
+1 setlinewidth
+solid
+0.33333 1 1 edgecolor
+newpath 569.12 114.79 moveto
+568.74 104.2 lineto
+562.44 112.72 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+517.5 127.4 moveto 73 (RF: [1,2,3]) alignedtext
+grestore
+% CGA->ATC
+gsave
+1 setlinewidth
+0.66667 1 1 edgecolor
+newpath 525.83 38.35 moveto
+520.06 36.13 513.93 34.18 508 33 curveto
+475.74 26.6 466.26 26.6 434 33 curveto
+431.31 33.53 428.58 34.23 425.87 35.03 curveto
+stroke
+0.66667 1 1 edgecolor
+newpath 424.5 31.8 moveto
+416.17 38.35 lineto
+426.76 38.42 lineto
+closepath fill
+1 setlinewidth
+solid
+0.66667 1 1 edgecolor
+newpath 424.5 31.8 moveto
+416.17 38.35 lineto
+426.76 38.42 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+434.5 38.4 moveto 73 (FR: [1,2,3]) alignedtext
+grestore
+% ATC->AAT
+gsave
+1 setlinewidth
+0 1 1 edgecolor
+newpath 359.83 38.35 moveto
+354.06 36.13 347.93 34.18 342 33 curveto
+308.87 26.43 299.13 26.43 266 33 curveto
+263.31 33.53 260.58 34.23 257.87 35.03 curveto
+stroke
+0 1 1 edgecolor
+newpath 256.5 31.8 moveto
+248.17 38.35 lineto
+258.76 38.42 lineto
+closepath fill
+1 setlinewidth
+solid
+0 1 1 edgecolor
+newpath 256.5 31.8 moveto
+248.17 38.35 lineto
+258.76 38.42 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+266.5 38.4 moveto 75 (RR: [1,2,3]) alignedtext
+grestore
+% ATC->CGA
+gsave
+1 setlinewidth
+0.66667 1 1 edgecolor
+newpath 416.16 52 moveto
+443.55 52 485.36 52 515.75 52 curveto
+stroke
+0.66667 1 1 edgecolor
+newpath 515.98 55.5 moveto
+525.98 52 lineto
+515.98 48.5 lineto
+closepath fill
+1 setlinewidth
+solid
+0.66667 1 1 edgecolor
+newpath 515.98 55.5 moveto
+525.98 52 lineto
+515.98 48.5 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+434.5 57.4 moveto 73 (FR: [1,2,3]) alignedtext
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 962 184
+end
+restore
+%%EOF
diff --git a/genomix/genomix-pregelix/data/TestSet/RemoveLowCoverage/MaxCoverage_6/test.txt b/genomix/genomix-pregelix/data/TestSet/RemoveLowCoverage/MaxCoverage_6/test.txt
new file mode 100644
index 0000000..45adac8
--- /dev/null
+++ b/genomix/genomix-pregelix/data/TestSet/RemoveLowCoverage/MaxCoverage_6/test.txt
@@ -0,0 +1,6 @@
+AAA	{[{AAT:[1,2,3]}]	[]	[]	[]	{5':[(2-0_0),(3-0_0),(1-0_0)], ~5':[]}	3.0x}
+GAA	{[{AAC:[1,2,3]}]	[]	[]	[{CGA:[1,2,3]}]	{5':[], ~5':[]}	3.0x}
+CGA	{[{GAA:[1,2,3]}]	[{ATC:[1,2,3]}]	[{CGA:[1,2,3]}]	[]	{5':[], ~5':[]}	6.0x}
+AAC	{[]	[]	[]	[{GAA:[1,2,3]}]	{5':[], ~5':[]}	3.0x}
+ATC	{[]	[{CGA:[1,2,3]}]	[]	[{AAT:[1,2,3]}]	{5':[], ~5':[]}	3.0x}
+AAT	{[{ATC:[1,2,3]}]	[]	[]	[{AAA:[1,2,3]}]	{5':[], ~5':[]}	3.0x}
diff --git a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/BasicGraphCleanVertex.java b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/BasicGraphCleanVertex.java
index 2161601..b15b9c4 100644
--- a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/BasicGraphCleanVertex.java
+++ b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/BasicGraphCleanVertex.java
@@ -438,7 +438,7 @@
     }
     
     /**
-     * broadcast kill self to all neighbers  Pre-condition: vertex is a path vertex ***
+     * broadcast kill self to all neighbers ***
      */
     public void broadcaseKillself(){
         outFlag = 0;
diff --git a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/removelowcoverage/RemoveLowCoverageVertex.java b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/removelowcoverage/RemoveLowCoverageVertex.java
index 3eae7b4..d1da94f 100644
--- a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/removelowcoverage/RemoveLowCoverageVertex.java
+++ b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/removelowcoverage/RemoveLowCoverageVertex.java
@@ -1,25 +1,26 @@
 package edu.uci.ics.genomix.pregelix.operator.removelowcoverage;
 
+import java.util.HashSet;
 import java.util.Iterator;
-
-import org.apache.hadoop.io.NullWritable;
+import java.util.Set;
 
 import edu.uci.ics.genomix.pregelix.client.Client;
 import edu.uci.ics.genomix.pregelix.format.GraphCleanInputFormat;
 import edu.uci.ics.genomix.pregelix.format.GraphCleanOutputFormat;
 import edu.uci.ics.genomix.pregelix.io.MessageWritable;
 import edu.uci.ics.genomix.pregelix.io.VertexValueWritable;
+import edu.uci.ics.genomix.pregelix.operator.BasicGraphCleanVertex;
 import edu.uci.ics.genomix.type.VKmerBytesWritable;
-import edu.uci.ics.pregelix.api.graph.Vertex;
 import edu.uci.ics.pregelix.api.job.PregelixJob;
 
 public class RemoveLowCoverageVertex extends
-    Vertex<VKmerBytesWritable, VertexValueWritable, NullWritable, MessageWritable> {
+    BasicGraphCleanVertex<MessageWritable> {
     public static final String KMER_SIZE = "RemoveLowCoverageVertex.kmerSize";
     public static final String MIN_AVERAGECOVERAGE = "RemoveLowCoverageVertex.minAverageCoverage";
     public static int kmerSize = -1;
     private static float minAverageCoverage = -1;
     
+    private Set<VKmerBytesWritable> deadNodeSet = new HashSet<VKmerBytesWritable>();
     /**
      * initiate kmerSize, length
      */
@@ -27,16 +28,44 @@
         if (kmerSize == -1)
             kmerSize = getContext().getConfiguration().getInt(KMER_SIZE, 5);
         if(minAverageCoverage == -1)
-            minAverageCoverage = getContext().getConfiguration().getFloat(MIN_AVERAGECOVERAGE, 5);
+            minAverageCoverage = getContext().getConfiguration().getFloat(MIN_AVERAGECOVERAGE, 3);
+        if(incomingMsg == null)
+            incomingMsg = new MessageWritable();
+        if(outgoingMsg == null)
+            outgoingMsg = new MessageWritable();
+        else
+            outgoingMsg.reset();
+        if(destVertexId == null)
+            destVertexId = new VKmerBytesWritable();
+        if(fakeVertex == null){
+            fakeVertex = new VKmerBytesWritable();
+            String random = generaterRandomString(kmerSize + 1);
+            fakeVertex.setByRead(kmerSize + 1, random.getBytes(), 0); 
+        }
     }
     
     @Override
     public void compute(Iterator<MessageWritable> msgIterator) {
         initVertex(); 
-        if(getVertexValue().getAvgCoverage() < minAverageCoverage)
-            deleteVertex(getVertexId());
-        else
-            voteToHalt();
+        if(getSuperstep() == 1){
+            if(getVertexValue().getAvgCoverage() <= minAverageCoverage){
+                broadcaseKillself();
+                deadNodeSet.add(getVertexId());
+            }
+            else
+                voteToHalt();
+        } else if(getSuperstep() == 2){
+            if(deadNodeSet.contains(getVertexId()))
+                deleteVertex(getVertexId());
+            else{
+                while(msgIterator.hasNext()){
+                    incomingMsg = msgIterator.next();
+                    if(isResponseKillMsg())
+                        responseToDeadVertex();
+                }
+                voteToHalt();
+            }
+        } 
     }
     
     public static void main(String[] args) throws Exception {
diff --git a/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/JobGen/JobGenerator.java b/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/JobGen/JobGenerator.java
index 60705b8..7ca5987 100644
--- a/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/JobGen/JobGenerator.java
+++ b/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/JobGen/JobGenerator.java
@@ -118,7 +118,7 @@
     private static void generateRemoveLowCoverageGraphJob(String jobName, String outputPath) throws IOException {
         PregelixJob job = new PregelixJob(jobName);
         job.setVertexClass(RemoveLowCoverageVertex.class);
-        job.setVertexInputFormatClass(GraphCleanInputFormat.class);
+        job.setVertexInputFormatClass(InitialGraphCleanInputFormat.class);
         job.setVertexOutputFormatClass(GraphCleanOutputFormat.class);
         job.setDynamicVertexValueSize(true);
         job.setOutputKeyClass(VKmerBytesWritable.class);
diff --git a/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/JobRun/RemoveLowCoverageSmallTestSuite.java b/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/JobRun/RemoveLowCoverageSmallTestSuite.java
deleted file mode 100644
index 16da169..0000000
--- a/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/JobRun/RemoveLowCoverageSmallTestSuite.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Copyright 2009-2010 by The Regents of the University of California
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * you may obtain a copy of the License from
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package edu.uci.ics.genomix.pregelix.JobRun;
-
-import java.io.BufferedReader;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.logging.Logger;
-
-import junit.framework.Test;
-import junit.framework.TestResult;
-import junit.framework.TestSuite;
-
-import org.apache.commons.io.FileUtils;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.FileSystem;
-import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hdfs.MiniDFSCluster;
-import org.apache.hadoop.mapred.JobConf;
-
-import edu.uci.ics.pregelix.core.jobgen.clusterconfig.ClusterConfig;
-import edu.uci.ics.pregelix.core.util.PregelixHyracksIntegrationUtil;
-
-@SuppressWarnings("deprecation")
-public class RemoveLowCoverageSmallTestSuite extends TestSuite {
-    private static final Logger LOGGER = Logger.getLogger(RemoveLowCoverageSmallTestSuite.class.getName());
-
-    public static final String PreFix = "data/PathMergeTestSet"; //"graphbuildresult";
-    public static final String[] TestDir = { PreFix + File.separator
-    + "5"};
-    private static final String ACTUAL_RESULT_DIR = "data/actual/removelowcoverage";
-    private static final String PATH_TO_HADOOP_CONF = "src/test/resources/hadoop/conf";
-    private static final String PATH_TO_CLUSTER_STORE = "src/test/resources/cluster/stores.properties";
-    private static final String PATH_TO_CLUSTER_PROPERTIES = "src/test/resources/cluster/cluster.properties";
-    private static final String PATH_TO_JOBS = "src/test/resources/jobs/";
-    private static final String PATH_TO_ONLY = "src/test/resources/only_removelowcoverage.txt";
-
-    public static final String HDFS_INPUTPATH = "/PathTestSet";
-
-    private static final String HADOOP_CONF_PATH = ACTUAL_RESULT_DIR + File.separator + "conf.xml";
-    private MiniDFSCluster dfsCluster;
-
-    private JobConf conf = new JobConf();
-    private int numberOfNC = 2;
-
-    public void setUp() throws Exception {
-        ClusterConfig.setStorePath(PATH_TO_CLUSTER_STORE);
-        ClusterConfig.setClusterPropertiesPath(PATH_TO_CLUSTER_PROPERTIES);
-        cleanupStores();
-        PregelixHyracksIntegrationUtil.init();
-        LOGGER.info("Hyracks mini-cluster started");
-        FileUtils.forceMkdir(new File(ACTUAL_RESULT_DIR));
-        FileUtils.cleanDirectory(new File(ACTUAL_RESULT_DIR));
-        startHDFS();
-    }
-
-    private void startHDFS() throws IOException {
-        conf.addResource(new Path(PATH_TO_HADOOP_CONF + "/core-site.xml"));
-        conf.addResource(new Path(PATH_TO_HADOOP_CONF + "/mapred-site.xml"));
-        conf.addResource(new Path(PATH_TO_HADOOP_CONF + "/hdfs-site.xml"));
-        FileSystem lfs = FileSystem.getLocal(new Configuration());
-        lfs.delete(new Path("build"), true);
-        System.setProperty("hadoop.log.dir", "logs");
-        dfsCluster = new MiniDFSCluster(conf, numberOfNC, true, null);
-        FileSystem dfs = FileSystem.get(conf);
-
-        for (String testDir : TestDir) {
-            File src = new File(testDir);
-            Path dest = new Path(HDFS_INPUTPATH + File.separator + src.getName());
-            dfs.mkdirs(dest);
-            //src.listFiles()
-            //src.listFiles((FilenameFilter)(new WildcardFileFilter("part*")))
-            for (File f : src.listFiles()) {
-                dfs.copyFromLocalFile(new Path(f.getAbsolutePath()), dest);
-            }
-        }
-
-        DataOutputStream confOutput = new DataOutputStream(new FileOutputStream(new File(HADOOP_CONF_PATH)));
-        conf.writeXml(confOutput);
-        confOutput.flush();
-        confOutput.close();
-    }
-
-    private void cleanupStores() throws IOException {
-        FileUtils.forceMkdir(new File("teststore"));
-        FileUtils.forceMkdir(new File("build"));
-        FileUtils.cleanDirectory(new File("teststore"));
-        FileUtils.cleanDirectory(new File("build"));
-    }
-
-    /**
-     * cleanup hdfs cluster
-     */
-    private void cleanupHDFS() throws Exception {
-        dfsCluster.shutdown();
-    }
-
-    public void tearDown() throws Exception {
-        PregelixHyracksIntegrationUtil.deinit();
-        LOGGER.info("Hyracks mini-cluster shut down");
-        cleanupHDFS();
-    }
-
-    public static Test suite() throws Exception {
-        List<String> onlys = getFileList(PATH_TO_ONLY);
-        File testData = new File(PATH_TO_JOBS);
-        File[] queries = testData.listFiles();
-        RemoveLowCoverageSmallTestSuite testSuite = new RemoveLowCoverageSmallTestSuite();
-        testSuite.setUp();
-        boolean onlyEnabled = false;
-        FileSystem dfs = FileSystem.get(testSuite.conf);
-
-        if (onlys.size() > 0) {
-            onlyEnabled = true;
-        }
-
-        for (File qFile : queries) {
-            if (qFile.isFile()) {
-                if (onlyEnabled && !isInList(onlys, qFile.getName())) {
-                    continue;
-                } else {
-                    for (String testPathStr : TestDir) {
-                        File testDir = new File(testPathStr);
-                        String resultFileName = ACTUAL_RESULT_DIR + File.separator + jobExtToResExt(qFile.getName())
-                                + File.separator + "bin" + File.separator + testDir.getName();
-                        String textFileName = ACTUAL_RESULT_DIR + File.separator + jobExtToResExt(qFile.getName())
-                                + File.separator + "txt" + File.separator + testDir.getName();
-                        String graphvizFileName = ACTUAL_RESULT_DIR + File.separator + jobExtToResExt(qFile.getName())
-                                + File.separator + "graphviz" + File.separator + testDir.getName();
-                        testSuite.addTest(new BasicSmallTestCase(HADOOP_CONF_PATH, qFile.getName(), qFile
-                                .getAbsolutePath().toString(), dfs,
-                                HDFS_INPUTPATH + File.separator + testDir.getName(), resultFileName, textFileName, graphvizFileName));
-                    }
-                }
-            }
-        }
-        return testSuite;
-    }
-
-    /**
-     * Runs the tests and collects their result in a TestResult.
-     */
-    @Override
-    public void run(TestResult result) {
-        try {
-            int testCount = countTestCases();
-            for (int i = 0; i < testCount; i++) {
-                // cleanupStores();
-                Test each = this.testAt(i);
-                if (result.shouldStop())
-                    break;
-                runTest(each, result);
-            }
-            tearDown();
-        } catch (Exception e) {
-            throw new IllegalStateException(e);
-        }
-    }
-
-    protected static List<String> getFileList(String ignorePath) throws FileNotFoundException, IOException {
-        BufferedReader reader = new BufferedReader(new FileReader(ignorePath));
-        String s = null;
-        List<String> ignores = new ArrayList<String>();
-        while ((s = reader.readLine()) != null) {
-            ignores.add(s);
-        }
-        reader.close();
-        return ignores;
-    }
-
-    private static String jobExtToResExt(String fname) {
-        int dot = fname.lastIndexOf('.');
-        return fname.substring(0, dot);
-    }
-
-    private static boolean isInList(List<String> onlys, String name) {
-        for (String only : onlys)
-            if (name.indexOf(only) >= 0)
-                return true;
-        return false;
-    }
-
-}
diff --git a/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/JobRun/RemoveLowCoverageTestSuite.java b/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/JobRun/RemoveLowCoverageTestSuite.java
new file mode 100644
index 0000000..709b7c9
--- /dev/null
+++ b/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/JobRun/RemoveLowCoverageTestSuite.java
@@ -0,0 +1,14 @@
+package edu.uci.ics.genomix.pregelix.JobRun;
+
+import junit.framework.Test;
+
+public class RemoveLowCoverageTestSuite extends BasicGraphCleanTestSuite{
+
+    public static Test suite() throws Exception {
+        String pattern ="RemoveLowCoverage";
+        String testSet[] = {"MaxCoverage_6"};
+        init(pattern, testSet);
+        BasicGraphCleanTestSuite testSuite = new BasicGraphCleanTestSuite();
+        return makeTestSuite(testSuite);
+    }
+}
diff --git a/genomix/genomix-pregelix/src/test/resources/jobs/RemoveLowCoverageGraph.xml b/genomix/genomix-pregelix/src/test/resources/jobs/RemoveLowCoverageGraph.xml
index db21f20..77d1f6f 100644
--- a/genomix/genomix-pregelix/src/test/resources/jobs/RemoveLowCoverageGraph.xml
+++ b/genomix/genomix-pregelix/src/test/resources/jobs/RemoveLowCoverageGraph.xml
@@ -122,7 +122,7 @@
 <property><name>mapred.map.tasks.speculative.execution</name><value>true</value></property>
 <property><name>mapred.inmem.merge.threshold</name><value>1000</value></property>
 <property><name>hadoop.logfile.size</name><value>10000000</value></property>
-<property><name>pregelix.vertexInputFormatClass</name><value>edu.uci.ics.genomix.pregelix.format.GraphCleanInputFormat</value></property>
+<property><name>pregelix.vertexInputFormatClass</name><value>edu.uci.ics.genomix.pregelix.format.InitialGraphCleanInputFormat</value></property>
 <property><name>mapred.job.queue.name</name><value>default</value></property>
 <property><name>mapred.job.tracker.persist.jobstatus.active</name><value>false</value></property>
 <property><name>pregelix.incStateLength</name><value>true</value></property>
diff --git a/genomix/genomix-pregelix/src/test/resources/only_RemovelowCoverage.txt b/genomix/genomix-pregelix/src/test/resources/only_RemoveLowCoverage.txt
similarity index 100%
rename from genomix/genomix-pregelix/src/test/resources/only_RemovelowCoverage.txt
rename to genomix/genomix-pregelix/src/test/resources/only_RemoveLowCoverage.txt