Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
pairs.forEach(([cut1, cut2]) => {
const start = normalizePositionByRangeLength(
cut1.topSnipPosition,
sequenceLength
);
const end = normalizePositionByRangeLength(
cut2.topSnipPosition - 1,
sequenceLength
);
const size = getRangeLength({ start, end }, sequenceLength);
// const id = uniqid()
const id = start + "-" + end + "-" + size + "-";
getRangeLength({ start, end }, sequenceLength);
fragments.push({
cut1,
cut2,
start,
pairs.forEach(([cut1, cut2]) => {
const start = normalizePositionByRangeLength(
cut1.topSnipPosition,
sequenceLength
);
const end = normalizePositionByRangeLength(
cut2.topSnipPosition - 1,
sequenceLength
);
const size = getRangeLength({ start, end }, sequenceLength);
// const id = uniqid()
const id = start + "-" + end + "-" + size + "-";
getRangeLength({ start, end }, sequenceLength);
fragments.push({
cut1,
cut2,
start,
end,
size,
id,
onFragmentSelect: () => {
(acc, isActive, frameName) => {
const frameOffset = Number(frameName);
if (isActive) {
const id = uuid();
acc[id] = {
id,
start: 0 + Math.abs(frameOffset) - 1,
end: normalizePositionByRangeLength(
sequence.length - 1 + Math.abs(frameOffset) - 1,
sequence.length
),
translationType: "Frame",
forward: frameOffset > 0,
isOrf: true //pass isOrf = true here in order to not have it show up in the properties window
};
}
return acc;
},
{}