Showing 9 of 9 total issues
File fantom.py
has 338 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
from encodeproject import download
from .utils import filter_required_cell_lines, validate_common_parameters, center_window, normalize_cell_lines, normalize_bed_file, load_bed
from typing import List, Dict, Tuple, Union, Generator
import compress_json
import pandas as pd
Function fantom
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
def fantom(
cell_lines: Union[List[str], str],
window_sizes: Union[List[int], int],
root: str = "fantom",
genome: str = "hg38",
- 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 fantom
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def fantom(
Function get_cell_line
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def get_cell_line(
Function roadmap
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def roadmap(
Function filter_enhancers
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def filter_enhancers(
Function filter_promoters
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def filter_promoters(
Function load_matrix
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def load_matrix(root: str, genome: str, region: str, info: Dict, nrows: int) -> pd.DataFrame:
Function validate_common_parameters
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
def validate_common_parameters(
cell_lines: List[str],
window_sizes: List[int],
genome: str,
info: Dict
- 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"