Showing 23 of 473 total issues
File pipeline.py
has 476 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
===================
The pipeline module
===================
File matrix.py
has 451 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
=================
The matrix module
=================
File cosegregation.py
has 444 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
========================
The cosegregation module
========================
File enrichment.py
has 359 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
=====================
The enrichment module
=====================
File main.py
has 352 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
===============
The main module
===============
File call_windows.py
has 299 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""
=======================
The call_windows module
=======================
InputFileMappingTasks
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
class InputFileMappingTasks():
"""Class for generating doit tasks from command-line arguments.
GAMtools "process_nps" command generates a set of doit tasks at
runtime based on a set of parameters passed via the command-line.
Function parse_fastq_screen_output
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def parse_fastq_screen_output(fastq_screen_output):
"""
Parse the output of a single fastq_screen file.
:param file fastq_screen_output: Open file object containing \
- 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 do_segregation_qc
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def do_segregation_qc(segregation_table, slice_thickness, nuclear_radius, coverage_q=0.2, #pylint: disable=too-many-arguments
Function process_file
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def process_file(filename):
"""
Process a fastqc output file and calculate some summary statistics.
"""
- 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 convert_from_args
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def convert_from_args(args):
"""Wrapper function to call convert from argparse"""
if args.input_format is None:
args.input_format = detect_file_type(args.input_file)
- 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_detection_efficiency
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_detection_efficiency(segregation_table, slice_thickness, #pylint: disable=too-many-arguments
Function threshold_file
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def threshold_file(input_file, output_file, #pylint: disable=too-many-arguments
Function convert
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def convert(input_file, input_format, #pylint: disable=too-many-arguments
Function do_segregation_qc
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def do_segregation_qc(segregation_table, slice_thickness, nuclear_radius, coverage_q=0.2, #pylint: disable=too-many-arguments
skip_chroms=None, genome_size=None, plexity=1, only_visible=True):
"""
Check that a GAM dataset has sufficient quality and depth. Specifically,
check that 80% of genomic windows have been detected at least 20 times
- 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_module
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def parse_module(fastqc_module):
"""
Parse a fastqc module from the table format to a line format (list).
Input is list containing the module. One list-item per line. E.g.:
- 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_doit_tasks
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def create_doit_tasks(self):
"""Generator function that yields doit tasks."""
tasks = []
task_generators = []
- 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 matrix_from_args
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def matrix_from_args(args):
"""Extract parameters from an argparse namespace object and pass them to
create_and_save_contact_matrix.
"""
- 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 do_enrichment
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def do_enrichment(
Function create_and_save_contact_matrix
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def create_and_save_contact_matrix(segregation_file, location_strings,