reimandlab/Visualistion-Framework-for-Genome-Mutations

View on GitHub

Showing 340 of 340 total issues

Function Network has 1152 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var Network = function ()
{
    // data variables
    var sites
    var groups
Severity: Major
Found in website/static/network.js - About 5 days to fix

    Function Network has a Cognitive Complexity of 204 (exceeds 5 allowed). Consider refactoring.
    Open

    var Network = function ()
    {
        // data variables
        var sites
        var groups
    Severity: Minor
    Found in website/static/network.js - About 4 days to fix

    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

    File network.js has 1167 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    function prepareSVG(element)
    {
        return d3
            .select(element)
            .append('svg')
    Severity: Major
    Found in website/static/network.js - About 3 days to fix

      File protein_data.py has 888 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      from collections import defaultdict, namedtuple
      from pathlib import Path
      from typing import Callable, Type
      from warnings import warn
      
      
      Severity: Major
      Found in website/imports/protein_data.py - About 2 days to fix

        Function Tracks has 423 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var Tracks = function ()
        {
            var scale = 1.0
            var scrollArea, scalableArea, scalableElem, tracks
            var needle_plot
        Severity: Major
        Found in website/static/tracks.js - About 2 days to fix

          File mutations.py has 862 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          from abc import ABCMeta, abstractmethod
          from collections import UserList, OrderedDict
          from functools import lru_cache
          from typing import Type, Iterable, Mapping, List, Dict, TYPE_CHECKING
          
          
          Severity: Major
          Found in website/models/bio/mutations.py - About 2 days to fix

            File enrichment.py has 832 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import operator
            import random
            from collections import namedtuple, Counter, defaultdict
            from functools import reduce, partial
            from statistics import median, mean
            Severity: Major
            Found in website/analyses/enrichment.py - About 2 days to fix

              File cms.py has 756 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              import re
              from os import path
              from functools import wraps
              from pathlib import Path
              
              
              Severity: Major
              Found in website/views/cms.py - About 1 day to fix

                File search.py has 682 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import pickle
                from collections import defaultdict
                from urllib.parse import unquote
                
                from flask import make_response, redirect, abort
                Severity: Major
                Found in website/views/search.py - About 1 day to fix

                  Function Tracks has a Cognitive Complexity of 72 (exceeds 5 allowed). Consider refactoring.
                  Open

                  var Tracks = function ()
                  {
                      var scale = 1.0
                      var scrollArea, scalableArea, scalableElem, tracks
                      var needle_plot
                  Severity: Minor
                  Found in website/static/tracks.js - About 1 day to fix

                  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

                  File clinvar.py has 535 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  import re
                  from collections import defaultdict
                  from typing import Mapping, Iterable, Dict, TextIO, Union, NamedTuple
                  from xml.etree import ElementTree
                  
                  
                  Severity: Major
                  Found in website/imports/mutations/clinvar.py - About 1 day to fix

                    File manage.py has 516 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    #!/usr/bin/env python3
                    import argparse
                    from contextlib import contextmanager
                    from typing import Mapping, Text
                    
                    
                    Severity: Major
                    Found in website/manage.py - About 1 day to fix

                      Function AsyncFiltersHandler has 203 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      var AsyncFiltersHandler = function()
                      {
                          var config;
                          var form;
                          var current_state_checksum;
                      Severity: Major
                      Found in website/static/filters.js - About 1 day to fix

                        Function Tooltip has 203 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        var Tooltip = function()
                        {
                            var body = d3.select('body').node()
                        
                            // internals
                        Severity: Major
                        Found in website/static/tooltip.js - About 1 day to fix

                          Function import_disease_associations has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
                          Open

                              def import_disease_associations(self):
                                  """Add disease association details to the already imported mutation-disease associations"""
                                  from tqdm import tqdm
                                  import gzip
                          
                          
                          Severity: Minor
                          Found in website/imports/mutations/clinvar.py - About 7 hrs to fix

                          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 Zoom has 160 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          var Zoom = function(css_zoom)
                          {
                              var svg;
                              var min;
                              var max;
                          Severity: Major
                          Found in website/static/zoom.js - About 6 hrs to fix

                            File tracks.js has 426 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            var Tracks = function ()
                            {
                                var scale = 1.0
                                var scrollArea, scalableArea, scalableElem, tracks
                                var needle_plot
                            Severity: Minor
                            Found in website/static/tracks.js - About 6 hrs to fix

                              Function Tooltip has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
                              Open

                              var Tooltip = function()
                              {
                                  var body = d3.select('body').node()
                              
                                  // internals
                              Severity: Minor
                              Found in website/static/tooltip.js - About 6 hrs to fix

                              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 export_genomic_coordinates_of_ptm has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  def export_genomic_coordinates_of_ptm(
                                      self, export_path=None, path=None,
                                      only_primary_isoforms=False, only_confirmed_mutations=True
                                  ):
                                      path = self.choose_path(path)
                              Severity: Minor
                              Found in website/imports/mutations/mutation_importer/__init__.py - About 6 hrs to fix

                              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

                              File infections.py has 417 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              from abc import abstractmethod
                              from datetime import datetime
                              from functools import partial
                              from typing import List, Iterable, Union
                              from math import log2
                              Severity: Minor
                              Found in website/imports/sites/infections.py - About 6 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language