Skip to content

Commit

Permalink
updating getSequenceDataBetweenRange to remove filtered annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
tnrich committed Aug 2, 2022
1 parent cb003cc commit fd75f1e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ve-sequence-utils",
"version": "5.1.27",
"version": "5.1.28",
"description": "sequence utility functions",
"main": "lib",
"//types": "./index.d.ts",
Expand Down
6 changes: 5 additions & 1 deletion src/getSequenceDataBetweenRange.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { flatMap, extend, forEach } = require("lodash");
const { flatMap, extend, forEach, startCase } = require("lodash");
const { getRangeLength } = require("ve-range-utils");
const convertDnaCaretPositionOrRangeToAa = require("./convertDnaCaretPositionOrRangeToAA");
const insertSequenceDataAtPosition = require("./insertSequenceDataAtPosition");
Expand All @@ -18,6 +18,9 @@ module.exports = function getSequenceDataBetweenRange(
if (!range) return seqData;
const { exclude = {}, excludePartial = {} } = options;
const seqDataToUse = tidyUpSequenceData(seqData, options);
annotationTypes.forEach(type => {
delete seqDataToUse[`filtered${startCase(type)}`];
});
let seqDataToReturn = extend(
{},
seqDataToUse,
Expand Down Expand Up @@ -78,6 +81,7 @@ module.exports = function getSequenceDataBetweenRange(
});
return tidyUpSequenceData(toRet, options);
}

return tidyUpSequenceData(seqDataToReturn, options);
};

Expand Down

0 comments on commit fd75f1e

Please sign in to comment.