Showing 376 of 791 total issues
Function fill_species_name
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def fill_species_name(self):
ncbi_taxon_ids = self.collection.distinct('ncbi_taxonomy_id')
start = 0
for i, _id in enumerate(ncbi_taxon_ids[start:]):
if i == self.max_entries:
- Read upRead up
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 parse_enzyme_name
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def parse_enzyme_name(self, sbml):
""" Parse the name of an enzyme in SBML for the enzyme name, wild type status, and variant
description that it contains.
Args:
- Read upRead up
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 download_content
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def download_content(self):
""" Download data from FTP server """
if not os.path.exists(os.path.join(self.cache_dirname, 'intact')):
os.makedirs(os.path.join(self.cache_dirname, 'intact'))
if not os.path.exists(os.path.join(self.cache_dirname, 'intact', 'complextab')):
- Read upRead up
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 replace_key_in_similar_compounds
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def replace_key_in_similar_compounds(self):
query = {}
projection = {'similar_compounds': 1}
_, _, col = self.con_db('metabolites_meta')
docs = col.find(filter=query, projection=projection)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function fill_trna_primary
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def fill_trna_primary(self, file_location, sheet_name='tRNA', start_row=[0],
use_columns='A:H', column_names=['Amino_acid', 'aa_Code', 'aa_Name',
'kegg_orthology_id', 'kegg_gene_Name', 'Definition', 'kegg_Pathway_id',
'kegg_Pathway_name']):
"""
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function fill_meta
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def fill_meta(self):
"""Fill exisiting metabolites with meta information.
"""
query = {'inchikey': {'$exists': False}}
count = self.collection.count_documents(query)
- Read upRead up
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 calc_inchi_formula_connectivity
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def calc_inchi_formula_connectivity(self, structure):
""" Calculate a searchable structures
* InChI format
* Core InChI format
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function fill_species_name
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def fill_species_name(self):
"""[summary]
"""
query = {'halflives.ncbi_taxonomy_id': 10090}
docs = self.rna_hl_collection.find(filter=query)
- Read upRead up
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 extract_enzyme_names
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def extract_enzyme_names(self, doc):
"""Extract enzyme names
Args:
doc (:obj:`dict`): sabio_rk_old document
- Read upRead up
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 parse_enzyme_name
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def parse_enzyme_name(self, sbml):
""" Parse the name of an enzyme in SBML for the enzyme name, wild type status, and variant
description that it contains.
Args:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function fill_rna_halflife
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def fill_rna_halflife(self, df):
"""Fill RNA Half life collection with relevant documents.
Args:
df (:obj:`pandas.DataFrame`): dataframe to be loaded.
- Read upRead up
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 parse_fullname_taxid
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def parse_fullname_taxid(self):
'''Parse fullnamelineage.dmp and taxidlineage.dmp store in MongoDB
Always run first before loading anything else
(insert_one)
'''
- Read upRead up
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 calc_reactant_product_pairs
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def calc_reactant_product_pairs(reaction):
""" Get list of pairs of similar reactants and products using a greedy algorithm.
Args:
reaction (:obj:`data_model.Reaction`): reaction
- Read upRead up
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 a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __init__(self, structure):
"""
Args:
structure (:obj:`str`): InChI-encoded structure of a molecule
- Read upRead up
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 get_format
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_format(self):
""" Get the format of the structure
Returns:
:obj:`str`: format
- Read upRead up
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 6 (exceeds 5 allowed). Consider refactoring. Open
def build_entity(self, obj):
"""Build entity object from obj.
Go into entity collection
Args:
- Read upRead up
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"