Showing 376 of 791 total issues
Function fill_gerosa_collection
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def fill_gerosa_collection(self, file_location, sheet_name='Sheet1', start_row=0,
use_columns='A:E,G', column_names=['EC_Number', 'metabolite',
'concentration', 'k_m', 'abbreviation', 'species_name'],
reference={'doi': '10.1038/nchembio.2077'}, unit='M',
nrows=None):
- 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 add_to_halflife
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def add_to_halflife(self, df, growth_medium='TMA'):
"""Add df to existing rna_halflife collection
Args:
df (:obj:`pandas.DataFrame`): dataframe to be added.
- 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 process_docs
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def process_docs(self, skip=0):
#read .tsv file
data=pd.read_csv('Experimental-PSORTdb-v4.00.tsv',delimiter="\t")
data = data.where(pd.notnull(data), None)
- 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 hash_null_reactants
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def hash_null_reactants(self, start=0):
"""(https://github.com/KarrLab/datanator/issues/50)
(https://github.com/KarrLab/datanator_rest_api/issues/116)
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 _default
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def _default(self):
# parse input
def parse_participants(side, coefficient, reaction, errors):
for participant in side.split(' + '):
participant = participant.strip()
- 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_collection
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def fill_collection(self):
projection = {'_id': 0,'resource': 1, 'reaction_participant': 1,
'reaction_participant': 1, 'kinlaw_id': 1, 'enzymes': 1}
collection = self.db_obj['sabio_rk_old']
docs = collection.find({}, 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 parse_psortdb
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def parse_psortdb(self):
"""
To parse database psortdb Experimental-PSORTdb-v4.00.tsv file
and create JSON files conforming to datanator_pattern/observation_compiled.json
- 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 many_to_many
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def many_to_many(self, collection_str1='metabolites_meta',
collection_str2='metabolites_meta', field1='inchi',
field2='inchi', lookup1='InChI_Key',
lookup2='InChI_Key', num=100):
''' Go through collection_str and assign each
- 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 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, cache_dir=None, server=None, src_db=None, protein_col=None,
Function __init__
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, cache_dir=None, server=None, src_db=None, protein_col=None,
Function __init__
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, cache_dir=None, server=None, src_db=None, protein_col=None,
Function __init__
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, cache_dir=None, server=None, src_db=None, protein_col=None,
Function __init__
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, cache_dir=None, server=None, src_db=None, protein_col=None,
Function __init__
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, cache_dir=None, server=None, src_db=None, protein_col=None,
Function __init__
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, cache_dirname=None, MongoDB=None, src_db='datanator',
Function __init__
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, cache_dir=None, server=None, src_db=None, protein_col=None,
Function __init__
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, cache_dir=None, server=None, src_db=None, protein_col=None,
Function __init__
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, name=None, cache_dirname=None, clear_content=False, load_content=False, max_entries=float('inf'),
Function __init__
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, server=None, username=None, password=None, src_db=None,
Function load_unreviewed_abundance
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def load_unreviewed_abundance(self):
'''
Load abundance info for proteins that are not reviewed in uniprot
'''
query_uniprot = {'abundances': {'$exists': True}}
- 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"