diff --git a/app/models/fel.js b/app/models/fel.js index c4933642..9ec1e38a 100644 --- a/app/models/fel.js +++ b/app/models/fel.js @@ -15,6 +15,16 @@ var FEL = mongoose.Schema({ resample: Number, ci: Boolean, bootstrap: Boolean, + multiple_hits: { + type: String, + enum: ["None", "Double", "Double+Triple"], + default: "None", + }, + site_multihit: { + type: String, + enum: ["Estimate", "Global"], + default: "Estimate", + }, }); FEL.add(AnalysisSchema); @@ -47,7 +57,7 @@ FEL.virtual("original_fn").get(function () { "/../../uploads/msa/" + this._id + "-original." + - this.original_extension + this.original_extension, ); }); @@ -123,7 +133,7 @@ FEL.statics.spawn = function (fn, options, callback) { } else { var move = Msa.removeTreeFromFile( fel_result.filepath, - fel_result.filepath + fel_result.filepath, ); move.then( (val) => { @@ -137,7 +147,7 @@ FEL.statics.spawn = function (fn, options, callback) { }, (reason) => { callback(err, "issue removing tree from file"); - } + }, ); } } diff --git a/app/routes/fel.js b/app/routes/fel.js index cdd89c3f..711919f7 100644 --- a/app/routes/fel.js +++ b/app/routes/fel.js @@ -36,6 +36,8 @@ exports.uploadFile = function (req, res) { fel.original_extension = path.basename(fn).split(".")[1]; fel.mail = postdata.mail; fel.ci = postdata.confidence_interval == "true"; + fel.multiple_hits = postdata.multiple_hits; + fel.site_multihit = postdata.site_multihit; // Check advanced options if (!_.isNaN(resample)) { @@ -87,7 +89,7 @@ exports.uploadFile = function (req, res) { } else { var move = Msa.removeTreeFromFile( fel_result.filepath, - fel_result.filepath + fel_result.filepath, ); move.then( (val) => { @@ -98,7 +100,7 @@ exports.uploadFile = function (req, res) { }, (reason) => { res.json(500, { error: "issue removing tree from file" }); - } + }, ); } } @@ -116,7 +118,7 @@ exports.uploadFile = function (req, res) { helpers.moveSafely( req.files.files.file, fel_result.filepath, - move_cb + move_cb, ); }); }); @@ -148,6 +150,8 @@ exports.invoke = function (req, res) { // User Parameters fel.tagged_nwk_tree = postdata.nwk_tree; fel.analysis_type = postdata.analysis_type; + fel.multiple_hits = postdata.multiple_hits; // new + fel.site_multihit = postdata.site_multihit; // new fel.status = fel.status_stack[0]; fel.save(function (err, result) { diff --git a/app/templates/fel/msa_form.ejs b/app/templates/fel/msa_form.ejs index 550d3e37..8d5eacac 100644 --- a/app/templates/fel/msa_form.ejs +++ b/app/templates/fel/msa_form.ejs @@ -88,6 +88,22 @@ +