Showing 67 of 149 total issues
Function render
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function() {
this.setName("Export");
this.addNode("Share view (URL)" + ShareSym, () => {
return Exporter.shareLink(this.msa, function(link) {
Function getBlocksForRow
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
getBlocksForRow: function(seqId, maxLen) {
const selis = this.filter(function(el) { return el.inRow(seqId); });
let blocks = [];
for (let i = 0, seli; i < selis.length; i++) {
let seli = selis[i];
Function genConservedSequences
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
genConservedSequences: (len, seqLen, dict) => {
const seqs = [];
if (!(typeof len !== "undefined" && len !== null)) { len = BMath.getRandomInt(3,5); }
if (!(typeof seqLen !== "undefined" && seqLen !== null)) { seqLen = BMath.getRandomInt(50,200); }
Function invertCol
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
invertCol: function(columns) {
const selColumns = this.where({type:"column"}).reduce((memo,el) => {
return memo.concat(((() => {
const result = [];
let i = el.attributes.xStart;
Function _renderSelection
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
_renderSelection: function(data) {
let xZero = data.xZero;
const yZero = data.yZero;
const n = data.n;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _onmousemove
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
_onmousemove: function(e, reversed) {
if (this.dragStart.length === 0) { return; }
const dragEnd = mouse.abs(e);
// relative to first click
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function() {
var gaps = this.g.stats.gaps();
dom.removeAllChilds(this.el);
Function _appendSelection
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
_appendSelection: function(data) {
const seq = data.model.get("seq");
const selection = this._getSelection(data.model);
// get the status of the upper and lower row
const getNextPrev= this._getPrevNextSelection(data.model);
Function render
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function() {
dom.removeAllChilds(this.el);
const fontSize = this.g.zoomer.get("markerFontsize");
const cellWidth = this.g.zoomer.get("columnWidth");
Function render
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
render: function() {
var gaps = this.g.stats.gaps();
dom.removeAllChilds(this.el);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function joinCb
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
joinCb: function(retCb, finalLength, finalScope) {
finalLength = finalLength || 1;
var cbsFinished = 0;
var callbackWrapper = function(cb, scope) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function drawFeature
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
drawFeature: function(data) {
var seq = data.model.get("seq");
var rectWidth = this.g.zoomer.get("columnWidth");
var rectHeight = this.g.zoomer.get("rowHeight");
Function _onmousemove
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
_onmousemove: function(e, reversed) {
if (this.dragStart.length === 0) { return; }
const dragEnd = mouse.abs(e);
// relative to first click
Function render
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
this.setName("Selection");
this.addNode("Find Motif (supports RegEx)", () => {
var search = prompt("your search", "D");
return this.g.user.set("searchText", search);
Function draw
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
draw: function() {
this.removeViews();
this.addView("stage",new Stage({model: this.seqs, g: this.g}));
Function markerHidden
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
markerHidden: function(n,stepSize) {
const hidden = this.g.columns.get("hidden").slice(0);
const min = Math.max(0, n - stepSize);
let prevHidden = true;
Function getAllColumnBlocks
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
getAllColumnBlocks: function(conf) {
const maxLen = conf.maxLen;
const withPos = conf.withPos;
let blocks = [];
let filtered;
Function render
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
render: function() {
var msa = this.msa;
var uploader = k.mk("input");
uploader.type = "file";
uploader.style.display = "none";
Function initialize
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
initialize: function(obj) {
if ((obj.start != null)) {
// gff counts from 1 where MSA starts at 0
// This fix that misalignment
this.set("xStart", (obj.start-1));
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function render
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
render: function() {
dom.removeAllChilds(this.el);
const fontSize = this.g.zoomer.get("markerFontsize");
const cellWidth = this.g.zoomer.get("columnWidth");
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"