Showing 79 of 82 total issues
Avoid too many return
statements within this function. Open
return self.pvalue(
Avoid too many return
statements within this function. Open
return "unknown"
Avoid too many return
statements within this function. Open
return "narrowpeak"
Avoid too many return
statements within this function. Open
return self.max_total(
Avoid too many return
statements within this function. Open
return "unknown"
Avoid too many return
statements within this function. Open
return 30
Avoid too many return
statements within this function. Open
return self.max_subtotal(
Avoid too many return
statements within this function. Open
return metric(m1, m2)
Avoid too many return
statements within this function. Open
return 22
Avoid too many return
statements within this function. Open
return length
Avoid too many return
statements within this function. Open
return "region"
Avoid too many return
statements within this function. Open
return "bed"
Avoid too many return
statements within this function. Open
return self.max_total(m1.pfm, m2.pfm, metric, combine)
Function check_bed_file
has a Cognitive Complexity of 16 (exceeds 15 allowed). Consider refactoring. Open
def check_bed_file(fname):
"""Check if the inputfile is a valid bed-file"""
if not os.path.exists(fname):
logger.error(f"Inputfile {fname} does not exist!")
sys.exit(1)
- 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 pp_predict_motifs
has a Cognitive Complexity of 16 (exceeds 15 allowed). Consider refactoring. Open
def pp_predict_motifs(
fastafile,
outfile,
analysis="small",
organism="hg19",
- 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_cutoff
has a Cognitive Complexity of 16 (exceeds 15 allowed). Consider refactoring. Open
def parse_cutoff(motifs, cutoff, default=0.9):
"""Provide either a file with one cutoff per motif or a single cutoff
returns a hash with motif id as key and cutoff as value
"""
cutoffs = {}
- 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 factor2orthogroups
has a Cognitive Complexity of 16 (exceeds 15 allowed). Consider refactoring. Open
def factor2orthogroups(factor, references, database, strategy):
"""
Returns all the orthogroups a factor belongs to. This is NOT a trivial task.
Some of the factors shouldn't be considered (blacklisted), some have an
- 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 pfmfile_location
has a Cognitive Complexity of 16 (exceeds 15 allowed). Consider refactoring. Open
def pfmfile_location(infile=None):
"""Return the path to the pfmfile"""
config = MotifConfig()
if infile is 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 parse
has a Cognitive Complexity of 16 (exceeds 15 allowed). Consider refactoring. Open
def parse(self, fname):
"""
Convert RPMCMC output to motifs
Parameters
- 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"