ucsc_genomes_downloader/genome.py
File genome.py
has 471 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
# Copyright (C) 2019 by
# Luca Cappelletti <luca.cappelletti1@unimi.it>
#
# All rights reserved.
# MIT license.
Genome
has 29 functions (exceeds 20 allowed). Consider refactoring. Open
Open
class Genome:
"""Class to automatically retrieve informations and sequences for a Genome from the UCSC Genome Browser assembly database.
Usage examples
--------------
Function __init__
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
Open
def __init__(
self,
assembly: str,
chromosomes: Tuple[str] = None,
filters: Tuple[str] = ("chru", "chrmt", "scaffold", "contig", "super", "chrbin", "random", "hap", "alt", "fix"),
- 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 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function filled
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
def filled(self, chromosomes: List[str] = None):
"""Return dataframe with BED-like columns with informations on the gaps.
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"