mirror of
https://github.com/biopython/biopython.git
synced 2025-10-20 13:43:47 +08:00
update
This commit is contained in:
committed by
Peter Cock
parent
0619a8236d
commit
61be00dfce
@ -233,13 +233,12 @@ class _BaseGenBankConsumer:
|
||||
else:
|
||||
tax_info = taxonomy_string
|
||||
tax_list = tax_info.split(";")
|
||||
new_tax_list = []
|
||||
for tax_item in tax_list:
|
||||
new_items = tax_item.split("\n")
|
||||
new_tax_list.extend(new_items)
|
||||
while "" in new_tax_list:
|
||||
new_tax_list.remove("")
|
||||
return [x.strip() for x in new_tax_list]
|
||||
return [
|
||||
item.strip()
|
||||
for tax_item in tax_list
|
||||
for item in tax_item.split("\n")
|
||||
if item
|
||||
]
|
||||
|
||||
@staticmethod
|
||||
def _clean_location(location_string):
|
||||
|
@ -324,11 +324,11 @@ class Chromosome(_ChromosomeComponent):
|
||||
self.end_x_position - self.start_x_position - segment_width
|
||||
)
|
||||
|
||||
y_limits = []
|
||||
for sub_component in self._sub_components:
|
||||
y_limits.extend(
|
||||
(sub_component.start_y_position, sub_component.end_y_position)
|
||||
)
|
||||
y_limits = [
|
||||
limit
|
||||
for sub_component in self._sub_components
|
||||
for limit in (sub_component.start_y_position, sub_component.end_y_position)
|
||||
]
|
||||
y_min = min(y_limits)
|
||||
y_max = max(y_limits)
|
||||
del y_limits
|
||||
|
@ -593,9 +593,7 @@ class Commandline:
|
||||
for n in range(len(options))
|
||||
if options[n] == "=" and n != 0 and n != len(options)
|
||||
]
|
||||
indices = []
|
||||
for sl in valued_indices:
|
||||
indices.extend(sl)
|
||||
indices = [index for sl in valued_indices for index in sl]
|
||||
token_indices = [n for n in range(len(options)) if n not in indices]
|
||||
for opt in valued_indices:
|
||||
# self.options[options[opt[0]].lower()] = options[opt[2]].lower()
|
||||
|
@ -1034,11 +1034,8 @@ class IC_Chain:
|
||||
self.initNCaCs.append(tuple(initNCaC))
|
||||
|
||||
# next residue NCaCKeys so can do per-residue assemble()
|
||||
ric.NCaCKey = []
|
||||
ric.NCaCKey.extend(
|
||||
ric.split_akl(
|
||||
(AtomKey(ric, "N"), AtomKey(ric, "CA"), AtomKey(ric, "C"))
|
||||
)
|
||||
ric.NCaCKey = ric.split_akl(
|
||||
(AtomKey(ric, "N"), AtomKey(ric, "CA"), AtomKey(ric, "C"))
|
||||
)
|
||||
ric._link_dihedra()
|
||||
|
||||
@ -2709,11 +2706,8 @@ class IC_Residue:
|
||||
self._build_rak_cache()
|
||||
|
||||
# initialise NCaCKey here:
|
||||
self.NCaCKey = []
|
||||
self.NCaCKey.extend(
|
||||
self.split_akl(
|
||||
(AtomKey(self, "N"), AtomKey(self, "CA"), AtomKey(self, "C"))
|
||||
)
|
||||
self.NCaCKey = self.split_akl(
|
||||
(AtomKey(self, "N"), AtomKey(self, "CA"), AtomKey(self, "C"))
|
||||
)
|
||||
|
||||
def set_flexible(self) -> None:
|
||||
|
@ -274,7 +274,7 @@ def strict_consensus(trees):
|
||||
def majority_consensus(trees, cutoff=0):
|
||||
"""Search majority rule consensus tree from multiple trees.
|
||||
|
||||
This is a extend majority rule method, which means the you can set any
|
||||
This is an extend majority rule method, which means the you can set any
|
||||
cutoff between 0 ~ 1 instead of 0.5. The default value of cutoff is 0 to
|
||||
create a relaxed binary consensus tree in any condition (as long as one of
|
||||
the provided trees is a binary tree). The branch length of each consensus
|
||||
|
Reference in New Issue
Block a user