use lodash to do removeDuplicateSequences logic