KarrLab/wc_model_gen

View on GitHub
wc_model_gen/eukaryote/transcription.py

Summary

Maintainability
F
1 mo
Test Coverage
A
97%

File transcription.py has 1089 lines of code (exceeds 250 allowed). Consider refactoring.
Open

""" Generator for transcription submodels for eukaryotes

:Author: Yin Hoon Chew <yinhoon.chew@mssm.edu>
:Date: 2019-01-07
:Copyright: 2019, Karr Lab
Severity: Major
Found in wc_model_gen/eukaryote/transcription.py - About 2 days to fix

    Function gen_reactions has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring.
    Open

        def gen_reactions(self):
            """ Generate reactions associated with submodel """
            model = self.model
            cell = self.knowledge_base.cell
            nucleus = model.compartments.get_one(id='n')
    Severity: Minor
    Found in wc_model_gen/eukaryote/transcription.py - 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

    Function calibrate_submodel has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring.
    Open

        def calibrate_submodel(self):
            """ Calibrate the submodel using data in the KB """
            
            model = self.model        
            cell = self.knowledge_base.cell
    Severity: Minor
    Found in wc_model_gen/eukaryote/transcription.py - 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

    Function gen_rate_laws has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring.
    Open

        def gen_rate_laws(self):
            """ Generate rate laws for the reactions in the submodel """
    
            model = self.model        
            cell = self.knowledge_base.cell
    Severity: Minor
    Found in wc_model_gen/eukaryote/transcription.py - 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

    Function clean_and_validate_options has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
    Open

        def clean_and_validate_options(self):
            """ Apply default options and validate options """
            options = self.options
    
            transcription_unit = options.get('transcription_unit', {})
    Severity: Minor
    Found in wc_model_gen/eukaryote/transcription.py - About 4 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 clean_and_validate_options has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def clean_and_validate_options(self):
            """ Apply default options and validate options """
            options = self.options
    
            transcription_unit = options.get('transcription_unit', {})
    Severity: Minor
    Found in wc_model_gen/eukaryote/transcription.py - About 1 hr to fix

      Function gen_reactions has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def gen_reactions(self):
              """ Generate reactions associated with submodel """
              model = self.model
              cell = self.knowledge_base.cell
              nucleus = model.compartments.get_one(id='n')
      Severity: Minor
      Found in wc_model_gen/eukaryote/transcription.py - About 1 hr to fix

        Function gen_rate_laws has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def gen_rate_laws(self):
                """ Generate rate laws for the reactions in the submodel """
        
                model = self.model        
                cell = self.knowledge_base.cell
        Severity: Minor
        Found in wc_model_gen/eukaryote/transcription.py - About 1 hr to fix

          Function calibrate_submodel has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              def calibrate_submodel(self):
                  """ Calibrate the submodel using data in the KB """
                  
                  model = self.model        
                  cell = self.knowledge_base.cell
          Severity: Minor
          Found in wc_model_gen/eukaryote/transcription.py - About 1 hr to fix

            Avoid deeply nested control flow statements.
            Open

                                    if add_transcript in rna_input_seq:
                                        seq = rna_input_seq[add_transcript]
                                    else:
                                        seq = cell.species_types.get_one(id=add_transcript).get_seq()    
                                    add_count = gvar.transcript_ntp_usage[add_transcript] = {
            Severity: Major
            Found in wc_model_gen/eukaryote/transcription.py - About 45 mins to fix

              Similar blocks of code found in 3 locations. Consider refactoring.
              Open

                      for rnap, factors in elongation_negative_factors.items():
                          elongation_negative_factor_functions[rnap] = {}
                          compartment = mitochondrion if 'polm' in rnap else nucleus
                          n = 1
                          for factor in factors:
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 2 other locations - About 2 days to fix
              wc_model_gen/eukaryote/transcription.py on lines 757..784
              wc_model_gen/eukaryote/transcription.py on lines 788..815

              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 236.

              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 3 locations. Consider refactoring.
              Open

                      for rnap, factors in elongation_termination_factors.items():
                          elongation_termination_factor_functions[rnap] = {}
                          compartment = mitochondrion if 'polm' in rnap else nucleus
                          n = 1
                          for factor in factors:
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 2 other locations - About 2 days to fix
              wc_model_gen/eukaryote/transcription.py on lines 757..784
              wc_model_gen/eukaryote/transcription.py on lines 819..846

              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 236.

              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 3 locations. Consider refactoring.
              Open

                      for rnap, factors in init_factors.items():
                          init_factor_functions[rnap] = {}
                          compartment = mitochondrion if 'polm' in rnap else nucleus
                          n = 1
                          for factor in factors:
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 2 other locations - About 2 days to fix
              wc_model_gen/eukaryote/transcription.py on lines 788..815
              wc_model_gen/eukaryote/transcription.py on lines 819..846

              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 236.

              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

                          for species in reaction.rate_laws[0].expression.species:
                              init_species_counts[species.id] = species.distribution_init_concentration.mean
                              model_Km = model.parameters.get_one(
                                      id='K_m_{}_{}'.format(reaction.id, species.species_type.id))
                              if model_Km:
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 3 other locations - About 1 day to fix
              wc_model_gen/eukaryote/translation_translocation.py on lines 1194..1207
              wc_model_gen/eukaryote/translation_translocation.py on lines 1237..1250
              wc_model_gen/eukaryote/translation_translocation.py on lines 1294..1307

              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 171.

              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 2 locations. Consider refactoring.
              Open

                              if 'Kr_' in param.id:
                                  repressor_species = model.species.get_one(
                                      id='{}[{}]'.format(param.id.split('_')[-1], transcription_compartment.id))
                                  init_reg_species_count[repressor_species.id] = \
                                      repressor_species.distribution_init_concentration.mean
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 1 other location - About 1 day to fix
              wc_model_gen/eukaryote/transcription.py on lines 1141..1154

              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 154.

              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 2 locations. Consider refactoring.
              Open

                              elif 'Ka_' in param.id:
                                  activator_species = model.species.get_one(
                                      id='{}[{}]'.format(param.id.split('_')[-1], transcription_compartment.id))
                                  init_reg_species_count[activator_species.id] = \
                                      activator_species.distribution_init_concentration.mean
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 1 other location - About 1 day to fix
              wc_model_gen/eukaryote/transcription.py on lines 1126..1139

              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 154.

              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

                          if rna_kb.id in gvar.transcript_ntp_usage:
                              ntp_count = gvar.transcript_ntp_usage[rna_kb.id]
                          else:
                              if rna_kb.id in rna_input_seq:
                                  seq = rna_input_seq[rna_kb.id]
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 1 other location - About 1 day to fix
              wc_model_gen/eukaryote/rna_degradation.py on lines 97..109

              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 137.

              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 3 locations. Consider refactoring.
              Open

                          for factor in elongation_termination_factors[rna_elongation_termination_factors[rna_kb.id]]:
                              factor_details = elongation_termination_factor_functions[
                                  rna_elongation_termination_factors[rna_kb.id]][','.join(factor)]
                              expression_terms.append(factor_details['function'].id)
                              for cl, dictionary in objects.items():
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 2 other locations - About 1 day to fix
              wc_model_gen/eukaryote/transcription.py on lines 973..978
              wc_model_gen/eukaryote/transcription.py on lines 1028..1035

              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 135.

              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 3 locations. Consider refactoring.
              Open

                          if elongation_negative_factors.get(rna_elongation_negative_factors[rna_kb.id]):
                              for factor in elongation_negative_factors[rna_elongation_negative_factors[rna_kb.id]]:
                                  factor_details = elongation_negative_factor_functions[
                                      rna_elongation_negative_factors[rna_kb.id]][','.join(factor)]
                                  expression_terms.append(factor_details['function'].id)
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 2 other locations - About 1 day to fix
              wc_model_gen/eukaryote/transcription.py on lines 973..978
              wc_model_gen/eukaryote/transcription.py on lines 1020..1026

              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 135.

              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 3 locations. Consider refactoring.
              Open

                          for factor in init_factors[rna_init_factors[rna_kb.id]]:
                              factor_details = init_factor_functions[rna_init_factors[rna_kb.id]][','.join(factor)]
                              expression_terms.append(factor_details['function'].id)
                              for cl, dictionary in objects.items():
                                  dictionary.update(factor_details['objects'][cl])
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 2 other locations - About 1 day to fix
              wc_model_gen/eukaryote/transcription.py on lines 1020..1026
              wc_model_gen/eukaryote/transcription.py on lines 1028..1035

              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 135.

              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

                          for func in reaction.rate_laws[0].expression.functions:
                              for species in func.expression.species:
                                  init_species_counts[species.id] = species.distribution_init_concentration.mean
                              for obs in func.expression.observables:
                                  for species in obs.expression.species:    
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 3 other locations - About 4 hrs to fix
              wc_model_gen/eukaryote/translation_translocation.py on lines 1209..1214
              wc_model_gen/eukaryote/translation_translocation.py on lines 1252..1257
              wc_model_gen/eukaryote/translation_translocation.py on lines 1309..1314

              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 82.

              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 2 locations. Consider refactoring.
              Open

                                      add_count = gvar.transcript_ntp_usage[add_transcript] = {
                                          'A': seq.upper().count('A'),
                                          'C': seq.upper().count('C'),
                                          'G': seq.upper().count('G'),
                                          'U': seq.upper().count('U'),
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 1 other location - About 3 hrs to fix
              wc_model_gen/eukaryote/translation_translocation.py on lines 1487..1492

              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 70.

              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 2 locations. Consider refactoring.
              Open

                          chunked_data = [chunked_data[i * size:(i + 1) * size] for i in range((len(chunked_data) + size - 1) // size )]
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 1 other location - About 3 hrs to fix
              wc_model_gen/eukaryote/transcription.py on lines 720..720

              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 65.

              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 2 locations. Consider refactoring.
              Open

                              expr = [expr[i * group:(i + 1) * group] for i in range((len(expr) + group - 1) // group )]
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 1 other location - About 3 hrs to fix
              wc_model_gen/eukaryote/transcription.py on lines 713..713

              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 65.

              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 3 locations. Consider refactoring.
              Open

                      for met in metabolic_participants:
                          met_species_type = model.species_types.get_one(id=met)
                          metabolites[met] = {
                              'n': met_species_type.species.get_or_create(compartment=nucleus, model=model),
                              'm': met_species_type.species.get_or_create(compartment=mitochondrion, model=model)
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 2 other locations - About 3 hrs to fix
              wc_model_gen/eukaryote/complexation.py on lines 103..107
              wc_model_gen/eukaryote/rna_degradation.py on lines 67..71

              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 64.

              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 2 locations. Consider refactoring.
              Open

                                  elif tf_model and tf.direction == wc_kb.eukaryote.RegulatoryDirection.repression:
                                      F_rep, species_rep, param_rep, func_rep = utils.simple_repressor(
                                          model, reaction_id, tf_model) 
                                      F_regs.append(F_rep)
                                      reg_species.update(species_rep)
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 1 other location - About 2 hrs to fix
              wc_model_gen/eukaryote/transcription.py on lines 901..907

              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 55.

              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 2 locations. Consider refactoring.
              Open

                                  if tf_model and tf.direction == wc_kb.eukaryote.RegulatoryDirection.activation:                        
                                      F_act, species_act, param_act, func_act = utils.simple_activator(
                                          model, reaction_id, tf_model)
                                      F_regs.append(F_act)
                                      reg_species.update(species_act)
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 1 other location - About 2 hrs to fix
              wc_model_gen/eukaryote/transcription.py on lines 909..915

              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 55.

              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 3 locations. Consider refactoring.
              Open

                              eval_rate_law = reaction.rate_laws[0].expression._parsed_expression.eval({
                                  wc_lang.Species: init_species_counts,
                                  wc_lang.Compartment: {
                                      transcription_compartment.id: transcription_compartment.init_volume.mean * \
                                          transcription_compartment.init_density.value},
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 2 other locations - About 2 hrs to fix
              wc_model_gen/eukaryote/translation_translocation.py on lines 1528..1532
              wc_model_gen/eukaryote/translation_translocation.py on lines 1559..1563

              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 53.

              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

                          reaction.participants.append(metabolites['amp'][
                              transcription_compartment.id].species_coefficients.get_or_create(
                              coefficient=pre_rna_count['A']-ntp_count['A']))
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 4 other locations - About 2 hrs to fix
              wc_model_gen/eukaryote/transcription.py on lines 526..528
              wc_model_gen/eukaryote/transcription.py on lines 532..534
              wc_model_gen/eukaryote/transcription.py on lines 535..537
              wc_model_gen/eukaryote/transcription.py on lines 538..540

              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 53.

              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

                          reaction.participants.append(metabolites['gmp'][
                              transcription_compartment.id].species_coefficients.get_or_create(
                              coefficient=pre_rna_count['G']-ntp_count['G']))
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 4 other locations - About 2 hrs to fix
              wc_model_gen/eukaryote/transcription.py on lines 526..528
              wc_model_gen/eukaryote/transcription.py on lines 529..531
              wc_model_gen/eukaryote/transcription.py on lines 532..534
              wc_model_gen/eukaryote/transcription.py on lines 538..540

              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 53.

              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

                          reaction.participants.append(metabolites['ump'][
                              transcription_compartment.id].species_coefficients.get_or_create(
                              coefficient=pre_rna_count['U']-ntp_count['U']))
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 4 other locations - About 2 hrs to fix
              wc_model_gen/eukaryote/transcription.py on lines 526..528
              wc_model_gen/eukaryote/transcription.py on lines 529..531
              wc_model_gen/eukaryote/transcription.py on lines 532..534
              wc_model_gen/eukaryote/transcription.py on lines 535..537

              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 53.

              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

                          reaction.participants.append(metabolites['cmp'][
                              transcription_compartment.id].species_coefficients.get_or_create(
                              coefficient=pre_rna_count['C']-ntp_count['C']))
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 4 other locations - About 2 hrs to fix
              wc_model_gen/eukaryote/transcription.py on lines 526..528
              wc_model_gen/eukaryote/transcription.py on lines 529..531
              wc_model_gen/eukaryote/transcription.py on lines 535..537
              wc_model_gen/eukaryote/transcription.py on lines 538..540

              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 53.

              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

                          reaction.participants.append(metabolites['ppi'][
                              transcription_compartment.id].species_coefficients.get_or_create(
                              coefficient=pre_rna_count['len']-pre_rna_count['N']))
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 4 other locations - About 2 hrs to fix
              wc_model_gen/eukaryote/transcription.py on lines 529..531
              wc_model_gen/eukaryote/transcription.py on lines 532..534
              wc_model_gen/eukaryote/transcription.py on lines 535..537
              wc_model_gen/eukaryote/transcription.py on lines 538..540

              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 53.

              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 3 locations. Consider refactoring.
              Open

                      if elongation_termination_factors:
                          if not any(j in i for i in elongation_termination_factors.keys() for j in ['pol1_', 'pol2_', 'pol3_', 'polm_']):
                              raise ValueError(
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 2 other locations - About 2 hrs to fix
              wc_model_gen/eukaryote/transcription.py on lines 98..100
              wc_model_gen/eukaryote/transcription.py on lines 112..114

              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 51.

              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 3 locations. Consider refactoring.
              Open

                      if init_factors:
                          if not any(j in i for i in init_factors.keys() for j in ['pol1_', 'pol2_', 'pol3_', 'polm_']):
                              raise ValueError(
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 2 other locations - About 2 hrs to fix
              wc_model_gen/eukaryote/transcription.py on lines 105..107
              wc_model_gen/eukaryote/transcription.py on lines 112..114

              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 51.

              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 3 locations. Consider refactoring.
              Open

                      if elongation_negative_factors:
                          if not any(j in i for i in elongation_negative_factors.keys() for j in ['pol1_', 'pol2_', 'pol3_', 'polm_']):
                              raise ValueError(
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 2 other locations - About 2 hrs to fix
              wc_model_gen/eukaryote/transcription.py on lines 98..100
              wc_model_gen/eukaryote/transcription.py on lines 105..107

              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 51.

              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 2 locations. Consider refactoring.
              Open

                              no_of_binding_sites = model.parameters.get_or_create(
                                  id='total_nuclear_genome_binding',
                                  type=None,
                                  value=self._nuclear_max_binding_sites,
                                  units=unit_registry.parse_units('molecule'),
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 1 other location - About 1 hr to fix
              wc_model_gen/eukaryote/transcription.py on lines 873..879

              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 46.

              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 2 locations. Consider refactoring.
              Open

                              no_of_binding_sites = model.parameters.get_or_create(
                                  id='total_mitochondrial_genome_binding',
                                  type=None,
                                  value=self._mitochondrial_max_binding_sites,
                                  units=unit_registry.parse_units('molecule'),
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 1 other location - About 1 hr to fix
              wc_model_gen/eukaryote/transcription.py on lines 863..869

              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 46.

              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

                          reaction.participants.append(metabolites['gtp'][
                              transcription_compartment.id].species_coefficients.get_or_create(
                              coefficient=-pre_rna_count['G']))
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 3 other locations - About 1 hr to fix
              wc_model_gen/eukaryote/transcription.py on lines 498..500
              wc_model_gen/eukaryote/transcription.py on lines 501..503
              wc_model_gen/eukaryote/transcription.py on lines 507..509

              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 45.

              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 2 locations. Consider refactoring.
              Open

                          reg_species[self._allowable_queue_len[rna_kb.id][0].id] = self._allowable_queue_len[rna_kb.id][0]
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 1 other location - About 1 hr to fix
              wc_model_gen/eukaryote/translation_translocation.py on lines 1192..1192

              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 45.

              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

                          reaction.participants.append(metabolites['atp'][
                              transcription_compartment.id].species_coefficients.get_or_create(
                              coefficient=-pre_rna_count['A']))
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 3 other locations - About 1 hr to fix
              wc_model_gen/eukaryote/transcription.py on lines 501..503
              wc_model_gen/eukaryote/transcription.py on lines 504..506
              wc_model_gen/eukaryote/transcription.py on lines 507..509

              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 45.

              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

                          init_reaction = model.reactions.create(
                              submodel=self.submodel, id='transcription_initiation_' + rna_kb.id,
                              name='transcription initiation of ' + rna_kb.name,
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 3 other locations - About 1 hr to fix
              wc_model_gen/eukaryote/transcription.py on lines 457..459
              wc_model_gen/eukaryote/translation_translocation.py on lines 341..343
              wc_model_gen/eukaryote/translation_translocation.py on lines 395..397

              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 45.

              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

                          reaction.participants.append(metabolites['utp'][
                              transcription_compartment.id].species_coefficients.get_or_create(
                              coefficient=-pre_rna_count['U']))
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 3 other locations - About 1 hr to fix
              wc_model_gen/eukaryote/transcription.py on lines 498..500
              wc_model_gen/eukaryote/transcription.py on lines 501..503
              wc_model_gen/eukaryote/transcription.py on lines 504..506

              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 45.

              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

                          reaction = model.reactions.get_or_create(
                              submodel=self.submodel, id='transcription_elongation_' + rna_kb.id,
                              name='transcription elongation of ' + rna_kb.name,
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 3 other locations - About 1 hr to fix
              wc_model_gen/eukaryote/transcription.py on lines 419..421
              wc_model_gen/eukaryote/translation_translocation.py on lines 341..343
              wc_model_gen/eukaryote/translation_translocation.py on lines 395..397

              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 45.

              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

                          reaction.participants.append(metabolites['ctp'][
                              transcription_compartment.id].species_coefficients.get_or_create(
                              coefficient=-pre_rna_count['C']))
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 3 other locations - About 1 hr to fix
              wc_model_gen/eukaryote/transcription.py on lines 498..500
              wc_model_gen/eukaryote/transcription.py on lines 504..506
              wc_model_gen/eukaryote/transcription.py on lines 507..509

              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 45.

              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

                          polr_binding_site_st = model.species_types.get_or_create(
                              id='{}_binding_site'.format(gene.id),
                              name='binding site of {}'.format(gene.name),
                              type=onto['WC:pseudo_species'],
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 3 other locations - About 1 hr to fix
              wc_model_gen/eukaryote/transcription.py on lines 283..286
              wc_model_gen/eukaryote/transcription.py on lines 559..562
              wc_model_gen/eukaryote/translation_translocation.py on lines 318..321

              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 43.

              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

                          polr_bound_non_specific_species_type = model.species_types.get_or_create(
                              id='{}_bound_non_specific_site'.format(polr_complex.id),
                              name='{}-bound non-specific site'.format(polr_complex.id),
                              type=onto['WC:pseudo_species'],                
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 3 other locations - About 1 hr to fix
              wc_model_gen/eukaryote/transcription.py on lines 372..375
              wc_model_gen/eukaryote/transcription.py on lines 559..562
              wc_model_gen/eukaryote/translation_translocation.py on lines 318..321

              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 43.

              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

                                  ribo_binding_site_st = model.species_types.get_or_create(
                                      id='{}_ribosome_binding_site'.format(rna.id),
                                      name='ribosome binding site of {}'.format(rna.name),
                                      type=onto['WC:pseudo_species'],
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 3 other locations - About 1 hr to fix
              wc_model_gen/eukaryote/transcription.py on lines 283..286
              wc_model_gen/eukaryote/transcription.py on lines 372..375
              wc_model_gen/eukaryote/translation_translocation.py on lines 318..321

              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 43.

              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 2 locations. Consider refactoring.
              Open

                      ref_ribo_width = wc_lang.Reference(
                          model=model,
                          title='Genome-wide analysis in vivo of translation with nucleotide resolution using ribosome profiling',
                          author='Nicholas T Ingolia, Sina Ghaemmaghami, John R. S. Newman, Jonathan S. Weissman',        
                          year=2009,
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 1 other location - About 1 hr to fix
              wc_model_gen/eukaryote/transcription.py on lines 182..187

              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 43.

              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

                          reaction.participants.append(metabolites['h'][
                              transcription_compartment.id].species_coefficients.get_or_create(
                              coefficient=pre_rna_count['len']-pre_rna_count['N']+len_add_rna
                                  -ntp_count['len']+1))
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 1 other location - About 1 hr to fix
              wc_model_gen/eukaryote/transcription.py on lines 512..513

              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 43.

              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 2 locations. Consider refactoring.
              Open

                      ref_polr_width = wc_lang.Reference(
                          model=model,
                          title='Structure and mechanism of the RNA Polymerase II transcription machinery',
                          author='Steven Hahn',        
                          year=2004,
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 1 other location - About 1 hr to fix
              wc_model_gen/eukaryote/transcription.py on lines 208..213

              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 43.

              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

                              coefficient=-(pre_rna_count['len']-pre_rna_count['N']+len_add_rna
                                  -ntp_count['len']+1)))
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 1 other location - About 1 hr to fix
              wc_model_gen/eukaryote/transcription.py on lines 541..544

              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 43.

              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 2 locations. Consider refactoring.
              Open

                      if rna_init_factors:
                          for i in set(rna_init_factors.values()):
                              if i not in init_factors:
                                  raise ValueError('{} is not a key in init_factors'.format(i))
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 1 other location - About 1 hr to fix
              wc_model_gen/eukaryote/transcription.py on lines 126..129

              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 41.

              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

                          k_cat_elongation = model.parameters.create(
                              id='k_cat_{}'.format(elongation_reaction.id),
                              type=onto['WC:k_cat'],
                              units=unit_registry.parse_units('molecule^-1 s^-1'),
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 4 other locations - About 1 hr to fix
              wc_model_gen/eukaryote/complexation.py on lines 325..327
              wc_model_gen/eukaryote/translation_translocation.py on lines 980..983
              wc_model_gen/eukaryote/translation_translocation.py on lines 1056..1059
              wc_model_gen/prokaryote/metabolism.py on lines 165..167

              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 41.

              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 2 locations. Consider refactoring.
              Open

                      if rna_elongation_termination_factors:
                          for i in set(rna_elongation_termination_factors.values()):
                              if i not in elongation_termination_factors:
                                  raise ValueError('{} is not a key in elongation_termination_factors'.format(i))
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 1 other location - About 1 hr to fix
              wc_model_gen/eukaryote/transcription.py on lines 119..122

              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 41.

              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 3 locations. Consider refactoring.
              Open

                      ref_polr_distribution = wc_lang.Reference(
                          model=model,
                          title='In vivo dynamics of RNA polymerase II transcription',
                          author='Xavier Darzacq, Yaron Shav-Tal, Valeria de Turris, Yehuda Brody, '
                              'Shailesh M Shenoy, Robert D Phair, Robert H Singer',        
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 2 other locations - About 1 hr to fix
              wc_model_gen/eukaryote/transcription.py on lines 609..615
              wc_model_gen/eukaryote/transcription.py on lines 622..627

              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 40.

              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 3 locations. Consider refactoring.
              Open

                      ref_model = wc_lang.Reference(
                          model=model,
                          title='Transcriptional regulation by the numbers: models',
                          author='Lacramioara Bintu, Nicolas E. Buchler, Hernan G. Garcia, '
                              'Ulrich Gerland, Terence Hwa, Jane Kondev, Rob Phillips',        
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 2 other locations - About 1 hr to fix
              wc_model_gen/eukaryote/transcription.py on lines 195..201
              wc_model_gen/eukaryote/transcription.py on lines 622..627

              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 40.

              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 3 locations. Consider refactoring.
              Open

                      ref_kd = wc_lang.Reference(
                          model=model,
                          title='Macromolecular crowding as a regulator of gene transcription',
                          author='Hiroaki Matsuda, Gregory Garbes Putzel, Vadim Backman, Igal Szleifer',        
                          year=2014,
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 2 other locations - About 1 hr to fix
              wc_model_gen/eukaryote/transcription.py on lines 195..201
              wc_model_gen/eukaryote/transcription.py on lines 609..615

              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 40.

              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 2 locations. Consider refactoring.
              Open

                      Kd_specific_polr = model.parameters.create(
                          id='K_d_specific_polr',
                          type=None,
                          value=1e-09,
                          units=unit_registry.parse_units('M'),
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 1 other location - About 1 hr to fix
              wc_model_gen/eukaryote/transcription.py on lines 634..639

              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 38.

              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 2 locations. Consider refactoring.
              Open

                      Kd_non_specific_polr = model.parameters.create(
                          id='K_d_non_specific_polr',
                          type=None,
                          value=1e-03,
                          units=unit_registry.parse_units('M'),
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 1 other location - About 1 hr to fix
              wc_model_gen/eukaryote/transcription.py on lines 643..648

              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 38.

              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

                      rnas_kb = [i for i in cell.species_types.get(__type=wc_kb.eukaryote.TranscriptSpeciesType) \
                          if i.id not in transcribed_together]
              Severity: Minor
              Found in wc_model_gen/eukaryote/transcription.py and 1 other location - About 55 mins to fix
              wc_model_gen/eukaryote/transcription.py on lines 857..858

              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 37.

              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

                      rnas_kb = [i for i in cell.species_types.get(__type=wc_kb.eukaryote.TranscriptSpeciesType) \
                          if i.id not in transcribed_together]
              Severity: Minor
              Found in wc_model_gen/eukaryote/transcription.py and 1 other location - About 55 mins to fix
              wc_model_gen/eukaryote/transcription.py on lines 1106..1107

              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 37.

              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 13 locations. Consider refactoring.
              Open

                              init_reaction.participants.append(metabolites['h'][
                                  transcription_compartment.id].species_coefficients.get_or_create(
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 12 other locations - About 45 mins to fix
              wc_model_gen/eukaryote/transcription.py on lines 439..440
              wc_model_gen/eukaryote/transcription.py on lines 442..443
              wc_model_gen/eukaryote/transcription.py on lines 445..446
              wc_model_gen/eukaryote/transcription.py on lines 448..449
              wc_model_gen/eukaryote/translation_translocation.py on lines 358..359
              wc_model_gen/eukaryote/translation_translocation.py on lines 360..361
              wc_model_gen/eukaryote/translation_translocation.py on lines 362..363
              wc_model_gen/eukaryote/translation_translocation.py on lines 369..370
              wc_model_gen/eukaryote/translation_translocation.py on lines 371..372
              wc_model_gen/eukaryote/translation_translocation.py on lines 373..374
              wc_model_gen/eukaryote/translation_translocation.py on lines 375..376
              wc_model_gen/eukaryote/translation_translocation.py on lines 377..378

              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 35.

              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 13 locations. Consider refactoring.
              Open

                              init_reaction.participants.append(metabolites['h2o'][
                                  transcription_compartment.id].species_coefficients.get_or_create(
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 12 other locations - About 45 mins to fix
              wc_model_gen/eukaryote/transcription.py on lines 439..440
              wc_model_gen/eukaryote/transcription.py on lines 445..446
              wc_model_gen/eukaryote/transcription.py on lines 448..449
              wc_model_gen/eukaryote/transcription.py on lines 451..452
              wc_model_gen/eukaryote/translation_translocation.py on lines 358..359
              wc_model_gen/eukaryote/translation_translocation.py on lines 360..361
              wc_model_gen/eukaryote/translation_translocation.py on lines 362..363
              wc_model_gen/eukaryote/translation_translocation.py on lines 369..370
              wc_model_gen/eukaryote/translation_translocation.py on lines 371..372
              wc_model_gen/eukaryote/translation_translocation.py on lines 373..374
              wc_model_gen/eukaryote/translation_translocation.py on lines 375..376
              wc_model_gen/eukaryote/translation_translocation.py on lines 377..378

              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 35.

              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 13 locations. Consider refactoring.
              Open

                              init_reaction.participants.append(metabolites['pi'][
                                  transcription_compartment.id].species_coefficients.get_or_create(
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 12 other locations - About 45 mins to fix
              wc_model_gen/eukaryote/transcription.py on lines 439..440
              wc_model_gen/eukaryote/transcription.py on lines 442..443
              wc_model_gen/eukaryote/transcription.py on lines 445..446
              wc_model_gen/eukaryote/transcription.py on lines 451..452
              wc_model_gen/eukaryote/translation_translocation.py on lines 358..359
              wc_model_gen/eukaryote/translation_translocation.py on lines 360..361
              wc_model_gen/eukaryote/translation_translocation.py on lines 362..363
              wc_model_gen/eukaryote/translation_translocation.py on lines 369..370
              wc_model_gen/eukaryote/translation_translocation.py on lines 371..372
              wc_model_gen/eukaryote/translation_translocation.py on lines 373..374
              wc_model_gen/eukaryote/translation_translocation.py on lines 375..376
              wc_model_gen/eukaryote/translation_translocation.py on lines 377..378

              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 35.

              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 13 locations. Consider refactoring.
              Open

                              init_reaction.participants.append(metabolites['atp'][
                                  transcription_compartment.id].species_coefficients.get_or_create(
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 12 other locations - About 45 mins to fix
              wc_model_gen/eukaryote/transcription.py on lines 442..443
              wc_model_gen/eukaryote/transcription.py on lines 445..446
              wc_model_gen/eukaryote/transcription.py on lines 448..449
              wc_model_gen/eukaryote/transcription.py on lines 451..452
              wc_model_gen/eukaryote/translation_translocation.py on lines 358..359
              wc_model_gen/eukaryote/translation_translocation.py on lines 360..361
              wc_model_gen/eukaryote/translation_translocation.py on lines 362..363
              wc_model_gen/eukaryote/translation_translocation.py on lines 369..370
              wc_model_gen/eukaryote/translation_translocation.py on lines 371..372
              wc_model_gen/eukaryote/translation_translocation.py on lines 373..374
              wc_model_gen/eukaryote/translation_translocation.py on lines 375..376
              wc_model_gen/eukaryote/translation_translocation.py on lines 377..378

              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 35.

              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 13 locations. Consider refactoring.
              Open

                              init_reaction.participants.append(metabolites['adp'][
                                  transcription_compartment.id].species_coefficients.get_or_create(
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 12 other locations - About 45 mins to fix
              wc_model_gen/eukaryote/transcription.py on lines 439..440
              wc_model_gen/eukaryote/transcription.py on lines 442..443
              wc_model_gen/eukaryote/transcription.py on lines 448..449
              wc_model_gen/eukaryote/transcription.py on lines 451..452
              wc_model_gen/eukaryote/translation_translocation.py on lines 358..359
              wc_model_gen/eukaryote/translation_translocation.py on lines 360..361
              wc_model_gen/eukaryote/translation_translocation.py on lines 362..363
              wc_model_gen/eukaryote/translation_translocation.py on lines 369..370
              wc_model_gen/eukaryote/translation_translocation.py on lines 371..372
              wc_model_gen/eukaryote/translation_translocation.py on lines 373..374
              wc_model_gen/eukaryote/translation_translocation.py on lines 375..376
              wc_model_gen/eukaryote/translation_translocation.py on lines 377..378

              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 35.

              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 3 locations. Consider refactoring.
              Open

                          specific_binding_constant = model.parameters.create(
                              id='k_specific_binding_{}'.format(polr_complex.id),
                              type=None,
                              units=unit_registry.parse_units('molecule^-2 s^-1')
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 2 other locations - About 45 mins to fix
              wc_model_gen/eukaryote/transcription.py on lines 680..683
              wc_model_gen/eukaryote/translation_translocation.py on lines 791..794

              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 35.

              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 3 locations. Consider refactoring.
              Open

                          non_specific_binding_constant = model.parameters.create(
                              id='k_non_specific_binding_{}'.format(polr_complex.id),
                              type=None,
                              units=unit_registry.parse_units('molecule^-1 s^-1')
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 2 other locations - About 45 mins to fix
              wc_model_gen/eukaryote/transcription.py on lines 743..746
              wc_model_gen/eukaryote/translation_translocation.py on lines 791..794

              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 35.

              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 2 locations. Consider refactoring.
              Open

                                  add_seq = {k:v+add_count[k] for k,v in add_seq.items()}
              Severity: Minor
              Found in wc_model_gen/eukaryote/transcription.py and 1 other location - About 40 mins to fix
              wc_model_gen/eukaryote/transcription.py on lines 492..492

              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 2 locations. Consider refactoring.
              Open

                              ntp_count = {k:v+add_seq[k] for k,v in ntp_count.items()}        
              Severity: Minor
              Found in wc_model_gen/eukaryote/transcription.py and 1 other location - About 40 mins to fix
              wc_model_gen/eukaryote/transcription.py on lines 354..354

              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 12 locations. Consider refactoring.
              Open

                      Avogadro = model.parameters.get_or_create(
                          id='Avogadro',
                          type=None,
                          value=scipy.constants.Avogadro,
                          units=unit_registry.parse_units('molecule mol^-1'))
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 11 other locations - About 40 mins to fix
              wc_model_gen/eukaryote/complexation.py on lines 363..367
              wc_model_gen/eukaryote/translation_translocation.py on lines 1387..1391
              wc_model_gen/prokaryote/protein_degradation.py on lines 131..135
              wc_model_gen/prokaryote/rna_degradation.py on lines 107..111
              wc_model_gen/prokaryote/transcription.py on lines 105..109
              wc_model_gen/prokaryote/translation.py on lines 167..171
              wc_model_gen/utils.py on lines 210..214
              wc_model_gen/utils.py on lines 255..259
              wc_model_gen/utils.py on lines 343..347
              wc_model_gen/utils.py on lines 432..436
              wc_model_gen/utils.py on lines 514..518

              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

                      min_bool = model.parameters.get_or_create(
                          id='min_bool_substance',
                          type=None,
                          value=0,
                          units=unit_registry.parse_units('molecule'),
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 3 other locations - About 35 mins to fix
              wc_model_gen/eukaryote/transcription.py on lines 652..656
              wc_model_gen/eukaryote/translation_translocation.py on lines 567..571
              wc_model_gen/eukaryote/translation_translocation.py on lines 575..579

              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 2 locations. Consider refactoring.
              Open

                          polr_obs_exp, error = wc_lang.ObservableExpression.deserialize(
                              ' + '.join(all_subtotal_obs.keys()),
                              {wc_lang.Observable: all_subtotal_obs})            
              Severity: Minor
              Found in wc_model_gen/eukaryote/transcription.py and 1 other location - About 35 mins to fix
              wc_model_gen/eukaryote/protein_degradation.py on lines 203..205

              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 4 locations. Consider refactoring.
              Open

                      max_bool = model.parameters.get_or_create(
                          id='max_bool_substance',
                          type=None,
                          value=1,
                          units=unit_registry.parse_units('molecule'),
              Severity: Major
              Found in wc_model_gen/eukaryote/transcription.py and 3 other locations - About 35 mins to fix
              wc_model_gen/eukaryote/transcription.py on lines 660..664
              wc_model_gen/eukaryote/translation_translocation.py on lines 567..571
              wc_model_gen/eukaryote/translation_translocation.py on lines 575..579

              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 2 locations. Consider refactoring.
              Open

                          polr_bound_non_specific_species_type.structure = wc_lang.ChemicalStructure(
                                  empirical_formula = polr_complex.structure.empirical_formula,
                                  molecular_weight = polr_complex.structure.molecular_weight,
                                  charge = polr_complex.structure.charge)
              Severity: Minor
              Found in wc_model_gen/eukaryote/transcription.py and 1 other location - About 35 mins to fix
              wc_model_gen/eukaryote/transcription.py on lines 403..406

              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 2 locations. Consider refactoring.
              Open

                          polr_bound_species_type.structure = wc_lang.ChemicalStructure(
                                  empirical_formula = polr_complex.structure.empirical_formula,
                                  molecular_weight = polr_complex.structure.molecular_weight,
                                  charge = polr_complex.structure.charge)
              Severity: Minor
              Found in wc_model_gen/eukaryote/transcription.py and 1 other location - About 35 mins to fix
              wc_model_gen/eukaryote/transcription.py on lines 288..291

              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

              There are no issues that match your filters.

              Category
              Status