From 5faa71da64ef422f0b363390da50959f6023908e Mon Sep 17 00:00:00 2001 From: Kevin Bui Date: Fri, 31 Mar 2017 11:03:19 -0400 Subject: [PATCH 01/13] Incremented project minor version number. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4b7bf874..5295574d 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ edu.pitt.dbmi causal-web - 1.3.2 + 1.4.0 jar causal-web From 916b9d3e436e043aad861bb6a90fccbb0c7c56a5 Mon Sep 17 00:00:00 2001 From: Kevin Bui Date: Mon, 3 Apr 2017 18:01:16 -0400 Subject: [PATCH 02/13] Changed project version number to 1.3.3. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 5295574d..48a54d2f 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ edu.pitt.dbmi causal-web - 1.4.0 + 1.3.3 jar causal-web From cc54afc66099046ae04ef2a7e5e6f45c22700cf2 Mon Sep 17 00:00:00 2001 From: Kevin Bui Date: Mon, 3 Apr 2017 18:02:22 -0400 Subject: [PATCH 03/13] Added different PAG images. --- .../resources/static/img/pags/ab_bidirect.PNG | Bin 0 -> 1450 bytes src/main/resources/static/img/pags/ab_direct.PNG | Bin 0 -> 1366 bytes .../resources/static/img/pags/ab_pd_bidirect.PNG | Bin 0 -> 1473 bytes .../resources/static/img/pags/ab_pd_direct.PNG | Bin 0 -> 1496 bytes .../static/img/pags/small_ab_bidirect.PNG | Bin 0 -> 803 bytes .../static/img/pags/small_ab_direct.PNG | Bin 0 -> 809 bytes .../static/img/pags/small_ab_pd_bidrect.PNG | Bin 0 -> 772 bytes .../static/img/pags/small_ab_pd_direct.PNG | Bin 0 -> 842 bytes 8 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/main/resources/static/img/pags/ab_bidirect.PNG create mode 100644 src/main/resources/static/img/pags/ab_direct.PNG create mode 100644 src/main/resources/static/img/pags/ab_pd_bidirect.PNG create mode 100644 src/main/resources/static/img/pags/ab_pd_direct.PNG create mode 100644 src/main/resources/static/img/pags/small_ab_bidirect.PNG create mode 100644 src/main/resources/static/img/pags/small_ab_direct.PNG create mode 100644 src/main/resources/static/img/pags/small_ab_pd_bidrect.PNG create mode 100644 src/main/resources/static/img/pags/small_ab_pd_direct.PNG diff --git a/src/main/resources/static/img/pags/ab_bidirect.PNG b/src/main/resources/static/img/pags/ab_bidirect.PNG new file mode 100644 index 0000000000000000000000000000000000000000..5b1fb4c61467f5c1f8231076de4b8fe221ac517f GIT binary patch literal 1450 zcmV;b1y%ZqP)VGd000McNliru;RFK|7z&RV5kdd}1vg1V zK~#9!?V3+aB3B&8zu*+vjkdOEtRPL)Ajm=7ZDQ&sorA=Sfux3{9%XN9FD7f$q>1T4 zPZ~`)^|)-0ZO9&=UK9>f8=5uQA||Y0#H6!>O#n5Kpb{!QpcDi~{>&;}-Z$aE%$xU1 z-e=zXecx}MD3wa3z$+gXXd|o~KwI|l!T_TCkZ%FB(F(4>Err<*W?ozLQSt4a+px~j zplN_vT7ZuX_q~d?>|=jF>t{CuRwL*IU*(V;%T{oTZp@fyfLn)+P_8X$=P^qITrgNE zWCv^vpcpYhYcPQZhjl{ved~yU0=kL@VZ!d zoGcP&$$}3x%cRihmCy|<$;jV(6hB`24=t8qh$`3ih#_($OO;NZv z)!NyF(aHXT9TN#7r`3nuKmIPcy?&w(nxT%ukjn*pEy)84W6vLxCHy_;)yf-$_D;%v zu76mGufJ908n4snc}0K$AaRz2^Q8|L@g$)lpnm&#uOh$z;B~Rsbsy$Jer*p{1UR$I zzl&kp$(Gdi;^G1v$JHIQqoX6RY-wY}1&-l$u~ok$*Aq`1VPj>j`Ng#DVtHqCJRXO` z;lSM795y#M>ke`_9LD0}B34#b;P?Ca$I{7G9WQZ~%*{a9+}n$K!Ch zT-eyyz}eYZ-7mv|Kme<&tLW|Rg~4EeTCK*--Oa&vM37j!?nCJGN>CB@R5+{eKh8iV za4Ulyc_$o?$W@JlI*pzS*6HD2QEY8(!Rz(HzT_o?7}Z0ht#ILNVB3~OsHghC?gJpPcYJx!B4}(%u4<{+ zs^3(5dpn*@|A1&T3cKA7x7%H~I-}8Ge0;pFAp8A(?Ck6myr)vBU^E(`R;#h=K7{k- zTfyQsKKKX}U(K^zDSFdOjZ7wk*=&Z?Z^9;U)x7O=`Y*8c>p|7= zbo%rMBvC4rN^Lt?Z2q!WRfpd^f0S9SZ`0-FCB)+T`jnkYr63ZCN@{x%PvWQVf3Ird z$yF^Fn|=)7s;sHgD>GBO67>%&O9l*}?f?TQ8884eKBO@EU4O-~B+>?qPX70NX0-Ja zTF6x`Wp}9g>hqj09z?>KSp7s_MS#bqzsxyAkauX{wf&%^d?1lFV9?l|S@((Fk0NXg zYd?BXN2UpZ>64rQsjV4a>OqZv0gEkVoJirk%>V!Z07*qoM6N<$ Eg5^fM{r~^~ literal 0 HcmV?d00001 diff --git a/src/main/resources/static/img/pags/ab_direct.PNG b/src/main/resources/static/img/pags/ab_direct.PNG new file mode 100644 index 0000000000000000000000000000000000000000..c6ea3ed5bead70a658d861547c9a8ff923834090 GIT binary patch literal 1366 zcmV-c1*!UpP)VGd000McNliru;RFK|76KnYwEh491mj6W zK~#9!?V4XmTUP*wziJkv#M&7xvsa-p*rj3AGMKEc4YcCR8etIDzOC_XeG&%xFz`v( zgQY^B>YM4_RtRjE`64OfcAHxZo3W6_6dP%J<5-i`e~ZzjxQ8^E#hX7S*Trt|xpq}!bIN^acK9se;-=5yRypt(au}&96u6LF3}$1Sjo~3XDARaEV?Hp! zYtkiwJV3v9&)u~bkDU4ESg>SX12UlC7BTz4U>hFCl_wNebObRpSDwJgr??e6LpkEL zE>|R1Bp2h3oTC8FUJ18*8c$#tn~2#JPS^RDH4hcFb}jfXFNO$&WPy+@I2h;(ov@im z5r4X#eQ#S$^+mL@qkvxMIlA+|$shNe~{*6tQMFSLm} z{x6F4--+;e_E}bN27RrL_S4ODIn30X429EmEV9nj_#A8TWWkE-O$K_doJ2bDrm(P2 zY$j6N_lEJ`i4=8y=Y=-TUh2p#IXJU~@7BXTUr5iDlUUER2qXI-`0KG>RD08WG_@M} z=(BgT!)n#e7F>#80N<^LD52-VipEUcoZGWtfY{S@e76F-)AiKNxiT;40h@`GFq4N= zs`&eJZ!%2u(Q?Ukh5a#tGfV$S_WL5N{gEu|2W)Mm@cSadWF9;o57)0>XMTRZU^iXt z7@Uv0w;!>YNTnq|d}+K~f<2f|I$u!O|7;Sc6i$qOshW69Vg#Fq`Za>|e?yjw8TDbph zSd#(;rOVBr)n0(!P>s2>IlXqhnMm>F=RdHOd{I_`pM3Fw*oMr*%E}524Gl$|dv7va zcEfw`qM5Efb9ynPrcTGX%O}bz@Z9ASLT~|!6%5eX(}t!9GmCW|o-sMRG1d zn_7)@In1izx8QTvO6WOj@g%FUB!`;})SC?ANstP%7EiJo-$0p9w`}R{BOEr>=51_$ Y12|?6KP6!ICjbBd07*qoM6N<$g4$c2W&i*H literal 0 HcmV?d00001 diff --git a/src/main/resources/static/img/pags/ab_pd_bidirect.PNG b/src/main/resources/static/img/pags/ab_pd_bidirect.PNG new file mode 100644 index 0000000000000000000000000000000000000000..fbcb416aca2652c1454986b8c153cabaec1e8b75 GIT binary patch literal 1473 zcmV;y1wQ(TP)VGd000McNliru;RFK|77*mo{3)Ydr*cVr9%#m_|Ys^81O2fO%f24&zG!&+)+SVUM>}K zkU$75-CnG2FA5ryg7W`P#UTd+gs{-29wAga`=AXQoi!Rjyt=^mzPeEb$~#%1Vv|nAAYIGf2j_xd-UAKuAzNKgMfm z3%B)FSc8f4zZ-Mc8 zVYqq+@&t3Mmu?GalL2vNK3BTRht?B74hFIf*DI76yrY2TXGDbNbD$t!^@XtX4p7Kn z8}eInP{s}!uADI7Md=Hr4VYWxIp4Uu?#nJaDy>;|bnaT{?M{XW3CKbMvXFo*^rmDe zRvA~5#AesB%9?HU)XCN2%bkI?5<6(o4Ym?HnX($Qk!D*xRg&TO?s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n&gA@1O<3NME=FhijFq|R73QuTuk2xPqP4Fudm9=F nHBIj4`4whxLZJJ>o$|QfpU5}Gf+?!@00000NkvXXu0mjft9N=G literal 0 HcmV?d00001 diff --git a/src/main/resources/static/img/pags/small_ab_pd_bidrect.PNG b/src/main/resources/static/img/pags/small_ab_pd_bidrect.PNG new file mode 100644 index 0000000000000000000000000000000000000000..bfd6a2f5bd41a0e0d45dd020a63cff643f470658 GIT binary patch literal 772 zcmV+f1N;1mP)VGd000McNliru;RFK|9~?A|GSmP70+C5X zK~z}7?U+AI6JZ#}f0ja80*l(gqzs-3cmv^#M57K2=s=1K42~=gz`{V?7`t`qgwr93 zn|~IYn4p+m;-5&;_*D~X&)hlOB@8VSq$Nc2IaF&~3$%oxUU`ylxIgdr-Sgyq-tYYm z*$9p`=5TiZJrp0ayQf|I)|2`!|M`KwmI7|wzRK3x=So(MjEpckI@;FO%jI%p zGMS3?uH004wb^`Doge7KuV^890$ojcw*PDZ^?I1a;YCc-Bp3`bG&I!qg?xT~o?I?R zsZ?TcaFE{KUW~_P)0`D8RPLi}k>};ZFGmJV%nqYyAVGd000McNliru;RFK|9}!ACPH6xD0@q1I zK~z}7?Uz4D8(|oSpK2nB=%6)&sD+-bdP8akkp>EuoE;?TqIA~L%_ZG*%a$p0>C%W( zi=|x>5J5|Vg%pQ2ZHLI&q|g`~G;vUp7^BxA^_qX;DHPJgAKY-c?|U!r!}q@Tdr_(> z?p5r9Qwb;yrnpzJ3xXmPU3PE0WJwcM6!f?dC&9hAL&Hg&Cm4+qjYf$^gG{}fr5HmM zU_tzmdFI>>M3;vk4K8ttC%u1fb>+`@7TxgNPcJYx@5U2^v9SgM6mc=u?<)FX62T2B zv(h3CD9*AP7VKUn-bg*HEZ=}rP@I8_dRWlU`$_Mg`Yl{u(S@hs>#|5iconbRu6WCj zQ^46cr>x3XQgD`fgOYESvtH6}b=F`snIwQ`f0IY%8?O`cmY=fYP+ckhQxmVO=HnCM_EP)|Vp0 z!h3ZGD;D01g_w*c%ooo8ctTT}3lZwu?v=``VR7+IG84=Ax1e!rh|I$fEQ#@siS zw>eJd(Iw;qa+$p5I*)$a<<*-PB$G)1tX3;CGcz>}?BwJGpU=nI+8X2IRs&sG$FGPUUO#6y0(-XxVusU Date: Mon, 3 Apr 2017 18:05:43 -0400 Subject: [PATCH 04/13] Set the position of the node text to be on top. --- src/main/resources/static/js/algo/d3jsplot.js | 10 +++++----- src/main/resources/static/js/algo/d3jsplot.min.js | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/resources/static/js/algo/d3jsplot.js b/src/main/resources/static/js/algo/d3jsplot.js index 9c5d97d3..7b0dee89 100644 --- a/src/main/resources/static/js/algo/d3jsplot.js +++ b/src/main/resources/static/js/algo/d3jsplot.js @@ -226,11 +226,11 @@ function plotGraph(links) { // Position node text text.attr("x", function (d) { - return d.x + nodeRadius; - }) - .attr("y", function (d) { - return d.y + nodeRadius / 2; - }); + return d.x - (nodeRadius / 2); + }); + text.attr("y", function (d) { + return d.y - (1.5 * nodeRadius); + }); } // Position the edge link diff --git a/src/main/resources/static/js/algo/d3jsplot.min.js b/src/main/resources/static/js/algo/d3jsplot.min.js index c0b24df0..51732710 100644 --- a/src/main/resources/static/js/algo/d3jsplot.min.js +++ b/src/main/resources/static/js/algo/d3jsplot.min.js @@ -1 +1 @@ -function plotGraph(c){var r={};var v=window.innerWidth-40;var e=window.innerHeight-40;var x=6;var s=0;var h={};var y=0.1;c.forEach(function(z){z.source=r[z.source]||(r[z.source]={name:z.source});z.target=r[z.target]||(r[z.target]={name:z.target})});var r=Object.keys(r).map(function(z){return r[z]});var b=d3.zoom().scaleExtent([0.2,10]).on("zoom",n);var o=d3.select("#causal-graph").append("svg").attr("width",v).attr("height",e).call(b).on("dblclick.zoom",null);var a=o.append("g");var j=d3.forceSimulation(r).force("link",d3.forceLink().id(function(z){return z.index})).force("charge",d3.forceManyBody()).force("collide",d3.forceCollide(2)).force("center",d3.forceCenter(v/2,e/2)).on("tick",g);j.force("link").links(c);j.force("link").distance(60);for(i=0;i"){return"url(#marker-start-arrow)"}else{if(z.type==="o-o"||z.type==="o->"){return"url(#marker-start-circle)"}else{return""}}}).attr("marker-end",function(z){if(z.type==="-->"||z.type==="<->"||z.type==="o->"){return"url(#marker-end-arrow)"}else{if(z.type==="o-o"){return"url(#marker-end-circle)"}else{return""}}}).style("stroke",function(z){if(z.edgeProps!==null&&z.edgeProps.indexOf("dd")>=0){return d3.rgb(0,128,0)}}).style("stroke-dasharray",function(z){if(z.edgeProps!==null&&z.edgeProps.indexOf("nl")>=0){return(6,3)}});var t=a.append("g").selectAll(".node").data(r).enter().append("circle").attr("class","node").attr("r",x).on("dblclick",u).call(d3.drag().on("start",p).on("drag",l).on("end",q));var m=a.append("g").selectAll(".node-name").data(r).enter().append("text").attr("class","node-name").attr("x",8).attr("y",".31em").text(function(z){return z.name});function g(){t.attr("cx",function(z){return z.x=Math.max(x,Math.min(v-x,z.x))}).attr("cy",function(z){return z.y=Math.max(x,Math.min(e-x,z.y))});k.attr("d",f).each(function(){this.parentNode.insertBefore(this,this)});m.attr("x",function(z){return z.x+x}).attr("y",function(z){return z.y+x/2})}function f(z){return"M"+z.source.x+","+z.source.y+"L"+z.target.x+","+z.target.y}function n(){a.attr("transform",d3.event.transform)}function w(A,z){return h[A.index+","+z.index]}function u(){if(s===0){d=d3.select(this).node().__data__;t.style("opacity",function(z){return w(d,z)|w(z,d)?1:y});m.style("opacity",function(z){return w(d,z)|w(z,d)?1:y});k.style("opacity",function(z){return d.index===z.source.index|d.index===z.target.index?1:y});s=1}else{t.style("opacity",1);m.style("opacity",1);k.style("opacity",1);s=0}}function p(){if(!d3.event.active){j.alphaTarget(0.3).restart()}d3.event.subject.fx=d3.event.subject.x;d3.event.subject.fy=d3.event.subject.y}function l(){d3.event.subject.fx=d3.event.x;d3.event.subject.fy=d3.event.y}function q(){if(!d3.event.active){j.alphaTarget(0)}d3.event.subject.fx=null;d3.event.subject.fy=null}$("#searchBtn").click(function(){var C=$("#search").val();var B=a.selectAll(".node");if(C===""){B.style("stroke","white").style("stroke-width","1")}else{var z=B.filter(function(E,D){return E.name.toLowerCase()!==C.toLowerCase()});z.style("opacity","0");var A=a.selectAll(".link");A.style("opacity","0");d3.selectAll(".node, .link").transition().duration(5000).style("opacity",1)}})}; \ No newline at end of file +function plotGraph(c){var r={};var v=window.innerWidth-40;var e=window.innerHeight-40;var x=6;var s=0;var h={};var y=0.1;c.forEach(function(z){z.source=r[z.source]||(r[z.source]={name:z.source});z.target=r[z.target]||(r[z.target]={name:z.target})});var r=Object.keys(r).map(function(z){return r[z]});var b=d3.zoom().scaleExtent([0.2,10]).on("zoom",n);var o=d3.select("#causal-graph").append("svg").attr("width",v).attr("height",e).call(b).on("dblclick.zoom",null);var a=o.append("g");var j=d3.forceSimulation(r).force("link",d3.forceLink().id(function(z){return z.index})).force("charge",d3.forceManyBody()).force("collide",d3.forceCollide(2)).force("center",d3.forceCenter(v/2,e/2)).on("tick",g);j.force("link").links(c);j.force("link").distance(60);for(i=0;i"){return"url(#marker-start-arrow)"}else{if(z.type==="o-o"||z.type==="o->"){return"url(#marker-start-circle)"}else{return""}}}).attr("marker-end",function(z){if(z.type==="-->"||z.type==="<->"||z.type==="o->"){return"url(#marker-end-arrow)"}else{if(z.type==="o-o"){return"url(#marker-end-circle)"}else{return""}}}).style("stroke",function(z){if(z.edgeProps!==null&&z.edgeProps.indexOf("dd")>=0){return d3.rgb(0,128,0)}}).style("stroke-dasharray",function(z){if(z.edgeProps!==null&&z.edgeProps.indexOf("nl")>=0){return(6,3)}});var t=a.append("g").selectAll(".node").data(r).enter().append("circle").attr("class","node").attr("r",x).on("dblclick",u).call(d3.drag().on("start",p).on("drag",l).on("end",q));var m=a.append("g").selectAll(".node-name").data(r).enter().append("text").attr("class","node-name").attr("x",8).attr("y",".31em").text(function(z){return z.name});function g(){t.attr("cx",function(z){return z.x=Math.max(x,Math.min(v-x,z.x))}).attr("cy",function(z){return z.y=Math.max(x,Math.min(e-x,z.y))});k.attr("d",f).each(function(){this.parentNode.insertBefore(this,this)});m.attr("x",function(z){return z.x-(x/2)});m.attr("y",function(z){return z.y-(1.5*x)})}function f(z){return"M"+z.source.x+","+z.source.y+"L"+z.target.x+","+z.target.y}function n(){a.attr("transform",d3.event.transform)}function w(A,z){return h[A.index+","+z.index]}function u(){if(s===0){d=d3.select(this).node().__data__;t.style("opacity",function(z){return w(d,z)|w(z,d)?1:y});m.style("opacity",function(z){return w(d,z)|w(z,d)?1:y});k.style("opacity",function(z){return d.index===z.source.index|d.index===z.target.index?1:y});s=1}else{t.style("opacity",1);m.style("opacity",1);k.style("opacity",1);s=0}}function p(){if(!d3.event.active){j.alphaTarget(0.3).restart()}d3.event.subject.fx=d3.event.subject.x;d3.event.subject.fy=d3.event.subject.y}function l(){d3.event.subject.fx=d3.event.x;d3.event.subject.fy=d3.event.y}function q(){if(!d3.event.active){j.alphaTarget(0)}d3.event.subject.fx=null;d3.event.subject.fy=null}$("#searchBtn").click(function(){var C=$("#search").val();var B=a.selectAll(".node");if(C===""){B.style("stroke","white").style("stroke-width","1")}else{var z=B.filter(function(E,D){return E.name.toLowerCase()!==C.toLowerCase()});z.style("opacity","0");var A=a.selectAll(".link");A.style("opacity","0");d3.selectAll(".node, .link").transition().duration(5000).style("opacity",1)}})}; \ No newline at end of file From dffd8dcbaef32f0ee04ebc3fd00e0145e30611a4 Mon Sep 17 00:00:00 2001 From: Kevin Bui Date: Mon, 3 Apr 2017 18:11:28 -0400 Subject: [PATCH 05/13] Changed PNG extensions to lowercase. --- .../img/pags/{ab_bidirect.PNG => ab_bidirect.png} | Bin .../img/pags/{ab_direct.PNG => ab_direct.png} | Bin .../pags/{ab_pd_bidirect.PNG => ab_pd_bidirect.png} | Bin .../img/pags/{ab_pd_direct.PNG => ab_pd_direct.png} | Bin ...{small_ab_bidirect.PNG => small_ab_bidirect.png} | Bin .../{small_ab_direct.PNG => small_ab_direct.png} | Bin ...ll_ab_pd_bidrect.PNG => small_ab_pd_bidrect.png} | Bin ...mall_ab_pd_direct.PNG => small_ab_pd_direct.png} | Bin 8 files changed, 0 insertions(+), 0 deletions(-) rename src/main/resources/static/img/pags/{ab_bidirect.PNG => ab_bidirect.png} (100%) rename src/main/resources/static/img/pags/{ab_direct.PNG => ab_direct.png} (100%) rename src/main/resources/static/img/pags/{ab_pd_bidirect.PNG => ab_pd_bidirect.png} (100%) rename src/main/resources/static/img/pags/{ab_pd_direct.PNG => ab_pd_direct.png} (100%) rename src/main/resources/static/img/pags/{small_ab_bidirect.PNG => small_ab_bidirect.png} (100%) rename src/main/resources/static/img/pags/{small_ab_direct.PNG => small_ab_direct.png} (100%) rename src/main/resources/static/img/pags/{small_ab_pd_bidrect.PNG => small_ab_pd_bidrect.png} (100%) rename src/main/resources/static/img/pags/{small_ab_pd_direct.PNG => small_ab_pd_direct.png} (100%) diff --git a/src/main/resources/static/img/pags/ab_bidirect.PNG b/src/main/resources/static/img/pags/ab_bidirect.png similarity index 100% rename from src/main/resources/static/img/pags/ab_bidirect.PNG rename to src/main/resources/static/img/pags/ab_bidirect.png diff --git a/src/main/resources/static/img/pags/ab_direct.PNG b/src/main/resources/static/img/pags/ab_direct.png similarity index 100% rename from src/main/resources/static/img/pags/ab_direct.PNG rename to src/main/resources/static/img/pags/ab_direct.png diff --git a/src/main/resources/static/img/pags/ab_pd_bidirect.PNG b/src/main/resources/static/img/pags/ab_pd_bidirect.png similarity index 100% rename from src/main/resources/static/img/pags/ab_pd_bidirect.PNG rename to src/main/resources/static/img/pags/ab_pd_bidirect.png diff --git a/src/main/resources/static/img/pags/ab_pd_direct.PNG b/src/main/resources/static/img/pags/ab_pd_direct.png similarity index 100% rename from src/main/resources/static/img/pags/ab_pd_direct.PNG rename to src/main/resources/static/img/pags/ab_pd_direct.png diff --git a/src/main/resources/static/img/pags/small_ab_bidirect.PNG b/src/main/resources/static/img/pags/small_ab_bidirect.png similarity index 100% rename from src/main/resources/static/img/pags/small_ab_bidirect.PNG rename to src/main/resources/static/img/pags/small_ab_bidirect.png diff --git a/src/main/resources/static/img/pags/small_ab_direct.PNG b/src/main/resources/static/img/pags/small_ab_direct.png similarity index 100% rename from src/main/resources/static/img/pags/small_ab_direct.PNG rename to src/main/resources/static/img/pags/small_ab_direct.png diff --git a/src/main/resources/static/img/pags/small_ab_pd_bidrect.PNG b/src/main/resources/static/img/pags/small_ab_pd_bidrect.png similarity index 100% rename from src/main/resources/static/img/pags/small_ab_pd_bidrect.PNG rename to src/main/resources/static/img/pags/small_ab_pd_bidrect.png diff --git a/src/main/resources/static/img/pags/small_ab_pd_direct.PNG b/src/main/resources/static/img/pags/small_ab_pd_direct.png similarity index 100% rename from src/main/resources/static/img/pags/small_ab_pd_direct.PNG rename to src/main/resources/static/img/pags/small_ab_pd_direct.png From 2924794be8c47ebca1e7f88cebb92a7031270d10 Mon Sep 17 00:00:00 2001 From: Kevin Bui Date: Mon, 3 Apr 2017 18:14:10 -0400 Subject: [PATCH 06/13] Added PAG descriptions. --- .../resources/templates/algorithm/plot.html | 70 +++++++++++++++++-- 1 file changed, 66 insertions(+), 4 deletions(-) diff --git a/src/main/resources/templates/algorithm/plot.html b/src/main/resources/templates/algorithm/plot.html index 9f428257..5da586f1 100644 --- a/src/main/resources/templates/algorithm/plot.html +++ b/src/main/resources/templates/algorithm/plot.html @@ -34,13 +34,75 @@
    -
  • You can use the mouse wheel to zoom in/out this graph.
  • -
  • You can drag the entire graph by dragging an empty space on the graph.
  • -
  • You can highlight a node and all the edges of this node by double clicking the node, and double clicking again on any node to disable the highlighting.
  • -
  • You can search and locate a node by entering its name(case-insensitive) in the search box.
  • +
  • You can use the mouse wheel to zoom in/out this graph.
  • +
  • You can drag the entire graph by dragging an empty space on the graph.
  • +
  • You can highlight a node and all the edges of this node by double clicking the node, and double clicking again on any node to disable the highlighting.
  • +
  • You can search and locate a node by entering its name(case-insensitive) in the search box.
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Edge TypesPresent RelationshipsAbsent Relationships
A --> B + A is a cause of B.
+ It may be a direct or indirect cause that may include other measured variables. Also, there may be an unmeasured confounder of A and B. +
B is not a cause of A
A <-> BThere is an unmeasured confounder (call it L) of A and B. There may be measured variables along the causal pathway from L to A or from L to B. + A is not a cause of B.
+ B is not a cause of A. +
A o-> BEither A is a cause of B (i.e, A --> B) or there is an unmeasured confounder of A and B (i.e, A <-> B) or both.B is not a cause of A.
A o-o B + Exactly one of the following holds: +
    +
  1. A is a cause of B
  2. +
  3. B is a cause of A
  4. +
  5. there is an unmeasured confounder of A and B
  6. +
  7. both a and c
  8. +
  9. both b and c
  10. +
