Skip to content

Commit

Permalink
Merge pull request #654 from chgibb/beta-staging
Browse files Browse the repository at this point in the history
Non-Interactive Figures
  • Loading branch information
chgibb authored Sep 15, 2017
2 parents 5674ece + 7dfe017 commit 04378ad
Show file tree
Hide file tree
Showing 42 changed files with 992 additions and 495 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ PHAT is under development in the Zehbe Lab ([http://zehbelab.weebly.com/](http:/
**Project Supervisor/Principal Investigator:** Dr. Ingeborg Zehbe, LU/TBRHRI Research Chair & Senior Scientist
**Project Lead/Biologist:** Robert Jackson, PhD Biotech Candidate
**Project Lead/Software Developer:** Chris Gibb, HBSc Comp Sci Student
**Team Members:** Mitchell Pynn, Shane Liu, Jeremy Braun
**Team Members:** Mitchell Pynn, Shane Liu, Jeremy Braun, Nick Catanzaro, Zachary Moorman

**How to Cite PHAT (pre-print):**

Gibb CM, Jackson R, Mohammed S, Fiaidhi J, Zehbe I. Pathogen-Host Analysis Tool (PHAT): an Integrative Platform to Analyze Pathogen-Host Relationships in Next-Generation Sequencing Data. bioRxiv. https://doi.org/10.1101/178327
Gibb CM, Jackson R, Mohammed S, Fiaidhi J, Zehbe I. Pathogen-Host Analysis Tool (PHAT): an Integrative Platform to Analyze Pathogen-Host Relationships in Next-Generation Sequencing Data. bioRxiv. https://doi.org/10.1101/178327
9 changes: 5 additions & 4 deletions src/CheckForUpdateProcess.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {AtomicOperationForkEvent,CompletionFlags} from "./req/atomicOperationsIPC";
import * as atomic from "./req/operations/atomicOperations";
import * as getUpdate from "./req/getLatestUpdate";

let flags : CompletionFlags = new CompletionFlags();
Expand Down Expand Up @@ -28,7 +29,7 @@ process.on
data : res
}
);
process.exit(0);
atomic.exitFork(0);
}).catch((arg : any) => {
console.log(arg);
flags.done = true;
Expand All @@ -41,7 +42,7 @@ process.on
data : arg
}
);
process.exit(1);
atomic.exitFork(1);
});
}
}
Expand All @@ -58,7 +59,7 @@ process.on
data : err.message
}
);
process.exit(1);
atomic.exitFork(1);
});
process.on("unhandledRejection",function(err : Error){
console.log(err);
Expand All @@ -72,5 +73,5 @@ process.on("unhandledRejection",function(err : Error){
data : err.message
}
);
process.exit(1);
atomic.exitFork(1);
});
7 changes: 4 additions & 3 deletions src/DownloadAndInstallUpdateProcess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as cp from "child_process";

let GitHubReleases = require("github-releases");

import * as atomic from "./req/operations/atomicOperations";
import {AtomicOperationForkEvent,CompletionFlags} from "./req/atomicOperationsIPC";
import {getReadable} from "./req/getAppPath";

Expand Down Expand Up @@ -71,7 +72,7 @@ process.on
);
installer.unref();
}
process.exit(0);
atomic.exitFork(0);

});
});
Expand All @@ -90,7 +91,7 @@ process.on
data : err
}
);
process.exit(1);
atomic.exitFork(1);
});
process.on("unhandledRejection",function(err : string){
console.log("ERROR "+err);
Expand All @@ -104,5 +105,5 @@ process.on("unhandledRejection",function(err : string){
data : err
}
);
process.exit(1);
atomic.exitFork(1);
});
2 changes: 1 addition & 1 deletion src/InputBamFileProcess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ process.on(
flags.done = true
flags.success = true;
update();
process.exit(0);
atomic.exitFork(0);
})();
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/LinkRefSeqToAlignmentProcess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ process.on(
flags.success = true;
update();

process.exit(0);
atomic.exitFork(0);
})();
}
}
Expand Down
9 changes: 5 additions & 4 deletions src/OpenProjectProcess.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as atomic from "./req/operations/atomicOperations";
import {AtomicOperationForkEvent,CompletionFlags} from "./req/atomicOperationsIPC";
import {ProjectManifest} from "./req/projectManifest";
import {openProject} from "./req//openProject";
Expand Down Expand Up @@ -40,7 +41,7 @@ process.on
flags : flags,
}
);
process.exit(0);
atomic.exitFork(0);
}).catch((err) => {
flags.done = true;
flags.failure = true;
Expand All @@ -52,7 +53,7 @@ process.on
data : err
}
);
process.exit(1);
atomic.exitFork(1);
});
}
}
Expand All @@ -69,7 +70,7 @@ process.on
data : err
}
);
process.exit(1);
atomic.exitFork(1);
});

process.on("unhandledRejection",function(err : string){
Expand All @@ -84,5 +85,5 @@ process.on("unhandledRejection",function(err : string){
data : err
}
);
process.exit(1);
atomic.exitFork(1);
});
5 changes: 3 additions & 2 deletions src/RenderCoverageTrackProcess.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as atomic from "./req/operations/atomicOperations";
import {AtomicOperationForkEvent,CompletionFlags} from "./req/atomicOperationsIPC";
import {AlignData} from "./req/alignData"
import * as cf from "./req/renderer/circularFigure";
Expand Down Expand Up @@ -39,7 +40,7 @@ process.on
}
}
);
process.exit(0);
atomic.exitFork(0);
});
}
}
Expand All @@ -55,5 +56,5 @@ process.on
data : err
}
);
process.exit(1);
atomic.exitFork(1);
});
7 changes: 4 additions & 3 deletions src/RenderSNPTrackProcess.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as atomic from "./req/operations/atomicOperations";
import {AtomicOperationForkEvent,CompletionFlags} from "./req/atomicOperationsIPC";
import {AlignData} from "./req/alignData"
import * as cf from "./req/renderer/circularFigure";
Expand Down Expand Up @@ -39,7 +40,7 @@ process.on
}
}
);
process.exit(0);
atomic.exitFork(0);
});
}
}
Expand All @@ -56,7 +57,7 @@ process.on
data : err
}
);
process.exit(1);
atomic.exitFork(1);
});

