Showing 75 of 182 total issues
Function get_data
has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring. Open
def get_data(self, disease_data):
disease_annots = {}
list_to_yield = []
- 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_data
has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring. Open
def get_data(self, gene_data, batch_size, test_set):
gene_dataset = {}
list_to_yield = []
- 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 render
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const filteredData = this.props.data.filter((dat) => this.filterCallback(dat));
const all_methods = this.props.data[0].predictionMethodsMatched.concat(
this.props.data[0].predictionMethodsNotCalled,
this.props.data[0].predictionMethodsNotMatched
Function get_data
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
def get_data():
path = "tmp";
S3File("mod-datadumps", "disease-ontology.obo", path).download()
do_data = TXTFile(path + "/disease-ontology.obo").get_data()
- 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
File mapping_schema.py
has 340 lines of code (exceeds 250 allowed). Consider refactoring. Open
mapping_schema = {
"settings": {
"index": {
"max_result_window": 15000,
"analysis": {
Function get_data
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
def get_data():
path = "tmp";
S3File("mod-datadumps/data", "so.obo", path).download()
so_data = TXTFile(path + "/so.obo").get_data()
- 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
File search_helper.py
has 282 lines of code (exceeds 250 allowed). Consider refactoring. Open
import json
def build_es_aggregation_body_request(es_query, category, category_filters):
agg_query_body = {
Function get_data
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def get_data(self):
omim_dataset = {}
for row in self.omim_data:
if len(row) < 3:
- 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 render
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const speciesPresent = this.props.data.map((orthData) => {
return orthData.gene2SpeciesName;
});
// refine the species order to keep only species present in orthologs
Function get_data
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def get_data(mod_name, test_set, gene_master_dict):
path = "tmp"
filename = None
filename_comp = None
if test_set == True:
- 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 render
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
render() {
if (this.props.loading) {
return <span>loading...</span>;
}
- 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 render
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
if (this.props.loading) {
return <span>loading...</span>;
}
Function MethodCell
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
const MethodCell = (props) => {
const {
predictionMethodsMatched,
predictionMethodsNotMatched
} = props;
Function load_from_mods
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def load_from_mods(self, test_set):
mods = [RGD(), MGI(), ZFIN(), SGD(), WormBase(), FlyBase(), Human()]
gene_master_dict = {} # Build a dictionary of sets for all indexed MODs/genes. Used for filtering orthology.
- 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 render
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
let currentRoute=this.props.location.pathname.replace('/','');
currentRoute= currentRoute==''?'home' : currentRoute;
return (
Function parseGOOBO
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def parseGOOBO(filename):
"""
Parses a Gene Ontology dump in OBO v1.2 format.
Yields each
Keyword arguments:
- 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 format_aggregation_results
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def format_aggregation_results(aggregation_results, category, category_filters):
if category == '':
category_obj = {
'values': [],
'key': 'category'
- 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_complete_url
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def get_complete_url (self, local_id, global_id):
complete_url = None
if 'MGI' in global_id:
- 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 attach_homolog_data
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def attach_homolog_data(self, genes):
for row in self.homolog_data:
gene_1 = self._process_gene_id_from_panther(row[0], genes)
- 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 render
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const diseases = this.props.data;
const filename = this.props.filename;
// the way the incoming data is grouped doesn't exactly align with the way