Showing 376 of 791 total issues
Function parse_gene
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def parse_gene(self, lines):
"""Parse GENES category
(http://rest.kegg.jp/get/ko:K00023)
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 make_bulk
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def make_bulk(self, offset=0, bulk_size=100):
"""Make bulk objects to be inserted into MongoDB.
Args:
offset(:obj:`int`): Position of beginning (zero-indexed). Defaults to 0.
- 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_specie_from_sbml
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def get_specie_from_sbml(self, sbml):
""" get species information from sbml
Args:
sbml (:obj:`libsbml.Species`): SBML-representation of a compound or enzyme
- 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 grab_eymdb
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def grab_eymdb(self, start=0):
"""Fill collection with concentration values from ec/ymdb.
Documents in current collection all have inchikey
"""
query = {'concentrations': {'$ne': 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 get_parameter_by_properties
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def get_parameter_by_properties(self, kinetic_law, parameter_properties):
""" Get the parameter of :obj:`kinetic_law` whose attribute values are
equal to that of :obj:`parameter_properties`
Args:
kinetic_law (:obj:`KineticLaw`): kinetic law to find parameter of
- 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_ko_txt
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def parse_ko_txt(self, filename):
'''Parse kegg_ortho txt file into dictionary object
'''
file_path = os.path.join(self.path, filename)
try:
- 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_parameter_by_properties
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def get_parameter_by_properties(self, kinetic_law, parameter_properties):
""" Get the parameter of :obj:`kinetic_law` whose attribute values are equal to that of :obj:`parameter_properties`
Args:
kinetic_law (:obj:`KineticLaw`): kinetic law to find parameter of
- 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 load_data
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def load_data(self, skip=0, top_hits=10):
"""Loading data.
Args:
skip (:obj:`int`, optional): Beginning of the documents. Defaults to 0.
- 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 load_halflife
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def load_halflife(self, df, growth_medium='MeOH', start=0):
df_json = json.loads(df.to_json(orient='records'))
row_count = len(df.index)
for i, doc in enumerate(df_json[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 create_kinetic_laws_from_sbml
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def create_kinetic_laws_from_sbml(self, ids, sbml):
""" Add kinetic laws defined in an SBML file to the local sqlite database
Args:
ids (:obj:`list` of :obj:`int`): list kinetic law IDs
- 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_reactant_aggregate_name
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def fill_reactant_aggregate_name(self, start=0):
"""Fill sabio documents with reactant aggregate
information by reactants' name.
"""
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 make_doc
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def make_doc(self, lines):
"""Turn a block of EC info into a dictionary object
Args:
lines (:obj:`list` of :obj:`str`): list consists of lines of information on one EC group.
- 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 11 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, cache_dirname=None, MongoDB=None, replicaSet=None, db=None,
Function __init__
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, MongoDB, db, cache_dirname=None, replicaSet=None, verbose=False, max_entries=float('inf'),
Function __init__
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, username=None, password=None, server=None, authSource='admin',
Function __init__
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, cache_dir=None, server=None, db=None, collection_str=None,
Function __init__
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, name=None,
Function inchi_to_inchikey
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
def inchi_to_inchikey(self, szINCHISource):
'''
fork from git@github.com:mnowotka/chembl_ikey.git
'''
flagstd = 'S'
Function __init__
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, username=None, password=None, server=None, authSource='admin',
Function download_fastq
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def download_fastq(experiment_name, sample_name, temp_directory, fastq_urls):
FASTQ_DIR = "{}/FASTQ_FILES".format(temp_directory)
if not os.path.isdir(FASTQ_DIR):
os.makedirs(FASTQ_DIR)
for num, url in enumerate(fastq_urls.split(" ")):
- 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"