process.on("unhandledRejection",function(err : string){
Expand All @@ -71,5 +72,5 @@ process.on("unhandledRejection",function(err : string){
data : err
}
);
process.exit(1);
atomic.exitFork(1);
});
2 changes: 1 addition & 1 deletion src/RunAlignmentProcess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ process.on(
flags.done = true;
flags.success = true;
update();
process.exit(0);
atomic.exitFork(0);

});
});
Expand Down
8 changes: 4 additions & 4 deletions src/SaveCurrentProjectProcess.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {handleForkFailures} from "./req/operations/atomicOperations";
import * as atomic from "./req/operations/atomicOperations";
import {AtomicOperationForkEvent,CompletionFlags} from "./req/atomicOperationsIPC";
import {ProjectManifest} from "./req/projectManifest";
import {saveCurrentProject} from "./req//saveCurrentProject";

let proj : ProjectManifest;
let flags : CompletionFlags = new CompletionFlags();
handleForkFailures();
atomic.handleForkFailures();
process.on
(
"message",function(ev : AtomicOperationForkEvent)
Expand All @@ -29,7 +29,7 @@ process.on
flags : flags,
}
);
process.exit(0);
atomic.exitFork(0);
}).catch((err) => {
flags.done = true;
flags.failure = true;
Expand All @@ -41,7 +41,7 @@ process.on
data : err
}
);
process.exit(1);
atomic.exitFork(1);
});
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/circularGenomeBuilder.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ <h5 class="modal-title" id="modalTitle">Modal title</h5>
<li><a href="#" id="deleteFigure">Delete Figure</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Figure Options</a>
<ul class="dropdown-menu" id="figureOptions">
</ul>
</li>
<li><a href="#" id="navBarLoadingText"></a></li>
</ul>

Expand Down
18 changes: 13 additions & 5 deletions src/circularGenomeBuilderRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,25 +156,33 @@ $
totalTracks++;
if(ops[i].flags.done && ops[i].flags.success)
{
console.log("compiled "+ops[i].uuid);
if(ops[i].uuid)
{
console.log("compiled "+ops[i].uuid);
tc.removeTrack(ops[i].uuid);
genomeView.firstRender = true;
}
else if(ops[i].compileBase)
{
console.log("compiled base figure");
tc.resetBaseFigureSVG();
genomeView.firstRender = true;
}
}
}
}
}
if(totalTracks > 0)
document.getElementById("navBarLoadingText").innerHTML = `Recalculating ${totalTracks} tracks`;
if(totalTracks == 1)
if(totalTracks == 0)
{
setTimeout(function(){
document.getElementById("navBarLoadingText").innerHTML = ``;
},1000);
document.getElementById("navBarLoadingText").innerHTML = ``;
}
}
else if(arg.val === undefined)
{
document.getElementById("navBarLoadingText").innerHTML = ``;
}
}
}
viewMgr.render();
Expand Down
3 changes: 2 additions & 1 deletion src/compileTemplatesProcess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ function compileAndSend()
data : {
figure : figure
}
},function(){
process.exit(0);
});
process.exit(0);
}

process.on(
Expand Down
1 change: 0 additions & 1 deletion src/guiTests/req/closeToolBar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export async function closeToolBar() : Promise<void>
{
console.log("Failed to open tool bar!");
console.log(toolBar);
//process.exit(1);
}
toolBar[0].close();
resolve();
Expand Down
44 changes: 16 additions & 28 deletions src/req/operations/CheckForUpdate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,38 +23,26 @@ export class CheckForUpdate extends atomic.AtomicOperation
this.closeLogOnSuccess = true;
this.logRecord = atomic.openLog(this.name,"Check for Update");
let self = this;
this.checkForUpdateProcess = cp.fork(getReadable("CheckForUpdate.js"));
this.addPID(this.checkForUpdateProcess.pid);
this.checkForUpdateProcess.on(
"message",function(ev : AtomicOperationForkEvent)
this.checkForUpdateProcess = atomic.makeFork("CheckForUpdate.js",<AtomicOperationForkEvent>{
setData : true,
data : <AtomicOperationIPC>{}
},function(ev : AtomicOperationForkEvent){
self.logObject(ev);
if(ev.finishedSettingData == true)
{
self.logObject(ev);
if(ev.finishedSettingData == true)
{
self.checkForUpdateProcess.send(
<AtomicOperationForkEvent>{
run : true
}
);
}
if(ev.update == true)
{
self.extraData = ev.data;
self.flags = ev.flags;
self.update();
}
}
);
setTimeout(
function(){
self.checkForUpdateProcess.send(
<AtomicOperationForkEvent>{
setData : true,
data : <AtomicOperationIPC>{
}
run : true
}
);
},500
);
}
if(ev.update == true)
{
self.extraData = ev.data;
self.flags = ev.flags;
self.update();
}
});
this.addPID(this.checkForUpdateProcess.pid);
}
}
Loading

0 comments on commit 04378ad

Please sign in to comment.