Skip to content

Commit

Permalink
adding window.tg_allowNonStandardGenbankTypes variable for easy contr…
Browse files Browse the repository at this point in the history
…ol of allowing non standard genbank types - TeselaGen/openVectorEditor#831
  • Loading branch information
tnrich committed Jun 17, 2022
1 parent a9b709d commit 86236b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/getComplementSequenceAndAnnotations.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const tidyUpSequenceData = require("./tidyUpSequenceData");
const getSequenceDataBetweenRange = require("./getSequenceDataBetweenRange");

// ac.throw([ac.string,ac.bool],arguments);
module.exports = function getReverseComplementSequenceAndAnnoations(
module.exports = function getComplementSequenceAndAnnotations(
pSeqObj,
options = {}
) {
Expand Down
8 changes: 6 additions & 2 deletions src/tidyUpAnnotation.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { cloneDeep } = require("lodash");
const { cloneDeep, get } = require("lodash");
const FeatureTypes = require("./FeatureTypes.js");
const featureColors = require("./featureColors");
const bsonObjectid = require("bson-objectid");
Expand Down Expand Up @@ -90,7 +90,11 @@ module.exports = function tidyUpAnnotation(
annotation.type = featureType; //this makes sure the annotation.type is being set to the exact value of the accepted featureType
return true;
}
if (allowNonStandardGenbankTypes) return true;
if (
allowNonStandardGenbankTypes ||
get(window || global, "tg_allowNonStandardGenbankTypes")
)
return true;
return false;
})
) {
Expand Down

0 comments on commit 86236b0

Please sign in to comment.