BjornFJohansson/pydna

View on GitHub

Showing 219 of 219 total issues

Function add_feature has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open
  • Open
  • Confirmed
  • Invalid
  • Wontfix
Cancel

    def add_feature(self, x=None, y=None, seq=None, type_="misc", strand=1, *args, **kwargs):
Severity: Major
Found in src/pydna/dseqrecord.py - About 50 mins to fix

    Avoid deeply nested control flow statements.
    Open
    • Open
    • Confirmed
    • Invalid
    • Wontfix
    Cancel

                            if not forwdYstop:
                                distYfor = Q_(pxlYfor, "px") / res
                                forYI = Gaussian(distYfor, maxI, distYmid, std_dev)
                                rgb_arr[pxlYfor, from_x:to_x] += forYI
                                pxlYfor += 1
    Severity: Major
    Found in scripts/gel/gel2.py - About 45 mins to fix

      Function list_features has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open
      • Open
      • Confirmed
      • Invalid
      • Wontfix
      Cancel

          def list_features(self):
              """Print ASCII table with all features.
      
              Examples
              --------
      Severity: Minor
      Found in src/pydna/seqrecord.py - About 45 mins 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 from_string has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open
      • Open
      • Confirmed
      • Invalid
      • Wontfix
      Cancel

          def from_string(
      Severity: Minor
      Found in src/pydna/dseqrecord.py - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open
        • Open
        • Confirmed
        • Invalid
        • Wontfix
        Cancel

                            if forYI <= Itol or pxlYfor == pxl_y:
                                forwdYstop = True
            # Background color
            if noise is None or noise <= 0:
        Severity: Major
        Found in scripts/gel/gel_old.py - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open
          • Open
          • Confirmed
          • Invalid
          • Wontfix
          Cancel

                              if k in [
                                  "ApEinfo_label",
                                  "ApEinfo_fwdcolor",
                                  "ApEinfo_revcolor",
                                  "label",
          Severity: Major
          Found in src/pydna/genbankfixer.py - About 45 mins to fix

            Function looped has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
            Open
            • Open
            • Confirmed
            • Invalid
            • Wontfix
            Cancel

                def looped(self):
                    """
                    Circular version of the Dseqrecord object.
            
                    The underlying linear Dseq object has to have compatible ends.
            Severity: Minor
            Found in src/pydna/dseqrecord.py - About 45 mins 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

            Avoid deeply nested control flow statements.
            Open
            • Open
            • Confirmed
            • Invalid
            • Wontfix
            Cancel

                                if bckYI <= Itol or pxlYbck == -1:
                                    bckwdYstop = True
                            if not forwdYstop:
            Severity: Major
            Found in scripts/gel/gel_old.py - About 45 mins to fix

              Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open
              • Open
              • Confirmed
              • Invalid
              • Wontfix
              Cancel

                  def __init__(
              Severity: Minor
              Found in src/pydna/dseq.py - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open
                • Open
                • Confirmed
                • Invalid
                • Wontfix
                Cancel

                                        if f.location.start > len(ct) and f.location.end > len(ct):
                                            f.location += -len(ct)
                                        elif f.location.end > len(ct):
                                            f.location = _CompoundLocation(
                                                (
                Severity: Major
                Found in src/pydna/assembly.py - About 45 mins to fix

                  Function nucleotide has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open
                  • Open
                  • Confirmed
                  • Invalid
                  • Wontfix
                  Cancel

                      def nucleotide(self, item: str, seq_start=None, seq_stop=None, strand=1):
                          """This method downloads a genbank nuclotide record from genbank. This method is
                          cached by default. This can be controlled by editing the **pydna_cached_funcs** environment
                          variable. The best way to do this permanently is to edit the edit the
                          `pydna.ini` file. See the documentation of :func:`pydna.open_config_folder`
                  Severity: Minor
                  Found in src/pydna/genbank.py - About 45 mins 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 Zimm_g has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open
                  • Open
                  • Confirmed
                  • Invalid
                  • Wontfix
                  Cancel

                  def Zimm_g(Nbp, DRouse, qeff, mu0, kB, T):
                  Severity: Minor
                  Found in scripts/gel/gel_old.py - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open
                    • Open
                    • Confirmed
                    • Invalid
                    • Wontfix
                    Cancel

                                        if pxlYbck < len(rgb_arr):
                                            rgb_arr[pxlYbck, from_x:to_x] += bckYI
                                        pxlYbck -= 1
                    Severity: Major
                    Found in scripts/gel/gel_old.py - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open
                      • Open
                      • Confirmed
                      • Invalid
                      • Wontfix
                      Cancel

                                              if not bckwdYstop:
                                                  distYbck = Q_(pxlYbck, "px") / res
                                                  bckYI = Gaussian(distYbck, maxI, distYmid, std_dev)
                                                  if pxlYbck < len(rgb_arr):
                                                      rgb_arr[pxlYbck, from_x:to_x] += bckYI
                      Severity: Major
                      Found in scripts/gel/gel2.py - About 45 mins to fix

                        Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open
                        • Open
                        • Confirmed
                        • Invalid
                        • Wontfix
                        Cancel

                            def __init__(self, record, *args, amplicon=None, position=None, footprint=0, **kwargs):
                        Severity: Minor
                        Found in src/pydna/primer.py - About 45 mins to fix

                          Function __str__ has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                          Open
                          • Open
                          • Confirmed
                          • Invalid
                          • Wontfix
                          Cancel

                              def __str__(self):
                                  """returns a short report describing if or where primer
                                  anneal on the template."""
                          
                                  mystring = "Template {name} {size} bp {top} limit={limit}:\n".format(
                          Severity: Minor
                          Found in src/pydna/amplify.py - About 45 mins 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 reduced_field has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open
                          • Open
                          • Confirmed
                          • Invalid
                          • Wontfix
                          Cancel

                          def reduced_field(eta, a, mu0, E, kB, T):
                          Severity: Minor
                          Found in scripts/gel/gel_old.py - About 45 mins to fix

                            Function reduced_field_Kuhn has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open
                            • Open
                            • Confirmed
                            • Invalid
                            • Wontfix
                            Cancel

                            def reduced_field_Kuhn(eta, l, mu0, E, kB, T):
                            Severity: Minor
                            Found in scripts/gel/gel_old.py - About 45 mins to fix

                              Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open
                              • Open
                              • Confirmed
                              • Invalid
                              • Wontfix
                              Cancel

                                  def __init__(self, record, *args, template=None, forward_primer=None, reverse_primer=None, **kwargs):
                              Severity: Minor
                              Found in src/pydna/amplicon.py - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open
                                • Open
                                • Confirmed
                                • Invalid
                                • Wontfix
                                Cancel

                                                    if isinstance(val, str):
                                                        dct[key] = a[key].strip()
                                                nl.append(dct)
                                Severity: Major
                                Found in src/pydna/genbankfixer.py - About 45 mins to fix

                                  Function from_SeqRecord has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open
                                  • Open
                                  • Confirmed
                                  • Invalid
                                  • Wontfix
                                  Cancel

                                      def from_SeqRecord(
                                  Severity: Minor
                                  Found in src/pydna/dseqrecord.py - About 45 mins to fix

                                    Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open
                                    • Open
                                    • Confirmed
                                    • Invalid
                                    • Wontfix
                                    Cancel

                                        def __init__(self, seq, *args, id="id", name="name", description="description", **kwargs):
                                    Severity: Minor
                                    Found in src/pydna/seqrecord.py - About 45 mins to fix

                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                      Open
                                      • Open
                                      • Confirmed
                                      • Invalid
                                      • Wontfix
                                      Cancel

                                                          if pxlYbck < len(rgb_arr):
                                                              rgb_arr[pxlYbck, from_x:to_x] += bckYI
                                      Severity: Major
                                      Found in scripts/gel/gel_old.py and 3 other locations - About 40 mins to fix
                                      scripts/gel/gel2.py on lines 449..450
                                      scripts/gel/gel2.py on lines 459..460
                                      scripts/gel/gel_old.py on lines 1014..1015

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 34.

                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                      Refactorings

                                      Further Reading

                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                      Open
                                      • Open
                                      • Confirmed
                                      • Invalid
                                      • Wontfix
                                      Cancel

                                                          if pxlYmid < len(rgb_arr):  # band within gel frontiers
                                                              rgb_arr[pxlYmid, from_x:to_x] += midI
                                      Severity: Major
                                      Found in scripts/gel/gel2.py and 3 other locations - About 40 mins to fix
                                      scripts/gel/gel2.py on lines 459..460
                                      scripts/gel/gel_old.py on lines 1014..1015
                                      scripts/gel/gel_old.py on lines 1024..1025

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 34.

                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                      Refactorings

                                      Further Reading

                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                      Open
                                      • Open
                                      • Confirmed
                                      • Invalid
                                      • Wontfix
                                      Cancel

                                                  if pxlYmid < len(rgb_arr):  # band within gel frontiers
                                                      rgb_arr[pxlYmid, from_x:to_x] += midI
                                      Severity: Major
                                      Found in scripts/gel/gel_old.py and 3 other locations - About 40 mins to fix
                                      scripts/gel/gel2.py on lines 449..450
                                      scripts/gel/gel2.py on lines 459..460
                                      scripts/gel/gel_old.py on lines 1024..1025

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 34.

                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                      Refactorings

                                      Further Reading

                                      Similar blocks of code found in 4 locations. Consider refactoring.
                                      Open
                                      • Open
                                      • Confirmed
                                      • Invalid
                                      • Wontfix
                                      Cancel

                                                                  if pxlYbck < len(rgb_arr):
                                                                      rgb_arr[pxlYbck, from_x:to_x] += bckYI
                                      Severity: Major
                                      Found in scripts/gel/gel2.py and 3 other locations - About 40 mins to fix
                                      scripts/gel/gel2.py on lines 449..450
                                      scripts/gel/gel_old.py on lines 1014..1015
                                      scripts/gel/gel_old.py on lines 1024..1025

                                      Duplicated Code

                                      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                      Tuning

                                      This issue has a mass of 34.

                                      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                      Refactorings

                                      Further Reading

                                      Function translate has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open
                                      • Open
                                      • Confirmed
                                      • Invalid
                                      • Wontfix
                                      Cancel

                                          def translate(self, table="Standard", stop_symbol="*", to_stop=False, cds=False, gap="-"):
                                      Severity: Minor
                                      Found in src/pydna/dseq.py - About 35 mins to fix

                                        Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open
                                        • Open
                                        • Confirmed
                                        • Invalid
                                        • Wontfix
                                        Cancel

                                            def __init__(self, record, *args, graph=None, nodemap=None, **kwargs):
                                        Severity: Minor
                                        Found in src/pydna/contig.py - About 35 mins to fix

                                          Function pore_size has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                          Open
                                          • Open
                                          • Confirmed
                                          • Invalid
                                          • Wontfix
                                          Cancel

                                          def pore_size(gamma, muL, mu0, lp, b):
                                          Severity: Minor
                                          Found in scripts/gel/gel_old.py - About 35 mins to fix

                                            Function tmbresluc has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                            Open
                                            • Open
                                            • Confirmed
                                            • Invalid
                                            • Wontfix
                                            Cancel

                                            def tmbresluc(primer: str, *args, primerc=500.0, saltc=50, **kwargs):
                                            Severity: Minor
                                            Found in src/pydna/tm.py - About 35 mins to fix

                                              Function from_string has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                              Open
                                              • Open
                                              • Confirmed
                                              • Invalid
                                              • Wontfix
                                              Cancel

                                                  def from_string(
                                              Severity: Minor
                                              Found in src/pydna/dseq.py - About 35 mins to fix

                                                Function ta_dbd has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                Open
                                                • Open
                                                • Confirmed
                                                • Invalid
                                                • Wontfix
                                                Cancel

                                                def ta_dbd(fp, rp, seq, tm=tm_dbd, tm_product=None):
                                                Severity: Minor
                                                Found in src/pydna/tm.py - About 35 mins to fix

                                                  Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                  Open
                                                  • Open
                                                  • Confirmed
                                                  • Invalid
                                                  • Wontfix
                                                  Cancel

                                                      def __init__(
                                                  Severity: Minor
                                                  Found in src/pydna/myprimers.py - About 35 mins to fix

                                                    Function all_simple_paths_edges has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                    Open
                                                    • Open
                                                    • Confirmed
                                                    • Invalid
                                                    • Wontfix
                                                    Cancel

                                                    def all_simple_paths_edges(G, source, target, cutoff=None, data=False):
                                                    Severity: Minor
                                                    Found in scripts/_simple_paths8.py - About 35 mins to fix

                                                      Function from_SeqRecord has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                      Open
                                                      • Open
                                                      • Confirmed
                                                      • Invalid
                                                      • Wontfix
                                                      Cancel

                                                          def from_SeqRecord(cls, record, *args, graph=None, nodemap=None, **kwargs):
                                                      Severity: Minor
                                                      Found in src/pydna/contig.py - About 35 mins to fix

                                                        Function ta_default has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                        Open
                                                        • Open
                                                        • Confirmed
                                                        • Invalid
                                                        • Wontfix
                                                        Cancel

                                                        def ta_default(fp: str, rp: str, seq: str, tm=tm_default, tm_product=tm_product):
                                                        Severity: Minor
                                                        Found in src/pydna/tm.py - About 35 mins to fix

                                                          Function diffusion_coefficient has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                          Open
                                                          • Open
                                                          • Confirmed
                                                          • Invalid
                                                          • Wontfix
                                                          Cancel

                                                          def diffusion_coefficient(Nbp, N_lim1, N_lim2, N_lim3, args):
                                                          Severity: Minor
                                                          Found in scripts/gel/gel_old.py - About 35 mins to fix

                                                            Function from_string has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                            Open
                                                            • Open
                                                            • Confirmed
                                                            • Invalid
                                                            • Wontfix
                                                            Cancel

                                                                def from_string(cls, record: str = "", *args, graph=None, nodemap=None, **kwargs):
                                                            Severity: Minor
                                                            Found in src/pydna/contig.py - About 35 mins to fix

                                                              Function quick has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                              Open
                                                              • Open
                                                              • Confirmed
                                                              • Invalid
                                                              • Wontfix
                                                              Cancel

                                                                  def quick(
                                                              Severity: Minor
                                                              Found in src/pydna/dseq.py - About 35 mins to fix

                                                                Function list_parts has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                Open
                                                                • Open
                                                                • Confirmed
                                                                • Invalid
                                                                • Wontfix
                                                                Cancel

                                                                def list_parts(fusion_pcr_fragment):
                                                                    stack = [fusion_pcr_fragment]
                                                                    processed = []
                                                                
                                                                    while stack:
                                                                Severity: Minor
                                                                Found in src/pydna/fusionpcr.py - About 35 mins 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 find_aminoacids has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                Open
                                                                • Open
                                                                • Confirmed
                                                                • Invalid
                                                                • Wontfix
                                                                Cancel

                                                                    def find_aminoacids(self, other):
                                                                        """
                                                                        >>> from pydna.dseqrecord import Dseqrecord
                                                                        >>> s=Dseqrecord("atgtacgatcgtatgctggttatattttag")
                                                                        >>> s.seq.translate()
                                                                Severity: Minor
                                                                Found in src/pydna/dseqrecord.py - About 35 mins 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 _fill_in_three_prime has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                Open
                                                                • Open
                                                                • Confirmed
                                                                • Invalid
                                                                • Wontfix
                                                                Cancel

                                                                    def _fill_in_three_prime(self, nucleotides):
                                                                        stuffer = ""
                                                                        type, se = self.three_prime_end()
                                                                        if type == "5'":
                                                                            for n in _rc(se):
                                                                Severity: Minor
                                                                Found in src/pydna/dseq.py - About 35 mins 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

                                                                Identical blocks of code found in 2 locations. Consider refactoring.
                                                                Open
                                                                • Open
                                                                • Confirmed
                                                                • Invalid
                                                                • Wontfix
                                                                Cancel

                                                                free_solution = lambda kB, T, eta, Rh: kB * T / (6 * _np.pi * eta * Rh)
                                                                Severity: Minor
                                                                Found in scripts/gel/gel2.py and 1 other location - About 35 mins to fix
                                                                scripts/gel/gel_old.py on lines 487..487

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 33.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Similar blocks of code found in 5 locations. Consider refactoring.
                                                                Open
                                                                • Open
                                                                • Confirmed
                                                                • Invalid
                                                                • Wontfix
                                                                Cancel

                                                                    datasets[name]["gamma"] = temp_dset["gamma"] * ureg("kbp")
                                                                Severity: Major
                                                                Found in scripts/gel/gel_old.py and 4 other locations - About 35 mins to fix
                                                                scripts/gel/gel_old.py on lines 348..348
                                                                scripts/gel/gel_old.py on lines 349..349
                                                                scripts/gel/gel_old.py on lines 350..350
                                                                scripts/gel/gel_old.py on lines 351..351

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 33.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Function assign_numbers has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                Open
                                                                • Open
                                                                • Confirmed
                                                                • Invalid
                                                                • Wontfix
                                                                Cancel

                                                                    def assign_numbers(self, lst: list):
                                                                        """Find new primers in lst.
                                                                
                                                                        Returns a string containing new primers with their assigned
                                                                        numbers. This string can be copied and pasted to the primer
                                                                Severity: Minor
                                                                Found in src/pydna/myprimers.py - About 35 mins 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

                                                                Identical blocks of code found in 2 locations. Consider refactoring.
                                                                Open
                                                                • Open
                                                                • Confirmed
                                                                • Invalid
                                                                • Wontfix
                                                                Cancel

                                                                                to_x = int(round(((distXmid + bandlength / 2.0) * res).magnitude))
                                                                Severity: Minor
                                                                Found in scripts/gel/gel2.py and 1 other location - About 35 mins to fix
                                                                scripts/gel/gel_old.py on lines 1000..1000

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 33.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Function figure has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                                Open
                                                                • Open
                                                                • Confirmed
                                                                • Invalid
                                                                • Wontfix
                                                                Cancel

                                                                    def figure(self, feature=0, highlight="\x1b[48;5;11m", plain="\x1b[0m"):
                                                                        """docstring."""
                                                                        if self.features:
                                                                            f = self.features[feature]
                                                                            locations = sorted(self.features[feature].location.parts, key=_SimpleLocation.start.fget)
                                                                Severity: Minor
                                                                Found in src/pydna/dseqrecord.py - About 35 mins 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

                                                                Similar blocks of code found in 5 locations. Consider refactoring.
                                                                Open
                                                                • Open
                                                                • Confirmed
                                                                • Invalid
                                                                • Wontfix
                                                                Cancel

                                                                    datasets[name]["muL"] = temp_dset["muL"] * ureg("1.0E-8 m**2/(V*s)")
                                                                Severity: Major
                                                                Found in scripts/gel/gel_old.py and 4 other locations - About 35 mins to fix
                                                                scripts/gel/gel_old.py on lines 348..348
                                                                scripts/gel/gel_old.py on lines 349..349
                                                                scripts/gel/gel_old.py on lines 350..350
                                                                scripts/gel/gel_old.py on lines 352..352

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 33.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Identical blocks of code found in 2 locations. Consider refactoring.
                                                                Open
                                                                • Open
                                                                • Confirmed
                                                                • Invalid
                                                                • Wontfix
                                                                Cancel

                                                                    return kB * T / (6 * _np.pi * eta * Rh)
                                                                Severity: Minor
                                                                Found in scripts/gel/gel_old.py and 1 other location - About 35 mins to fix
                                                                scripts/gel/gel2.py on lines 179..179

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 33.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Identical blocks of code found in 2 locations. Consider refactoring.
                                                                Open
                                                                • Open
                                                                • Confirmed
                                                                • Invalid
                                                                • Wontfix
                                                                Cancel

                                                                        to_x = int(round(((distXmid + bandlength / 2.0) * res).magnitude))
                                                                Severity: Minor
                                                                Found in scripts/gel/gel_old.py and 1 other location - About 35 mins to fix
                                                                scripts/gel/gel2.py on lines 435..435

                                                                Duplicated Code

                                                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                                                Tuning

                                                                This issue has a mass of 33.

                                                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                                                Refactorings

                                                                Further Reading

                                                                Severity
                                                                Category