Showing 120 of 341 total issues
Avoid deeply nested control flow statements. Open
Open
if proteasome_species == self._rxn_species_modifier[reaction.id][0]:
modifier_reactants.append(proteasome_species)
Avoid deeply nested control flow statements. Open
Open
if cplx_species.compartment in conc_per_comp:
conc_per_comp[cplx_species.compartment] += stoic * \
cplx_species.distribution_init_concentration.mean
else:
conc_per_comp[cplx_species.compartment] = stoic * \
Avoid deeply nested control flow statements. Open
Open
if type(compl_subunit.species_type) == wc_kb.eukaryote.ProteinSpeciesType:
model_rxn = model.reactions.create(
submodel=self.submodel,
id='{}_dissociation_in_{}_degrade_{}'.format(
Avoid deeply nested control flow statements. Open
Open
if part.species.id in met_requirement:
met_requirement[part.species.id] += -part.coefficient * mean_concentration * \
(1 + doubling_time / half_life)
# Transcription elongation
transcription_el_reaction = model.reactions.get_one(id='transcription_elongation_{}'.format(rna_kb.id))
Function gen_response_functions
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def gen_response_functions(model, beta, reaction_id, reaction_class, compartment, reaction_factors):
Avoid deeply nested control flow statements. Open
Open
if model_compartment.init_density.function_expressions:
volume = model_compartment.init_density.function_expressions[0].function
unit_adjusted_term = '{} * {} * {}'.format(param.id, Avogadro.id, volume.id)
else:
volume = model_compartment.init_volume.mean
Avoid deeply nested control flow statements. Open
Open
if species.distribution_init_concentration:
if species.distribution_init_concentration.mean:
param.value = beta * species.distribution_init_concentration.mean \
/ Avogadro.value / species.compartment.init_volume.mean
param.comments = 'The value was assumed to be {} times the concentration of {} in {}'.format(
Avoid deeply nested control flow statements. Open
Open
for comp, kcat in comp_kcat.items():
kcat.value = median_kcat
kcat.comments = 'Value imputed as the median of measured k_cat values'
else:
Avoid deeply nested control flow statements. Open
Open
if codon == 'ATG':
aa = model.species_types.get_one(id='met').species.get_one(compartment=cytosol)
elif codon == 'ACT' or codon == 'ACC' or codon == 'ACA' or codon == 'ACG':
aa = model.species_types.get_one(id='thr').species.get_one(compartment=cytosol)
elif codon == 'ATT' or codon == 'ATC' or codon == 'ATA':
Avoid deeply nested control flow statements. Open
Open
for codon_info in matched_trnas:
expression_terms.append(codon_info['function'].id)
objects[wc_lang.Function][codon_info['function'].id] = codon_info['function']
for cl, dictionary in objects.items():
dictionary.update(codon_info['objects'][cl])
Avoid deeply nested control flow statements. Open
Open
if not determined:
formula += subunit.species_type.get_empirical_formula(seq_input=protein_seq) * coef
charge += subunit.species_type.get_charge(seq_input=protein_seq) * coef
weight += subunit.species_type.get_mol_wt(seq_input=protein_seq) * coef
else:
Avoid deeply nested control flow statements. Open
Open
if model_subunit_species.species_type.type != wc_ontology['WC:metabolite']:
self._maximum_possible_amount[model_compl_species.id].append(
model_subunit_species.distribution_init_concentration.mean / subunit_coefficient)
Avoid deeply nested control flow statements. Open
Open
if part.species.id in met_requirement:
met_requirement[part.species.id] += -part.coefficient * total_concentration * \
(1 + doubling_time / prot_half_life)
# Translation elongation
translation_el_reaction = model.reactions.get_one(id='translation_elongation_{}'.format(rna_kb.id))
Avoid deeply nested control flow statements. Open
Open
if subunit_id not in gvar.transcript_ntp_usage:
seq = subunit.species_type.get_seq()
gvar.transcript_ntp_usage[subunit.species_type.id] = {
'A': seq.upper().count('A'),
'C': seq.upper().count('C'),
Avoid deeply nested control flow statements. Open
Open
if numpy.isnan(kcat.value):
kcat.value = value/conc*kcat_adjustment_factor
kcat.comments = 'Value imputed based on FVA bound value ' +\
'and adjusted with a factor of {}'.format(kcat_adjustment_factor)
elif (value - kcat.value*conc)/value > 0.01:
Avoid deeply nested control flow statements. Open
Open
if species.distribution_init_concentration.mean:
model_Km.value = beta * species.distribution_init_concentration.mean \
/ Avogadro.value / species.compartment.init_volume.mean
model_Km.comments = 'The value was assumed to be {} times the concentration of {} in {}'.format(
beta, species.species_type.id, species.compartment.name)
Avoid deeply nested control flow statements. Open
Open
if part.species.id in met_requirement:
met_requirement[part.species.id] += -part.coefficient * mean_concentration * \
(1 + doubling_time / half_life)
Avoid deeply nested control flow statements. Open
Open
if sp.distribution_init_concentration:
if sp.distribution_init_concentration.mean > 0.:
compartment = sp.compartment
model_met_id = met_id + f'[{compartment.id}]'
if model_met_id in met_requirement:
Avoid deeply nested control flow statements. Open
Open
if species.distribution_init_concentration.mean:
model_Km.value = beta * species.distribution_init_concentration.mean \
/ Avogadro.value / species.compartment.init_volume.mean
model_Km.comments = 'The value was assumed to be {} times the concentration of {} in {}'.format(
beta, species.species_type.id, species.compartment.name)
Avoid deeply nested control flow statements. Open
Open
if part.species.id in met_requirement:
met_requirement[part.species.id] += -part.coefficient * total_concentration * \
(1 + doubling_time / prot_half_life)