Showing 397 of 397 total issues
Avoid deeply nested control flow statements. Open
Open
for i_monomer in range(monomer2.start_position, monomer2.end_position + 1):
if form.seq[i_monomer - 1] == monomers[seq[i_monomer - 1]]:
monomer2.base_monomers = [bpforms.protein_alphabet.monomers.get(seq[i_monomer - 1])]
form.seq[i_monomer - 1] = monomer2
set_monomer = True
Avoid deeply nested control flow statements. Open
Open
if can_code not in can_monomer_freq:
can_monomer_freq[can_code] = 0
can_monomer_freq[can_code] += copies
Avoid deeply nested control flow statements. Open
Open
if record_type == 'HET ':
het = line[7:10].strip()
if het in pdb_monomers:
het_set.add(het)
Avoid deeply nested control flow statements. Open
Open
if len(entry.exp_org_taxid) == 1:
taxid = list(entry.exp_org_taxid)[0]
if taxid in query_ids:
entries_engineered_in_query.append(entry)
engineered_in_query_i += 1
Avoid deeply nested control flow statements. Open
Open
if monomer['mod']:
codes.add(monomer['mod'].get_canonical_code(monomer_codes))
msg = 'Modified monomeric form {} potentially inconsistent with residue {} != {}'.format(
Avoid deeply nested control flow statements. Open
Open
for p in protein['processing']:
seq_features[0]['positions'].append([last + 1, p['start'] - 1])
last = p['end']
seq_features[0]['positions'].append([
Avoid deeply nested control flow statements. Open
Open
if key not in protein:
protein[key] = []
protein[key].append(value)
Avoid deeply nested control flow statements. Open
Open
if monomer not in monomer_freq:
monomer_freq[monomer] = 0
monomer_freq[monomer] += copies
Avoid deeply nested control flow statements. Open
Open
if record_type == 'HEADER':
entry.id = line[62:66]
# get only non-engineered protein
elif record_type == 'COMPND' and line[11:26] == 'ENGINEERED: YES':
Avoid deeply nested control flow statements. Open
Open
if not set_monomer:
protein['modified_errors'].append('Unable to set monomeric form')
# crosslinks
if protein['processing']:
Avoid deeply nested control flow statements. Open
Open
for domain, cell in zip(domains, row.find_all('td')):
if cell.text:
domain_dist.append(domain + ' ' + rna_type)
Avoid deeply nested control flow statements. Open
Open
if taxid in query_ids:
entries_engineered_in_query.append(entry)
engineered_in_query_i += 1
Avoid deeply nested control flow statements. Open
Open
while line != '':
record_type = line[:6]
# get id
if record_type == 'HEADER':
Function gen_bpform
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def gen_bpform(protein, pro_ids_to_bpform_monomers, monomer_codes,
Avoid deeply nested control flow statements. Open
Open
if protein['processing'][0]['start'] == 1:
seq_features[0]['positions'].pop(0)
if protein['processing'][-1]['end'] == len(form.seq):
Avoid deeply nested control flow statements. Open
Open
if form.seq[i_monomer - 1] == monomers[seq[i_monomer - 1]]:
set_monomer = True
form.seq[i_monomer - 1] = monomer2
break
if not set_monomer:
Avoid deeply nested control flow statements. Open
Open
while line != '':
record_type = line[:6]
if record_type == 'HET ':
het = line[7:10].strip()
Avoid deeply nested control flow statements. Open
Open
if taxid != 32630 and taxid != 32644:
entries_native.append(entry)
# print(entry.id, entry.org_taxid, entry.het)
non_engineered_i += 1
Avoid deeply nested control flow statements. Open
Open
if line.startswith('[Term]'):
if max_num_proteins is not None and len(proteins) >= max_num_proteins:
break
protein = {}
else:
Avoid deeply nested control flow statements. Open
Open
if form.seq[position - 1] == monomers[seq[position - 1]]:
if monomer not in bpforms.protein_alphabet.monomers.values():
monomer.base_monomers = [form.seq[position - 1]]
form.seq[position - 1] = monomer
else: