KarrLab/datanator

View on GitHub
datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py

Summary

Maintainability
F
1 wk
Test Coverage

Function build_obs has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
Open

    def build_obs(self, data, i, doc):
        """Build observation objects from obj.
        Go into observations collection.
        Args:
            data (:obj:`Obj`): source object.

Cognitive Complexity

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

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

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

Further reading

File victoria_parse_mouse_global_quantification.py has 296 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import pandas as pd
import bson
from pymongo import MongoClient
from datanator_query_python.util import mongo_util
from datanator_query_python.config import config

    Function build_obs has 42 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def build_obs(self, data, i, doc):
            """Build observation objects from obj.
            Go into observations collection.
            Args:
                data (:obj:`Obj`): source object.

      Function process_docs has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          def process_docs(self):
              id_file= pd.read_csv('mouse_uniprot_mapped.tab',delimiter='\t')
              id_file = id_file.where(pd.notnull(id_file), None)
              for i in range(len(id_file)):
                  #update entity collection

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

          def build_entity(self, data, i):
              """Build entity object from obj.
              Go into entity collection
      
              Args:

      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 __init__ has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def __init__(self,

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

                                self.obs_col.update_one(query,
                                                    {"$set": {"entity": obs["entity"],
                                                              "genotype": obs["genotype"],
                                                              "environment": obs["environment"],
                                                              "schema_version": "2.0",
        datanator/data_source/protein_half_lives/victoria_parse_proteome_half_lives.py on lines 334..341
        datanator/data_source/protein_half_lives/victoria_parse_proteome_half_lives.py on lines 347..354
        datanator/data_source/protein_half_lives/victoria_parse_proteome_half_lives.py on lines 366..373

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

        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 data.iloc[i,3]!=None:
                    ensembl_ids = str(data.iloc[i,3][:len(str(data.iloc[i,3]))-1]).split(";")
                    for ensembl in ensembl_ids:
                        entity["identifiers"].append({"namespace":"ensembl","value":ensembl})
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 67..70

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

        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 data.iloc[i,5]!=None:
                    ref_seq_ids = str(data.iloc[i,5][:len(str(data.iloc[i,5]))-1]).split(";")
                    for ref_seq in ref_seq_ids:
                        entity["identifiers"].append({"namespace":"RefSeq","value":ref_seq})
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 61..64

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

        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

            def __init__(self,
                         MongoDB=None,
                         db=None,
                         collection=None,
                         username=None,
        datanator/data_source/protein_half_lives/victoria_parse_column_k0_mouse_brain.py on lines 7..23
        datanator/data_source/protein_half_lives/victoria_parse_proteome_half_lives.py on lines 7..23
        datanator/data_source/protein_half_lives/victoria_parse_yeast_global_proteome_turnover.py on lines 8..24

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

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

                if doc!=None:
                    for j in range(len(doc["canon_anc_names"])):
                        d = {}
                        d["ncbi_taxonomy_id"] = doc["canon_anc_ids"][j]
                        d["name"] = doc["canon_anc_names"][j]
        datanator/data_source/protein_half_lives/victoria_parse_column_k0_mouse_brain.py on lines 121..126
        datanator/data_source/protein_half_lives/victoria_parse_column_k0_mouse_brain.py on lines 195..200
        datanator/data_source/protein_half_lives/victoria_parse_proteome_half_lives.py on lines 126..131
        datanator/data_source/protein_half_lives/victoria_parse_proteome_half_lives.py on lines 257..262
        datanator/data_source/protein_half_lives/victoria_parse_quantification_budding_yeast_proteome.py on lines 98..103
        datanator/data_source/protein_half_lives/victoria_parse_yeast_global_proteome_turnover.py on lines 139..144
        datanator/data_source/protein_half_lives/victoria_parse_yeast_global_proteome_turnover.py on lines 223..228
        datanator/data_source/protein_localization/victoria_insert_experimental_protein.py on lines 101..106
        datanator/data_source/protein_localization/victoria_insert_protein_atlas.py on lines 198..203
        datanator/data_source/rna_localization/victoria_parse_LncAtlas.py on lines 130..135

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

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

        def main():
            conf=config.Victoria()
            conf_main = config.Config()
            username = conf.USERNAME
            password = conf.PASSWORD
        datanator/data_source/protein_half_lives/victoria_parse_proteome_half_lives.py on lines 376..389
        datanator/data_source/protein_half_lives/victoria_parse_quantification_budding_yeast_proteome.py on lines 158..170
        datanator/data_source/protein_half_lives/victoria_parse_yeast_global_proteome_turnover.py on lines 316..329
        datanator/data_source/protein_localization/experimental.py on lines 63..74
        datanator/data_source/protein_localization/victoria_insert_archaea.py on lines 148..159
        datanator/data_source/protein_localization/victoria_insert_experimental_protein.py on lines 182..193
        datanator/data_source/protein_localization/victoria_insert_neg_wo_outer_membrane.py on lines 148..159
        datanator/data_source/protein_localization/victoria_insert_protein_atlas.py on lines 272..283
        datanator/data_source/rna_localization/victoria_parse_LncAtlas.py on lines 224..236
        datanator/parse_metabolite_concentration.py on lines 44..55

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

        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

                if data.iloc[i,21]!=None:
                    values_p.append({"type": "mRNA half-life",
                                     "value": float(data.iloc[i,20])*3600,
                                     "description": "replicate",
                                     "units": "s"})
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 154..158
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 165..169
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 177..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 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 4 locations. Consider refactoring.
        Open

                if data.iloc[i,22]!=None:
                    values_p.append({"type": "mRNA half-life",
                                     "value": float(data.iloc[i,22])*3600,
                                     "description": "average",
                                     "units": "s"})
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 154..158
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 165..169
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 171..175

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

                if data.iloc[i,18]!=None:
                    values_p.append({"type": "protein half-life",
                                     "value": float(data.iloc[i,18])*3600,
                                     "description": "replicate",
                                     "units": "s"})
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 165..169
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 171..175
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 177..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 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 4 locations. Consider refactoring.
        Open

                if data.iloc[i,20]!=None:
                    values_p.append({"type": "mRNA half-life",
                                     "value": float(data.iloc[i,20])*3600,
                                     "description": "experiment",
                                     "units": "s"})
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 154..158
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 171..175
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 177..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 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

                for identifier in doc["identifiers"]:
                    if identifier["namespace"] == "uniprot_id":
                        entity["identifiers"].append({"namespace":"uniprot_id","value":identifier["value"]})
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 102..104

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 55.

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

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

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

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

        Refactorings

        Further Reading

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

                for identifier in doc["identifiers"]:
                    if identifier["namespace"]=="gene_name":
                        entity["identifiers"].append({"namespace":"gene_name","value":identifier["value"]})
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.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 10 locations. Consider refactoring.
        Open

                if data.iloc[i,28]!=None:
                    values_p.append({"type": "translation rate constant (ksp)",
                                     "value": data.iloc[i,28],
                                     "description": "average",
                                     "units": "molecules/(mRNA*h)"})
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 120..124
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 131..135
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 137..141
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 143..147
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 183..187
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 189..193
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 195..199
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 201..205
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 207..211

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 51.

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

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

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

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

        Refactorings

        Further Reading

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

                if data.iloc[i,15]!=None:
                    values_p.append({"type": "mRNA copy number",
                                     "value": data.iloc[i,15],
                                     "description": "replicate",
                                     "units":"molecules/cell"})
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 120..124
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 131..135
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 143..147
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 183..187
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 189..193
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 195..199
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 201..205
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 207..211
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 213..217

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 51.

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

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

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

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

        Refactorings

        Further Reading

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

                if data.iloc[i,16]!=None:
                    values_p.append({"type": "mRNA copy number",
                                     "value": data.iloc[i,16],
                                     "description": "average",
                                     "units":"molecules/cell"})
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 120..124
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 131..135
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 137..141
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 183..187
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 189..193
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 195..199
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 201..205
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 207..211
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 213..217

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 51.

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

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

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

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

        Refactorings

        Further Reading

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

                if data.iloc[i,14]!=None:
                    values_p.append({"type": "mRNA copy number",
                                     "value": data.iloc[i,14],
                                     "description": "experiment",
                                     "units":"molecules/cell"})
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 120..124
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 137..141
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 143..147
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 183..187
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 189..193
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 195..199
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 201..205
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 207..211
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 213..217

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 51.

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

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

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

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

        Refactorings

        Further Reading

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

                if data.iloc[i,27]!=None:
                    values_p.append({"type": "translation rate constant (ksp)",
                                     "value": data.iloc[i,27],
                                     "description": "replicate",
                                     "units": "molecules/(mRNA*h)"})
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 120..124
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 131..135
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 137..141
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 143..147
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 183..187
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 189..193
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 195..199
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 201..205
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 213..217

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 51.

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

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

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

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

        Refactorings

        Further Reading

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

                if data.iloc[i,12]!=None:
                    values_p.append({"type": "protein copy number",
                                     "value": data.iloc[i,12],
                                     "description": "replicate",
                                     "units":"molecules/cell"})
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 131..135
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 137..141
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 143..147
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 183..187
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 189..193
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 195..199
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 201..205
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 207..211
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 213..217

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 51.

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

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

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

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

        Refactorings

        Further Reading

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

                if data.iloc[i,23]!=None:
                    values_p.append({"type": "transcription rate (vsr)",
                                     "value": data.iloc[i,23],
                                     "description": "experiment",
                                     "units": "molecules/(cell*h)"})
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 120..124
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 131..135
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 137..141
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 143..147
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 189..193
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 195..199
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 201..205
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 207..211
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 213..217

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 51.

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

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

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

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

        Refactorings

        Further Reading

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

                if data.iloc[i,25]!=None:
                    values_p.append({"type": "transcription rate (vsr)",
                                     "value": data.iloc[i,25],
                                     "description": "average",
                                     "units": "molecules/(cell*h)"})
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 120..124
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 131..135
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 137..141
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 143..147
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 183..187
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 189..193
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 201..205
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 207..211
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 213..217

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 51.

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

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

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

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

        Refactorings

        Further Reading

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

                if data.iloc[i,26]!=None:
                    values_p.append({"type": "translation rate constant (ksp)",
                                     "value": data.iloc[i,26],
                                     "description": "experiment",
                                     "units": "molecules/(mRNA*h)"})
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 120..124
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 131..135
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 137..141
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 143..147
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 183..187
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 189..193
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 195..199
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 207..211
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 213..217

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 51.

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

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

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

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

        Refactorings

        Further Reading

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

                if data.iloc[i,24]!=None:
                    values_p.append({"type": "transcription rate (vsr)",
                                     "value": data.iloc[i,24],
                                     "description": "replicate",
                                     "units": "molecules/(cell*h)"})
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 120..124
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 131..135
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 137..141
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 143..147
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 183..187
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 195..199
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 201..205
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 207..211
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 213..217

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 51.

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

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

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

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

        Refactorings

        Further Reading

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

                    self.identifier_col.update_one(query,
                                                    {"$set": {"namespace": "uniprot_id",
                                                      "value": id_file.iloc[i,0],
                                                      "description":entity["name"]}},upsert=True)
        datanator/data_source/rna_localization/victoria_parse_LncAtlas.py on lines 196..199

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

                                con_2 = {"identifier":{"namespace":"uniprot_id","value":obs["entity"]["identifiers"][0]["value"]}}
        datanator/data_source/protein_half_lives/victoria_parse_proteome_half_lives.py on lines 331..331
        datanator/data_source/protein_half_lives/victoria_parse_proteome_half_lives.py on lines 363..363

        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

                values_p.append({"type": "protein half-life",
                                 "value": data.iloc[i,19]*3600,
                                 "description": "average",
                                 "units": "s"})
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 149..152

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

                values_p.append({"type": "protein half-life",
                                 "value": data.iloc[i,17]*3600,
                                 "description": "experiment",
                                 "units": "s"})
        datanator/data_source/protein_half_lives/victoria_parse_mouse_global_quantification.py on lines 160..163

        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

        There are no issues that match your filters.

        Category
        Status