+
If an edge is dashed that means there is no latent confounder. Otherwise, there is possibly latent confounder.
If an edge is green that means it is definitely direct. Otherwise, it is possibly direct.
+
+
+
+
From df2a7a76d6c928ced776bd59d5172e35ffb051c5 Mon Sep 17 00:00:00 2001 From: Kevin Bui Date: Mon, 3 Apr 2017 18:29:20 -0400 Subject: [PATCH 07/13] Updated version number. --- src/main/resources/ccd.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/ccd.properties b/src/main/resources/ccd.properties index e83afc3a..306100d6 100644 --- a/src/main/resources/ccd.properties +++ b/src/main/resources/ccd.properties @@ -44,7 +44,7 @@ ccd.email.admin.sendto=${spring.mail.username} ccd.acct.reg.activ.required=false # LABELS -ccd.app.title=Causal Web v1.3.2 +ccd.app.title=Causal Web v1.3.3 ccd.app.copyright=University of Pittsburgh and Carnegie Mellon University ccd.app.agreement=TERMS AND CONDITIONS \ From e0ed746aee04f31189291f3894ee39b52273df1c Mon Sep 17 00:00:00 2001 From: Zhou Yuan Date: Fri, 7 Apr 2017 14:59:30 -0400 Subject: [PATCH 08/13] Fixed d3 graph node bounding issue --- src/main/resources/static/js/algo/d3jsplot.js | 31 ++++++++----------- .../resources/static/js/algo/d3jsplot.min.js | 3 +- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/main/resources/static/js/algo/d3jsplot.js b/src/main/resources/static/js/algo/d3jsplot.js index 7b0dee89..384a3697 100644 --- a/src/main/resources/static/js/algo/d3jsplot.js +++ b/src/main/resources/static/js/algo/d3jsplot.js @@ -70,13 +70,12 @@ function plotGraph(links) { // Default distance accessor is 30 simulation.force("link") - .distance(60); + .distance(50); // Each node conects to itself, so we can highlight this node when it's selected for (i = 0; i < nodes.length; i++) { linkedByIndex[i + "," + i] = 1; } - ; // Add all the connections based on links // Must call this after simulation.force("link").links(links) @@ -208,29 +207,25 @@ function plotGraph(links) { function ticked() { // Position nodes node.attr("cx", function (d) { - // This makes sure the nodes won't go out of the container - // Bounding box example: http://mbostock.github.io/d3/talk/20110921/bounding.html - return d.x = Math.max(nodeRadius, Math.min(svgWidth - nodeRadius, d.x)); - //return d.x; - }) - .attr("cy", function (d) { - return d.y = Math.max(nodeRadius, Math.min(svgHeight - nodeRadius, d.y)); - //return d.y; - }); + return d.x; + }) + .attr("cy", function (d) { + return d.y; + }); // Position links // Use path instead of line since IE 10 doesn't render the links correctly link.attr("d", positionLink).each(function () { - this.parentNode.insertBefore(this, this); - }); + this.parentNode.insertBefore(this, this); + }); // Position node text text.attr("x", function (d) { - return d.x - (nodeRadius / 2); - }); - text.attr("y", function (d) { - return d.y - (1.5 * nodeRadius); - }); + return d.x - (nodeRadius / 2); + }) + .attr("y", function (d) { + return d.y - (1.5 * nodeRadius); + }); } // Position the edge link diff --git a/src/main/resources/static/js/algo/d3jsplot.min.js b/src/main/resources/static/js/algo/d3jsplot.min.js index 51732710..980883dd 100644 --- a/src/main/resources/static/js/algo/d3jsplot.min.js +++ b/src/main/resources/static/js/algo/d3jsplot.min.js @@ -1 +1,2 @@ -function plotGraph(c){var r={};var v=window.innerWidth-40;var e=window.innerHeight-40;var x=6;var s=0;var h={};var y=0.1;c.forEach(function(z){z.source=r[z.source]||(r[z.source]={name:z.source});z.target=r[z.target]||(r[z.target]={name:z.target})});var r=Object.keys(r).map(function(z){return r[z]});var b=d3.zoom().scaleExtent([0.2,10]).on("zoom",n);var o=d3.select("#causal-graph").append("svg").attr("width",v).attr("height",e).call(b).on("dblclick.zoom",null);var a=o.append("g");var j=d3.forceSimulation(r).force("link",d3.forceLink().id(function(z){return z.index})).force("charge",d3.forceManyBody()).force("collide",d3.forceCollide(2)).force("center",d3.forceCenter(v/2,e/2)).on("tick",g);j.force("link").links(c);j.force("link").distance(60);for(i=0;i"){return"url(#marker-start-arrow)"}else{if(z.type==="o-o"||z.type==="o->"){return"url(#marker-start-circle)"}else{return""}}}).attr("marker-end",function(z){if(z.type==="-->"||z.type==="<->"||z.type==="o->"){return"url(#marker-end-arrow)"}else{if(z.type==="o-o"){return"url(#marker-end-circle)"}else{return""}}}).style("stroke",function(z){if(z.edgeProps!==null&&z.edgeProps.indexOf("dd")>=0){return d3.rgb(0,128,0)}}).style("stroke-dasharray",function(z){if(z.edgeProps!==null&&z.edgeProps.indexOf("nl")>=0){return(6,3)}});var t=a.append("g").selectAll(".node").data(r).enter().append("circle").attr("class","node").attr("r",x).on("dblclick",u).call(d3.drag().on("start",p).on("drag",l).on("end",q));var m=a.append("g").selectAll(".node-name").data(r).enter().append("text").attr("class","node-name").attr("x",8).attr("y",".31em").text(function(z){return z.name});function g(){t.attr("cx",function(z){return z.x=Math.max(x,Math.min(v-x,z.x))}).attr("cy",function(z){return z.y=Math.max(x,Math.min(e-x,z.y))});k.attr("d",f).each(function(){this.parentNode.insertBefore(this,this)});m.attr("x",function(z){return z.x-(x/2)});m.attr("y",function(z){return z.y-(1.5*x)})}function f(z){return"M"+z.source.x+","+z.source.y+"L"+z.target.x+","+z.target.y}function n(){a.attr("transform",d3.event.transform)}function w(A,z){return h[A.index+","+z.index]}function u(){if(s===0){d=d3.select(this).node().__data__;t.style("opacity",function(z){return w(d,z)|w(z,d)?1:y});m.style("opacity",function(z){return w(d,z)|w(z,d)?1:y});k.style("opacity",function(z){return d.index===z.source.index|d.index===z.target.index?1:y});s=1}else{t.style("opacity",1);m.style("opacity",1);k.style("opacity",1);s=0}}function p(){if(!d3.event.active){j.alphaTarget(0.3).restart()}d3.event.subject.fx=d3.event.subject.x;d3.event.subject.fy=d3.event.subject.y}function l(){d3.event.subject.fx=d3.event.x;d3.event.subject.fy=d3.event.y}function q(){if(!d3.event.active){j.alphaTarget(0)}d3.event.subject.fx=null;d3.event.subject.fy=null}$("#searchBtn").click(function(){var C=$("#search").val();var B=a.selectAll(".node");if(C===""){B.style("stroke","white").style("stroke-width","1")}else{var z=B.filter(function(E,D){return E.name.toLowerCase()!==C.toLowerCase()});z.style("opacity","0");var A=a.selectAll(".link");A.style("opacity","0");d3.selectAll(".node, .link").transition().duration(5000).style("opacity",1)}})}; \ No newline at end of file + +function plotGraph(c){var r={};var v=window.innerWidth-40;var e=window.innerHeight-40;var x=6;var s=0;var h={};var y=0.1;c.forEach(function(z){z.source=r[z.source]||(r[z.source]={name:z.source});z.target=r[z.target]||(r[z.target]={name:z.target})});var r=Object.keys(r).map(function(z){return r[z]});var b=d3.zoom().scaleExtent([0.2,10]).on("zoom",n);var o=d3.select("#causal-graph").append("svg").attr("width",v).attr("height",e).call(b).on("dblclick.zoom",null);var a=o.append("g");var j=d3.forceSimulation(r).force("link",d3.forceLink().id(function(z){return z.index})).force("charge",d3.forceManyBody()).force("collide",d3.forceCollide(2)).force("center",d3.forceCenter(v/2,e/2)).on("tick",g);j.force("link").links(c);j.force("link").distance(50);for(i=0;i"){return"url(#marker-start-arrow)"}else{if(z.type==="o-o"||z.type==="o->"){return"url(#marker-start-circle)"}else{return""}}}).attr("marker-end",function(z){if(z.type==="-->"||z.type==="<->"||z.type==="o->"){return"url(#marker-end-arrow)"}else{if(z.type==="o-o"){return"url(#marker-end-circle)"}else{return""}}}).style("stroke",function(z){if(z.edgeProps!==null&&z.edgeProps.indexOf("dd")>=0){return d3.rgb(0,128,0)}}).style("stroke-dasharray",function(z){if(z.edgeProps!==null&&z.edgeProps.indexOf("nl")>=0){return(6,3)}});var t=a.append("g").selectAll(".node").data(r).enter().append("circle").attr("class","node").attr("r",x).on("dblclick",u).call(d3.drag().on("start",p).on("drag",l).on("end",q));var m=a.append("g").selectAll(".node-name").data(r).enter().append("text").attr("class","node-name").attr("x",8).attr("y",".31em").text(function(z){return z.name});function g(){t.attr("cx",function(z){return z.x}).attr("cy",function(z){return z.y});k.attr("d",f).each(function(){this.parentNode.insertBefore(this,this)});m.attr("x",function(z){return z.x-(x/2)}).attr("y",function(z){return z.y-(1.5*x)})}function f(z){return"M"+z.source.x+","+z.source.y+"L"+z.target.x+","+z.target.y}function n(){a.attr("transform",d3.event.transform)}function w(A,z){return h[A.index+","+z.index]}function u(){if(s===0){d=d3.select(this).node().__data__;t.style("opacity",function(z){return w(d,z)|w(z,d)?1:y});m.style("opacity",function(z){return w(d,z)|w(z,d)?1:y});k.style("opacity",function(z){return d.index===z.source.index|d.index===z.target.index?1:y});s=1}else{t.style("opacity",1);m.style("opacity",1);k.style("opacity",1);s=0}}function p(){if(!d3.event.active){j.alphaTarget(0.3).restart()}d3.event.subject.fx=d3.event.subject.x;d3.event.subject.fy=d3.event.subject.y}function l(){d3.event.subject.fx=d3.event.x;d3.event.subject.fy=d3.event.y}function q(){if(!d3.event.active){j.alphaTarget(0)}d3.event.subject.fx=null;d3.event.subject.fy=null}$("#searchBtn").click(function(){var C=$("#search").val();var B=a.selectAll(".node");if(C===""){B.style("stroke","white").style("stroke-width","1")}else{var z=B.filter(function(E,D){return E.name.toLowerCase()!==C.toLowerCase()});z.style("opacity","0");var A=a.selectAll(".link");A.style("opacity","0");d3.selectAll(".node, .link").transition().duration(5000).style("opacity",1)}})}; \ No newline at end of file From f75a610c7f3bee8f6dc17cb75dd339336811ed00 Mon Sep 17 00:00:00 2001 From: Kevin Bui Date: Mon, 15 May 2017 10:56:01 -0400 Subject: [PATCH 09/13] Changed project version to 1.3.4. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 48a54d2f..728af279 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ edu.pitt.dbmi causal-web - 1.3.3 + 1.3.4 jar causal-web From 943a883a21ed624b1347aebae751230d0d726363 Mon Sep 17 00:00:00 2001 From: Kevin Bui Date: Mon, 15 May 2017 11:11:49 -0400 Subject: [PATCH 10/13] Changed version property. --- src/main/resources/ccd.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/ccd.properties b/src/main/resources/ccd.properties index 306100d6..79f81bb5 100644 --- a/src/main/resources/ccd.properties +++ b/src/main/resources/ccd.properties @@ -44,7 +44,7 @@ ccd.email.admin.sendto=${spring.mail.username} ccd.acct.reg.activ.required=false # LABELS -ccd.app.title=Causal Web v1.3.3 +ccd.app.title=Causal Web v1.3.4 ccd.app.copyright=University of Pittsburgh and Carnegie Mellon University ccd.app.agreement=TERMS AND CONDITIONS \ From af34c993640e3ca26ee561400049c6e6f4cd9c9c Mon Sep 17 00:00:00 2001 From: Kevin Bui Date: Mon, 15 May 2017 11:14:03 -0400 Subject: [PATCH 11/13] Changed version in banner. --- src/main/resources/banner.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/resources/banner.txt b/src/main/resources/banner.txt index 05113a83..c51b08e1 100644 --- a/src/main/resources/banner.txt +++ b/src/main/resources/banner.txt @@ -1,7 +1,7 @@ - ██████╗ █████╗ ██╗ ██╗███████╗ █████╗ ██╗ ██╗ ██╗███████╗██████╗ ██╗ ██████╗ ██████╗ -██╔════╝██╔══██╗██║ ██║██╔════╝██╔══██╗██║ ██║ ██║██╔════╝██╔══██╗ ███║ ╚════██╗ ╚════██╗ -██║ ███████║██║ ██║███████╗███████║██║ ██║ █╗ ██║█████╗ ██████╔╝ ╚██║ █████╔╝ █████╔╝ -██║ ██╔══██║██║ ██║╚════██║██╔══██║██║ ██║███╗██║██╔══╝ ██╔══██╗ ██║ ╚═══██╗ ██╔═══╝ -╚██████╗██║ ██║╚██████╔╝███████║██║ ██║███████╗ ╚███╔███╔╝███████╗██████╔╝ ██║██╗██████╔╝██╗███████╗ - ╚═════╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚══════╝ ╚══╝╚══╝ ╚══════╝╚═════╝ ╚═╝╚═╝╚═════╝ ╚═╝╚══════╝ + ██████╗ █████╗ ██╗ ██╗███████╗ █████╗ ██╗ ██╗ ██╗███████╗██████╗ ██╗ ██████╗ ██╗ ██╗ +██╔════╝██╔══██╗██║ ██║██╔════╝██╔══██╗██║ ██║ ██║██╔════╝██╔══██╗ ███║ ╚════██╗██║ ██║ +██║ ███████║██║ ██║███████╗███████║██║ ██║ █╗ ██║█████╗ ██████╔╝ ╚██║ █████╔╝███████║ +██║ ██╔══██║██║ ██║╚════██║██╔══██║██║ ██║███╗██║██╔══╝ ██╔══██╗ ██║ ╚═══██╗╚════██║ +╚██████╗██║ ██║╚██████╔╝███████║██║ ██║███████╗ ╚███╔███╔╝███████╗██████╔╝ ██║██╗██████╔╝██╗ ██║ + ╚═════╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚══════╝ ╚══╝╚══╝ ╚══════╝╚═════╝ ╚═╝╚═╝╚═════╝ ╚═╝ ╚═╝ From 689e7bac7cab9fee1962d38367cbccf59b63c19c Mon Sep 17 00:00:00 2001 From: Kevin Bui Date: Mon, 15 May 2017 12:33:21 -0400 Subject: [PATCH 12/13] Added logic to show PAG edge descriptions only when the result is GFCI. --- .../ctrl/algo/AlgorithmResultController.java | 1 + .../service/algo/AlgorithmResultService.java | 18 ++++++++++++++++++ .../resources/templates/algorithm/plot.html | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/main/java/edu/pitt/dbmi/ccd/web/ctrl/algo/AlgorithmResultController.java b/src/main/java/edu/pitt/dbmi/ccd/web/ctrl/algo/AlgorithmResultController.java index 047b2603..f4f352c5 100644 --- a/src/main/java/edu/pitt/dbmi/ccd/web/ctrl/algo/AlgorithmResultController.java +++ b/src/main/java/edu/pitt/dbmi/ccd/web/ctrl/algo/AlgorithmResultController.java @@ -101,6 +101,7 @@ public String showPlot( String username = appUser.getUsername(); List categoryNames = Arrays.asList("Runtime Parameters", "Dataset", "Filters", "FGS Parameters", "Run Options", "Algorithm Parameters", "Data Validations"); model.addAttribute("categories", algorithmResultService.extractDataCategories(fileName, username, categoryNames)); + model.addAttribute("isPag", algorithmResultService.isPagResult(fileName, username)); return PLOT_VIEW; } diff --git a/src/main/java/edu/pitt/dbmi/ccd/web/service/algo/AlgorithmResultService.java b/src/main/java/edu/pitt/dbmi/ccd/web/service/algo/AlgorithmResultService.java index 426cbc35..fa225f3e 100644 --- a/src/main/java/edu/pitt/dbmi/ccd/web/service/algo/AlgorithmResultService.java +++ b/src/main/java/edu/pitt/dbmi/ccd/web/service/algo/AlgorithmResultService.java @@ -35,6 +35,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; +import java.util.Scanner; import java.util.Set; import java.util.regex.Pattern; import java.util.stream.Collectors; @@ -172,6 +173,23 @@ public List listResultFileInfo(final String username) { return Arrays.asList(array); } + public boolean isPagResult(final String fileName, final String username) { + boolean isPag = false; + + Path file = Paths.get(workspace, username, resultFolder, algorithmResultFolder, fileName); + try (Scanner scanner = new Scanner(Files.newBufferedReader(file))) { + scanner.nextLine(); // skip the first line + String line = scanner.nextLine(); + if (line != null) { + isPag = line.trim().contains("GFCI"); + } + } catch (IOException exception) { + LOGGER.error(String.format("Unable to read file '%s'.", fileName), exception); + } + + return isPag; + } + public Map> extractDataCategories(final String fileName, final String username, final List categoryNames) { Map> info = new LinkedHashMap<>(); categoryNames.forEach(key -> { diff --git a/src/main/resources/templates/algorithm/plot.html b/src/main/resources/templates/algorithm/plot.html index 5da586f1..b4ee082c 100644 --- a/src/main/resources/templates/algorithm/plot.html +++ b/src/main/resources/templates/algorithm/plot.html @@ -41,7 +41,7 @@
-
+
From 37a5a63242e3c577291fe848ef7e470ebf59c947 Mon Sep 17 00:00:00 2001 From: Kevin Bui Date: Wed, 17 May 2017 16:49:14 -0400 Subject: [PATCH 13/13] Updated readme file. --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index ea3059b7..c868be21 100644 --- a/README.md +++ b/README.md @@ -17,17 +17,17 @@ If you want to host the application with your own hardware, follow the instructi #### Dependencies Download and uncompress the source code for each of following dependencies: -* [ccd-job-queue-0.1.6](https://github.com/bd2kccd/ccd-job-queue/releases/tag/v0.1.6) -* [ccd-mail-0.2.2](https://github.com/bd2kccd/ccd-mail/releases/tag/v0.2.2) -* [ccd-db-0.6.3](https://github.com/bd2kccd/ccd-db/releases/tag/v0.6.3) +* [ccd-job-queue-0.1.7](https://github.com/bd2kccd/ccd-job-queue/releases/tag/v0.1.7) +* [ccd-mail-0.2.3](https://github.com/bd2kccd/ccd-mail/releases/tag/v0.2.3) +* [ccd-db-0.6.4](https://github.com/bd2kccd/ccd-db/releases/tag/v0.6.4) * [ccd-commons-0.3.1](https://github.com/bd2kccd/ccd-commons/releases/tag/v0.3.1) To install the dependencies, go to the top directory of each project and do a maven install by typing **mvn install**. #### Application -Download and uncompress the application source code [causal-web-1.3.1](https://github.com/bd2kccd/causal-web/releases/tag/v1.3.1). To compile and build the application, go to the directory **causal-web-1.3.1** and type **mvn package**. +Download and uncompress the application source code [causal-web-1.3.4](https://github.com/bd2kccd/causal-web/releases/tag/v1.3.4). To compile and build the application, go to the directory **causal-web-1.3.4** and type **mvn package**. #### External Dependencies -* [causal-cmd-6.0.1-SNAPSHOT-jar-with-dependencies.jar](https://github.com/cmu-phil/tetrad/releases/tag/v6.0.1-20161122) +* [causal-cmd-0.1.2-jar-with-dependencies.jar](https://github.com/bd2kccd/causal-cmd/releases/tag/v0.1.2) ## Configure the software @@ -35,10 +35,10 @@ Download and uncompress the application source code [causal-web-1.3.1](https:// First, you need to create a workspace for the application to work in. Create a directory called **workspace**, for an example ***/home/tuser/workspace***. Inside the workspace directory, create another folder called **lib**, for example ***/home/tuser/workspace/lib***. -Copy the **causal-cmd-6.0.1.jar** to the **workspace/lib** folder. +Copy the **causal-cmd-0.1.2-jar-with-dependencies.jar** to the **workspace/lib** folder. ### Configure -There are 4 configuration files to configure located in causal-web-1.3.1/src/main/resources folder: +There are 4 configuration files to configure located in causal-web-1.3.4/src/main/resources folder: 1. **application-hsqldb.properties**: HSQLDB database configurations (for testing only). 2. **application-mysql.properties**: MySQL database configurations 3. **application.properties**: Spring Boot configurations @@ -74,15 +74,15 @@ spring.profiles.active=scheduler,mysql Make sure you set **ccd.server.workspace=/home/tuser/workspace** and **ccd.folder.lib=lib** in the **ccd.properties** file. ## Compile the Program -Go to the **causal-web** directory and run the command **mvn clean package**. This will create a jar file called **causal-web-1.3.1.jar** in the **/target** folder. +Go to the **causal-web** directory and run the command **mvn clean package**. This will create a jar file called **causal-web-1.3.4.jar** in the **/target** folder. ### Launch the Program ```java -java -jar causal-web-1.3.1.jar +java -jar causal-web-1.3.4.jar ``` To give the program 4GB of memory to run on, type the follow, using the jvm options: ```java -java -Xmx4G -jar causal-web-1.3.1.jar +java -Xmx4G -jar causal-web-1.3.4.jar ``` To launch app in the browser