KarrLab/wc_model_gen

View on GitHub
wc_model_gen/eukaryote/translation_translocation.py

Summary

Maintainability
F
1 mo
Test Coverage
A
95%

File translation_translocation.py has 1320 lines of code (exceeds 250 allowed). Consider refactoring.
Open

""" Generator for translation, protein folding and translocation submodel for eukaryotes
:Author: Yin Hoon Chew <yinhoon.chew@mssm.edu>
:Date: 2019-06-14
:Copyright: 2019, Karr Lab
:License: MIT
Severity: Major
Found in wc_model_gen/eukaryote/translation_translocation.py - About 3 days to fix

    Function gen_rate_laws has a Cognitive Complexity of 164 (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/translation_translocation.py - About 3 days to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function calibrate_submodel has a Cognitive Complexity of 142 (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/translation_translocation.py - About 2 days to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

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

        def gen_reactions(self):
            """ Generate reactions associated with submodel """
            model = self.model
            cell = self.knowledge_base.cell
            
    Severity: Minor
    Found in wc_model_gen/eukaryote/translation_translocation.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 _import_cytosolic_trna_into_mitochondria has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
    Open

        def _import_cytosolic_trna_into_mitochondria(self, cytosolic_trna_ids):
            """ Create reactions and rate laws for importing cytosolic tRNAs into the mitochondria.
                The concentrations of imported tRNAs in the mitochondria are set based on
                the provided fraction and the rates of transport are calibrated accordingly to achieve
                steady-states
    Severity: Minor
    Found in wc_model_gen/eukaryote/translation_translocation.py - About 5 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 gen_rate_laws has 38 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/translation_translocation.py - About 1 hr to fix

      Function calibrate_submodel has 35 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/translation_translocation.py - About 1 hr to fix

        Function clean_and_validate_options has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def clean_and_validate_options(self):
                """ Apply default options and validate options """
                options = self.options
        
                if 'cytoplasmic_ribosome' not in options:
        Severity: Minor
        Found in wc_model_gen/eukaryote/translation_translocation.py - About 1 hr to fix

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

              def clean_and_validate_options(self):
                  """ Apply default options and validate options """
                  options = self.options
          
                  if 'cytoplasmic_ribosome' not in options:
          Severity: Minor
          Found in wc_model_gen/eukaryote/translation_translocation.py - About 1 hr to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Avoid deeply nested control flow statements.
          Open

                                  if aa_coefficient:
                                      old_coef = aa_coefficient.coefficient
                                      el_reaction.participants.remove(aa_coefficient)
                                      el_reaction.participants.add(
                                          aa_species.species_coefficients.get_or_create(
          Severity: Major
          Found in wc_model_gen/eukaryote/translation_translocation.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    if aa_functions[translation_compartment.id][aa_met][
                                        'function'].id not in expression_terms:
                                        
                                        expression_terms.append(aa_functions[translation_compartment.id][
                                            aa_met]['function'].id)
            Severity: Major
            Found in wc_model_gen/eukaryote/translation_translocation.py - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                      if translation_compartment.id == 'c':    
                                          matched_trnas = [trna_functions[translation_compartment.id][i]]
                                      else:
                                          if i in trna_functions[translation_compartment.id]:
                                              matched_trnas = [trna_functions[translation_compartment.id][i]]
              Severity: Major
              Found in wc_model_gen/eukaryote/translation_translocation.py - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        if cplx_species.compartment in conc_per_comp:
                                            conc_per_comp[cplx_species.compartment] += stoic * \
                                                cplx_species.distribution_init_concentration.mean
                                        else:        
                                            conc_per_comp[cplx_species.compartment] = stoic * \
                Severity: Major
                Found in wc_model_gen/eukaryote/translation_translocation.py - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                          for codon_info in matched_trnas:    
                                              expression_terms.append(codon_info['function'].id)
                                              objects[wc_lang.Function][codon_info['function'].id] = codon_info['function']                        
                                              for cl, dictionary in objects.items():
                                                  dictionary.update(codon_info['objects'][cl])                    
                  Severity: Major
                  Found in wc_model_gen/eukaryote/translation_translocation.py - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            if species.distribution_init_concentration.mean:
                                                model_Km.value = beta * species.distribution_init_concentration.mean \
                                                    / Avogadro.value / species.compartment.init_volume.mean
                                                model_Km.comments = 'The value was assumed to be {} times the concentration of {} in {}'.format(
                                                    beta, species.species_type.id, species.compartment.name)
                    Severity: Major
                    Found in wc_model_gen/eukaryote/translation_translocation.py - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                              if species.distribution_init_concentration.mean:                        
                                                  model_Km.value = beta * species.distribution_init_concentration.mean \
                                                      / Avogadro.value / species.compartment.init_volume.mean
                                                  model_Km.comments = 'The value was assumed to be {} times the concentration of {} in {}'.format(
                                                      beta, species.species_type.id, species.compartment.name)
                      Severity: Major
                      Found in wc_model_gen/eukaryote/translation_translocation.py - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                if serine_coefficient:
                                                    old_coef = serine_coefficient.coefficient
                                                    el_reaction.participants.remove(serine_coefficient)
                                                    el_reaction.participants.add(
                                                        serine_species.species_coefficients.get_or_create(
                        Severity: Major
                        Found in wc_model_gen/eukaryote/translation_translocation.py - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                  for species in obs.expression.species:    
                                                      trans_species_counts[species.id] = species.distribution_init_concentration.mean
                          
                          
                          Severity: Major
                          Found in wc_model_gen/eukaryote/translation_translocation.py - About 45 mins to fix

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

                                    for comp, factors in {cytosol: cytoplasmic_initiation_factors, mitochondrion: mitochondrial_initiation_factors}.items():
                                        n = 1
                                        for factor in factors:
                                            factor_exp, all_species, all_parameters, all_volumes, all_observables = utils.gen_response_functions(
                                                model, beta, 'translation_init_{}'.format(comp.id), 'translation_init_{}'.format(comp.id), comp, [factor])
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 1 day to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 715..739

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

                            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

                                    for comp, factors in {cytosol: cytoplasmic_elongation_factors, mitochondrion: mitochondrial_elongation_factors}.items():
                                        n = 1
                                        for factor in factors:
                                            factor_exp, all_species, all_parameters, all_volumes, all_observables = utils.gen_response_functions(
                                                model, beta, 'translation_el_{}'.format(comp.id), 'translation_el_{}'.format(comp.id), comp, [factor])
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 1 day to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 687..711

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

                            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 init_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(init_reaction.id, species.species_type.id))
                                            if model_Km:
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 3 other locations - About 1 day to fix
                            wc_model_gen/eukaryote/transcription.py on lines 1232..1245
                            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 4 locations. Consider refactoring.
                            Open

                                        for species in el_reaction.rate_laws[0].expression.species:
                                            el_species_counts[species.id] = species.distribution_init_concentration.mean
                                            model_Km = model.parameters.get_one(
                                                    id='K_m_{}_{}'.format(el_reaction.id, species.species_type.id))
                                            if model_Km:
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 3 other locations - About 1 day to fix
                            wc_model_gen/eukaryote/transcription.py on lines 1232..1245
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1194..1207
                            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 4 locations. Consider refactoring.
                            Open

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

                            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

                            Identical blocks of code found in 2 locations. Consider refactoring.
                            Open

                                                if model.parameters.get(id='K_m_{}_{}'.format(reaction.id, species.species_type.id)):
                                                    model_Km = model.parameters.get_one(
                                                        id='K_m_{}_{}'.format(reaction.id, species.species_type.id))
                                                    if species.distribution_init_concentration.mean:
                                                        model_Km.value = beta * species.distribution_init_concentration.mean \
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 1 day to fix
                            wc_model_gen/eukaryote/rna_degradation.py on lines 235..246

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

                            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 trna.species[0].compartment.id == 'm':
                                                if codon in trna_grouping['m']: 
                                                    trna_grouping['m'][codon]['trna'].append(trna.id)
                                                    trna_grouping['m'][codon]['anticodon'].append(anticodon_prop[0])
                                                else:
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 1 day to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 591..609

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

                            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_factors:
                                            factor_details = el_factor_functions[translation_compartment.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/translation_translocation.py and 2 other locations - About 7 hrs to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 804..809
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1041..1046

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

                            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 initiation_factors:
                                            factor_details = init_factor_functions[translation_compartment.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/translation_translocation.py and 2 other locations - About 7 hrs to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 868..873
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1041..1046

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

                            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 chaperones:
                                                factor_details = trans_factor_functions[chaperone_compartment.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/translation_translocation.py and 2 other locations - About 7 hrs to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 804..809
                            wc_model_gen/eukaryote/translation_translocation.py on lines 868..873

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

                            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

                                            for aa in protein_seq:
                                                aa_id = amino_acid_id_conversion[aa]
                                                if aa_id not in aa_content:
                                                    aa_content[aa_id] = 1
                                                    gvar.protein_aa_usage[mrna_kb.protein.id][aa] = 1
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 6 hrs to fix
                            wc_model_gen/eukaryote/complexation.py on lines 197..204

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

                            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

                                        for codon_info in matched_trnas:
                                            expression_terms.append(codon_info['function'].id)
                                            objects[wc_lang.Function][codon_info['function'].id] = codon_info['function']                
                                            for cl, dictionary in objects.items():
                                                dictionary.update(codon_info['objects'][cl])                 
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 5 hrs to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 941..945

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

                            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 average_rate:            
                                            model_kcat.value = 1.
                                            eval_rate_law = init_reaction.rate_laws[0].expression._parsed_expression.eval({
                                                wc_lang.Species: init_species_counts,
                                                wc_lang.Compartment: init_compartment_volumes,
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 5 hrs to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1261..1273

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

                            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

                                                    for codon_info in matched_trnas:    
                                                        expression_terms.append(codon_info['function'].id)
                                                        objects[wc_lang.Function][codon_info['function'].id] = codon_info['function']                        
                                                        for cl, dictionary in objects.items():
                                                            dictionary.update(codon_info['objects'][cl])                    
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 5 hrs to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 814..818

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

                            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 average_rate:            
                                            model_kcat.value = 1.
                                            eval_rate_law = el_reaction.rate_laws[0].expression._parsed_expression.eval({
                                                wc_lang.Species: el_species_counts,
                                                wc_lang.Compartment: init_compartment_volumes,
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 5 hrs to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1218..1230

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

                            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 trans_reaction.rate_laws[0].expression.functions:
                                                for species in func.expression.species:
                                                    trans_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/translation_translocation.py and 3 other locations - About 4 hrs to fix
                            wc_model_gen/eukaryote/transcription.py on lines 1247..1252
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1209..1214
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1252..1257

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

                                        for func in init_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/translation_translocation.py and 3 other locations - About 4 hrs to fix
                            wc_model_gen/eukaryote/transcription.py on lines 1247..1252
                            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 4 locations. Consider refactoring.
                            Open

                                        for func in el_reaction.rate_laws[0].expression.functions:                
                                            for species in func.expression.species:
                                                el_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/translation_translocation.py and 3 other locations - About 4 hrs to fix
                            wc_model_gen/eukaryote/transcription.py on lines 1247..1252
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1209..1214
                            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

                                                    if aa_coefficient:
                                                        old_coef = aa_coefficient.coefficient
                                                        el_reaction.participants.remove(aa_coefficient)
                                                        el_reaction.participants.add(
                                                            aa_species.species_coefficients.get_or_create(
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 4 hrs to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 413..422

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

                            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 serine_coefficient:
                                                        old_coef = serine_coefficient.coefficient
                                                        el_reaction.participants.remove(serine_coefficient)
                                                        el_reaction.participants.add(
                                                            serine_species.species_coefficients.get_or_create(
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 4 hrs to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 436..445

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

                            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 = gvar.transcript_ntp_usage[trna_id] = {
                                                    '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/translation_translocation.py and 1 other location - About 3 hrs to fix
                            wc_model_gen/eukaryote/transcription.py on lines 347..352

                            Duplicated Code

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

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

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

                            Tuning

                            This issue has a mass of 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

                                        if mrna_kb.protein.id in gvar.protein_aa_usage:                                        
                                            for aa, aa_id in amino_acid_id_conversion.items():
                                                if gvar.protein_aa_usage[mrna_kb.protein.id][aa]:
                                                    aa_content[aa_id] = gvar.protein_aa_usage[mrna_kb.protein.id][aa]
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 3 hrs to fix
                            wc_model_gen/eukaryote/complexation.py on lines 178..181

                            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

                                                        objects[wc_lang.Function][aa_functions[translation_compartment.id][
                                                            aa_met]['function'].id] = aa_functions[translation_compartment.id][
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 2 hrs to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 822..823

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

                            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

                                        objects[wc_lang.Function][aa_functions[translation_compartment.id][
                                            start_aa_met]['function'].id] = aa_functions[translation_compartment.id][
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 2 hrs to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 961..962

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

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

                                            if mrna_kb.gene.id in selenoproteome:
                                                processed_seq = raw_seq[:-1] if raw_seq.endswith('*') else raw_seq
                                                protein_seq = ''.join(i if i!='*' else 'U' for i in processed_seq)
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 2 other locations - About 2 hrs to fix
                            wc_model_gen/eukaryote/complexation.py on lines 191..193
                            wc_model_gen/eukaryote/protein_degradation.py on lines 99..101

                            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

                                    if not numpy.isnan(median_init_kcat): 
                                        for model_kcat in undetermined_init_kcat:
                                            model_kcat.value = median_init_kcat
                                            model_kcat.comments = 'Set to the median value because it could not be determined from data'
                                    else:
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 2 other locations - About 2 hrs to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1344..1351
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1354..1361

                            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

                                    if not numpy.isnan(median_transloc_kcat):
                                        for model_kcat in undetermined_transloc_kcat:
                                            model_kcat.value = median_transloc_kcat
                                            model_kcat.comments = 'Set to the median value because it could not be determined from data'
                                    else:
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 2 other locations - About 2 hrs to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1334..1341
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1344..1351

                            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

                                    if not numpy.isnan(median_el_kcat):
                                        for model_kcat in undetermined_el_kcat:
                                            model_kcat.value = median_el_kcat
                                            model_kcat.comments = 'Set to the median value because it could not be determined from data'
                                    else:
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 2 other locations - About 2 hrs to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1334..1341
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1354..1361

                            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

                                            cyto_deg_rate = cyto_deg_reaction.rate_laws[0].expression._parsed_expression.eval({
                                                wc_lang.Species: cyto_species_counts,
                                                wc_lang.Compartment: {
                                                    cytosol.id: cytosol.init_volume.mean * \
                                                        cytosol.init_density.value}
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 2 other locations - About 2 hrs to fix
                            wc_model_gen/eukaryote/transcription.py on lines 1258..1262
                            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 3 locations. Consider refactoring.
                            Open

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

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

                                                        for cl, dictionary in objects.items():
                                                            dictionary.update(aa_functions[translation_compartment.id][
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 1 hr to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 825..826

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

                            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

                                        for cl, dictionary in objects.items():
                                            dictionary.update(aa_functions[translation_compartment.id][
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 1 hr to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 964..965

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

                            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

                                        el_reaction = model.reactions.get_or_create(
                                            submodel=self.submodel, id='translation_elongation_' + mrna_kb.id,
                                            name='translation elongation of ' + mrna_kb.name,
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 3 other locations - About 1 hr to fix
                            wc_model_gen/eukaryote/transcription.py on lines 419..421
                            wc_model_gen/eukaryote/transcription.py on lines 457..459
                            wc_model_gen/eukaryote/translation_translocation.py on lines 341..343

                            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='translation_initiation_' + mrna_kb.id,
                                            name='translation initiation of ' + mrna_kb.name,
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 3 other locations - About 1 hr to fix
                            wc_model_gen/eukaryote/transcription.py on lines 419..421
                            wc_model_gen/eukaryote/transcription.py on lines 457..459
                            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 2 locations. Consider refactoring.
                            Open

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

                            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

                                                    'function': model.functions.create(     
                                                        id='aminoacid_function_{}_{}'.format(aa_id, compartment.id),               
                                                        name='response function for amino acid {} in {}'.format(aa_id, compartment.name),
                                                        expression=aa_expression,
                                                        units=unit_registry.parse_units(''),
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 1 hr to fix
                            wc_model_gen/eukaryote/translation_translocation.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 44.

                            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

                                                trna_factor_function = model.functions.create(     
                                                    id='trna_function_{}_{}'.format(anticodons, compartment.id),               
                                                    name='tRNA response function for anticodon(s) {} in {}'.format(
                                                        anticodons, compartment.name),
                                                    expression=trna_expression,
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 1 hr to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 676..680

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

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

                                    mrna_kbs = [i for i in cell.species_types.get(__type=wc_kb.eukaryote.TranscriptSpeciesType) \
                                        if i.type==wc_kb.eukaryote.TranscriptType.mRna]
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 2 other locations - About 1 hr to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 770..771
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1132..1133

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

                                    mrna_kbs = [i for i in cell.species_types.get(__type=wc_kb.eukaryote.TranscriptSpeciesType) \
                                        if i.type==wc_kb.eukaryote.TranscriptType.mRna]
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 2 other locations - About 1 hr to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 251..252
                            wc_model_gen/eukaryote/translation_translocation.py on lines 770..771

                            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_bound_species_type = model.species_types.get_or_create(
                                            id='ribo_bound_{}'.format(mrna_kb.id),
                                            name='Ribosome bound {}'.format(mrna_kb.name),
                                            type=wc_ontology['WC:pseudo_species'],                
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.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/transcription.py on lines 559..562

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

                                    mrna_kbs = [i for i in cell.species_types.get(__type=wc_kb.eukaryote.TranscriptSpeciesType) \
                                        if i.type==wc_kb.eukaryote.TranscriptType.mRna]      
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 2 other locations - About 1 hr to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 251..252
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1132..1133

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

                                            trans_reaction.participants.append(model.species_types.get_one(id='h2o').species.get_one(
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 2 other locations - About 1 hr to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 530..530
                            wc_model_gen/eukaryote/translation_translocation.py on lines 532..532

                            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

                                            trans_reaction.participants.append(model.species_types.get_one(id='pi').species.get_one(
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 2 other locations - About 1 hr to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 522..522
                            wc_model_gen/eukaryote/translation_translocation.py on lines 532..532

                            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

                                            trans_reaction.participants.append(model.species_types.get_one(id='h').species.get_one(
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 2 other locations - About 1 hr to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 522..522
                            wc_model_gen/eukaryote/translation_translocation.py on lines 530..530

                            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

                                            trans_reaction.participants.append(model.species_types.get_one(id=energy_reactant).species.get_one(
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 1 hr to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 528..528

                            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=wc_ontology['WC:k_cat'],
                                            units=unit_registry.parse_units('molecule^-1 s^-1'),
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 4 other locations - About 1 hr to fix
                            wc_model_gen/eukaryote/complexation.py on lines 325..327
                            wc_model_gen/eukaryote/transcription.py on lines 1050..1053
                            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

                                            trans_reaction.participants.append(model.species_types.get_one(id=energy_product).species.get_one(
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 1 hr to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 520..520

                            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_translocation = model.parameters.create(
                                                id='k_cat_{}'.format(reaction.id),
                                                type=wc_ontology['WC:k_cat'],
                                                units=unit_registry.parse_units('molecule^-1 s^-1'),
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 4 other locations - About 1 hr to fix
                            wc_model_gen/eukaryote/complexation.py on lines 325..327
                            wc_model_gen/eukaryote/transcription.py on lines 1050..1053
                            wc_model_gen/eukaryote/translation_translocation.py on lines 980..983
                            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

                                            import_rate_law_expression, error = wc_lang.RateLawExpression.deserialize(expression, {
                                                wc_lang.Species: {cyto_trna_species.id: cyto_trna_species},
                                                wc_lang.Parameter: {import_constant.id: import_constant},
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 1 hr to fix
                            wc_model_gen/eukaryote/complexation.py on lines 337..339

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

                            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

                                            protein_species = model.species_types.get_one(
                                                id=reaction.id.split('_')[1]).species.get_one(compartment=translation_compartment)
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 1 hr to fix
                            wc_model_gen/eukaryote/complexation.py on lines 412..413

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

                            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

                                        init_rate_law = model.rate_laws.create(
                                            direction=wc_lang.RateLawDirection.forward,
                                            type=None,
                                            expression=init_rate_law_expression,
                                            reaction=init_reaction,
                            Severity: Minor
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 55 mins to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1443..1448

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

                                            import_rate_law = model.rate_laws.create(
                                                direction=wc_lang.RateLawDirection.forward,
                                                type=None,
                                                expression=import_rate_law_expression,
                                                reaction=import_reaction,
                            Severity: Minor
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 55 mins to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 849..854

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

                                        el_reaction.participants.append(metabolites['pi'][
                                            translation_compartment.id].species_coefficients.get_or_create(
                                                coefficient=(gvar.protein_aa_usage[mrna_kb.protein.id]['len']-1)*3 + 1))            
                            Severity: Minor
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 55 mins to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 461..461

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

                                                coefficient=-((gvar.protein_aa_usage[mrna_kb.protein.id]['len']-1)*2 + 1)))           
                            Severity: Minor
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 55 mins to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 476..478

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

                                    Avogadro = self.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/translation_translocation.py and 2 other locations - About 50 mins to fix
                            wc_model_gen/eukaryote/protein_degradation.py on lines 243..247
                            wc_model_gen/eukaryote/rna_degradation.py on lines 200..204

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

                            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['gtp'][
                                            translation_compartment.id].species_coefficients.get_or_create(coefficient=-2))
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.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/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 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'][
                                            translation_compartment.id].species_coefficients.get_or_create(coefficient=-5))
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.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/transcription.py on lines 451..452
                            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'][
                                            translation_compartment.id].species_coefficients.get_or_create(coefficient=-2))
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.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/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 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['h'][
                                            translation_compartment.id].species_coefficients.get_or_create(coefficient=5))
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.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/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 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['amp'][
                                            translation_compartment.id].species_coefficients.get_or_create(coefficient=1))
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.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/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 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'][
                                            translation_compartment.id].species_coefficients.get_or_create(coefficient=1))
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.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/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 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 2 locations. Consider refactoring.
                            Open

                                            gvar.protein_aa_usage[mrna_kb.protein.id] = {i:0 for i in list(amino_acid_id_conversion.keys())}
                            Severity: Minor
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 45 mins to fix
                            wc_model_gen/eukaryote/complexation.py on lines 183..184

                            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['gdp'][
                                            translation_compartment.id].species_coefficients.get_or_create(coefficient=2))
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.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/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 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 2 locations. Consider refactoring.
                            Open

                                                    el_reaction.participants.append(metabolites['ppi'][
                                                        translation_compartment.id].species_coefficients.get_or_create(
                            Severity: Minor
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 45 mins to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 426..427

                            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='{}_ribosome_binding_constant'.format(mrna_kb.id),
                                            type=None,
                                            units=unit_registry.parse_units('molecule^-2 s^-1'),
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 2 other locations - About 45 mins to fix
                            wc_model_gen/eukaryote/transcription.py on lines 680..683
                            wc_model_gen/eukaryote/transcription.py on lines 743..746

                            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'][
                                            translation_compartment.id].species_coefficients.get_or_create(coefficient=5))
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.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/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

                            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

                                                    el_reaction.participants.append(metabolites['adp'][
                                                        translation_compartment.id].species_coefficients.get_or_create(
                            Severity: Minor
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 1 other location - About 45 mins to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 429..430

                            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 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/translation_translocation.py and 11 other locations - About 40 mins to fix
                            wc_model_gen/eukaryote/complexation.py on lines 363..367
                            wc_model_gen/eukaryote/transcription.py on lines 1095..1099
                            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/translation_translocation.py and 3 other locations - About 35 mins to fix
                            wc_model_gen/eukaryote/transcription.py on lines 652..656
                            wc_model_gen/eukaryote/transcription.py on lines 660..664
                            wc_model_gen/eukaryote/translation_translocation.py on lines 567..571

                            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

                                            reaction.participants.append(metabolites['amp'].species_coefficients.get_or_create(
                                                coefficient=ntp_count['A']))
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 3 other locations - About 35 mins to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1502..1503
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1504..1505
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1506..1507

                            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

                                            reaction.participants.append(metabolites['ump'].species_coefficients.get_or_create(
                                                coefficient=ntp_count['U']))
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 3 other locations - About 35 mins to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1500..1501
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1502..1503
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1504..1505

                            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

                                            reaction.participants.append(metabolites['cmp'].species_coefficients.get_or_create(
                                                coefficient=ntp_count['C']))
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 3 other locations - About 35 mins to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1500..1501
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1504..1505
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1506..1507

                            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/translation_translocation.py and 3 other locations - About 35 mins to fix
                            wc_model_gen/eukaryote/transcription.py on lines 652..656
                            wc_model_gen/eukaryote/transcription.py on lines 660..664
                            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 4 locations. Consider refactoring.
                            Open

                                            reaction.participants.append(metabolites['gmp'].species_coefficients.get_or_create(
                                                coefficient=ntp_count['G']))
                            Severity: Major
                            Found in wc_model_gen/eukaryote/translation_translocation.py and 3 other locations - About 35 mins to fix
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1500..1501
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1502..1503
                            wc_model_gen/eukaryote/translation_translocation.py on lines 1506..1507

                            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