Skip to content

Commit

Permalink
Merge pull request #184 from veg/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
stevenweaver authored Mar 1, 2021
2 parents dbcba35 + 2491142 commit 50e066e
Show file tree
Hide file tree
Showing 5 changed files with 171 additions and 163 deletions.
11 changes: 11 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
env:
browser: true
commonjs: true
es6: true
extends: 'eslint:recommended'
globals:
Atomics: readonly
SharedArrayBuffer: readonly
parserOptions:
ecmaVersion: 11
rules: {}
5 changes: 4 additions & 1 deletion app/gard/gard.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const client = redis.createClient({ host: config.redis_host, port: config.redis_

var gard = function(socket, stream, params) {

var self = this;
const self = this;

const variation_map = { none: "None", general_discrete: "GDD", beta_gamma: "Gamma" };

Expand All @@ -32,6 +32,7 @@ var gard = function(socket, stream, params) {
variation_map[self.params.analysis.site_to_site_variation];
self.rate_classes = self.params.analysis.rate_classes || 2;
self.genetic_code = self.params.msa[0].gencodeid + 1;
self.run_mode = self.params.analysis.run_mode == "1" ? "Faster": "Normal";
self.datatype = self.params.analysis.datatype || "0";
self.datatype = datatypes[self.datatype];
self.nj = self.params.msa[0].nj;
Expand Down Expand Up @@ -75,6 +76,8 @@ var gard = function(socket, stream, params) {
self.rate_classes +
",datatype=" +
self.datatype+
",run_mode=" +
self.run_mode+
",analysis_type=" +
self.type +
",cwd=" +
Expand Down
5 changes: 3 additions & 2 deletions app/gard/gard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ GENETIC_CODE=$genetic_code
RATE_VARIATION=$rate_var
RATE_CLASSES=$rate_classes
DATATYPE=$datatype
RUN_MODE=$run_mode

PROCS=$procs

Expand All @@ -36,8 +37,8 @@ export HYPHY_PATH=$HYPHY_PATH

trap 'echo "Error" > $STATUS_FILE; exit 1' ERR

echo "mpirun -np $PROCS $HYPHY LIBPATH=$HYPHY_PATH $GARD --type $DATATYPE --alignment $FN --model $MODEL --rv $RATE_VARIATION --rate-classes $RATE_CLASSES --output $RESULTS_FN"
mpirun -np $PROCS $HYPHY LIBPATH=$HYPHY_PATH $GARD --type $DATATYPE --alignment $FN --model $MODEL --rv $RATE_VARIATION --rate-classes $RATE_CLASSES --output $RESULTS_FN > $PROGRESS_FILE
echo "mpirun -np $PROCS $HYPHY LIBPATH=$HYPHY_PATH $GARD --type $DATATYPE --alignment $FN --model $MODEL --mode $RUN_MODE --rv $RATE_VARIATION --rate-classes $RATE_CLASSES --output $RESULTS_FN"
mpirun -np $PROCS $HYPHY LIBPATH=$HYPHY_PATH $GARD --type $DATATYPE --alignment $FN --model $MODEL --mode $RUN_MODE --rv $RATE_VARIATION --rate-classes $RATE_CLASSES --output $RESULTS_FN > $PROGRESS_FILE

echo "Completed" > $STATUS_FILE

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"winston": "^3.2.1"
},
"devDependencies": {
"eslint": "^7.6.0",
"eslint": "^7.9.0",
"heapdump": "^0.3.15",
"socket.io-client": "1.x.x"
}
Expand Down
Loading

0 comments on commit 50e066e

Please sign in to comment.