Showing 74 of 132 total issues
File plots.js
has 693 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
GV - GeneValidator's JavaScript module
Define a global GV (acronym for GeneValidator) object containing all
GV associated methods:
Function plot_lines
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
GV.plot_lines = function (data, target, title, footer, xTitle, yTitle, no_lines, yValues) {
var margin = {top: 70, right: 50, bottom: 75, left: 50},
width = 600 - margin.left - margin.right,
height = 500 - margin.top - margin.bottom;
Function plot_bars
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
GV.plot_bars = function (alldata, target, title, footer, xTitle, yTitle, bar) {
var margin = {top: 70, right: 50, bottom: 75, left: 50},
width = 600 - margin.left - margin.right,
height = 500 - margin.top - margin.bottom;
Method hierarchical_clusterization
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
def hierarchical_clusterization(no_clusters = 0, distance_method = 0,
vec = @values, debug = false)
clusters = []
vec = vec.sort
- 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 plot_scatter
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
GV.plot_scatter = function (data, target, title, footer, xTitle, yTitle, yLine, slope) {
var margin = {top: 50, right: 30, bottom: 75, left: 50},
width = 500 - margin.left - margin.right,
height = 500 - margin.top - margin.bottom;
Method run
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
def run(n = 10)
raise NotEnoughHitsError if hits.length < opt[:min_blast_hits]
raise unless prediction.is_a?(Query) && !prediction.raw_sequence.nil? &&
hits[0].is_a?(Query)
- 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
Method hierarchical_clusterization_2d
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
def hierarchical_clusterization_2d(no_clusters = 0, distance_method = 0,
vec = @values, debug = false)
clusters = []
if vec.length == 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 plot_align
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
GV.plot_align = function (data, target, title, footer, xTitle, yTitle, no_lines, yValues) {
var margin = {top: 75, right: 50, bottom: 75, left: 150},
width = 600 - margin.left - margin.right,
height = 300 - margin.top - margin.bottom;
File clusterization.rb
has 328 lines of code (exceeds 250 allowed). Consider refactoring. Open
module GeneValidator
Pair = Struct.new(:x, :y) do
include Comparable
##
Method run
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
def run
n = opt[:min_blast_hits] < 10 ? 10 : opt[:min_blast_hits]
n = 50 if n > 50
raise NotEnoughHitsError if hits.length < 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
Method run
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def run
raise NotEnoughHitsError if hits.length < opt[:min_blast_hits]
raise unless prediction.is_a?(Query) && hits[0].is_a?(Query)
start = Time.now
- 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
Method run
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run(n = 10)
raise NotEnoughHitsError if hits.length < opt[:min_blast_hits]
raise unless prediction.is_a?(Query) && !prediction.raw_sequence.nil? &&
hits[0].is_a?(Query)
File validation_alignment.rb
has 281 lines of code (exceeds 250 allowed). Consider refactoring. Open
require 'bio'
require 'forwardable'
require 'genevalidator/exceptions'
require 'genevalidator/get_raw_sequences'
Function plot_simple_bars
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
GV.plot_simple_bars = function (alldata, target, title, footer, xTitle, yTitle) {
var margin = {top: 70, right: 50, bottom: 75, left: 50},
width = 600 - margin.left - margin.right,
height = 500 - margin.top - margin.bottom;
Method run
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run
n = opt[:min_blast_hits] < 10 ? 10 : opt[:min_blast_hits]
n = 50 if n > 50
raise NotEnoughHitsError if hits.length < n
Method hierarchical_clusterization_2d
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
def hierarchical_clusterization_2d(no_clusters = 0, distance_method = 0,
vec = @values, debug = false)
clusters = []
if vec.length == 1
Method hierarchical_clusterization
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
def hierarchical_clusterization(no_clusters = 0, distance_method = 0,
vec = @values, debug = false)
clusters = []
vec = vec.sort
Method run
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run
raise NotEnoughHitsError if hits.length < opt[:min_blast_hits]
raise unless prediction.is_a?(Query) && hits[0].is_a?(Query)
start = Time.now
Method run
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
def run(hits = @hits, prediction = @prediction)
raise NotEnoughHitsError if hits.length < opt[:min_blast_hits]
raise unless prediction.is_a?(Query) && hits[0].is_a?(Query)
start = Time.now
Method run
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def run(hits = @hits, prediction = @prediction)
raise NotEnoughHitsError if hits.length < opt[:min_blast_hits]
raise unless prediction.is_a?(Query) && hits[0].is_a?(Query)
start = Time.now
- 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"