Skip to content
Snippets Groups Projects
Commit 37b166f9 authored by Severine Duvaud's avatar Severine Duvaud
Browse files

Moved the check of Alternate bases to the checkPreconditions function

parent 6579bbf6
No related branches found
No related tags found
No related merge requests found
......@@ -72,7 +72,14 @@ function checkPreconditions(params) {
if (!params.alternateBases) {
return {
hasError: true,
msg: "variant class is not defined, arrayMap supports be DUP or DEL"
msg: "Alternate bases not defined, arrayMap supports DUP or DEL"
};
}
if (!alternateBasesMap[params.alternateBases]) {
return {
hasError: true,
msg: "Alternate bases not supported, arrayMap supports DUP or DEL"
};
}
......@@ -115,8 +122,6 @@ function buildMongoQuery(params) {
var andConditions = [];
var orConditions = [];
if (alternateBasesMap[params.alternateBases]) {
//add constraint on datasets if required
if (params.datasetIds) {
if (params.datasetIds != 'all') {
......@@ -159,7 +164,6 @@ function buildMongoQuery(params) {
if (orConditions.length > 0) {
andConditions.push({$or: orConditions});
}
}
return {
$and: andConditions
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment