Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
-1,
selectionLayer,
sequenceLength
);
message = (
<span>
Press <span style="{{">ENTER</span> to replace{" "}
{divideBy3(getRangeLength(selectionLayer, sequenceLength), isProtein)}{" "}
{isProtein ? "AAs" : "base pairs"} between{" "}
{isProtein
? convertDnaCaretPositionOrRangeToAA(betweenVals[0])
: betweenVals[0]}{" "}
and{" "}
{isProtein
? convertDnaCaretPositionOrRangeToAA(betweenVals[1] + 2)
: betweenVals[1]}
</span>
);
} else {
message = (
<span>
Press <span style="{{">ENTER</span> to insert{" "}
{charsToInsert.length} {isProtein ? "AAs" : "base pairs"} after{" "}
{isProtein ? "AA" : "base"}{" "}
{isProtein
? convertDnaCaretPositionOrRangeToAA(caretPosition)
: caretPosition}
</span>
);
}
return (
render: (val, _record, i, props) => {
const record = props.isProtein
? convertDnaCaretPositionOrRangeToAA(_record)
: _record;
const base1Range = convertRangeTo1Based(record);
const hasJoinedLocations = record.locations && record.locations.length > 1;
return (
<span>
{props.isProtein ? Math.floor(val / 3) : val}{" "}
<span style="{{">
{hasJoinedLocations ? (
record.locations.map((loc, i) => {
const base1Range = convertRangeTo1Based(loc);
return (
<span>
({base1Range.start}-{base1Range.end})
</span>
);</span></span>
let message;
if (isReplace) {
let betweenVals = getInsertBetweenVals(
-1,
selectionLayer,
sequenceLength
);
message = (
<span>
Press <span style="{{">ENTER</span> to replace{" "}
{divideBy3(getRangeLength(selectionLayer, sequenceLength), isProtein)}{" "}
{isProtein ? "AAs" : "base pairs"} between{" "}
{isProtein
? convertDnaCaretPositionOrRangeToAA(betweenVals[0])
: betweenVals[0]}{" "}
and{" "}
{isProtein
? convertDnaCaretPositionOrRangeToAA(betweenVals[1] + 2)
: betweenVals[1]}
</span>
);
} else {
message = (
<span>
Press <span style="{{">ENTER</span> to insert{" "}
{charsToInsert.length} {isProtein ? "AAs" : "base pairs"} after{" "}
{isProtein ? "AA" : "base"}{" "}
{isProtein
? convertDnaCaretPositionOrRangeToAA(caretPosition)
: caretPosition}</span>
? convertDnaCaretPositionOrRangeToAA(betweenVals[0])
: betweenVals[0]}{" "}
and{" "}
{isProtein
? convertDnaCaretPositionOrRangeToAA(betweenVals[1] + 2)
: betweenVals[1]}
);
} else {
message = (
<span>
Press <span style="{{">ENTER</span> to insert{" "}
{charsToInsert.length} {isProtein ? "AAs" : "base pairs"} after{" "}
{isProtein ? "AA" : "base"}{" "}
{isProtein
? convertDnaCaretPositionOrRangeToAA(caretPosition)
: caretPosition}
</span>
);
}
return (
<div>
<input> {
if (e.keyCode === 27) {
this.handleUnmount();
}
if (e.keyCode === 13) {
this.handleInsert();
this.handleUnmount();
}</div>