projects
/
htsworkflow.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6bbfa36
)
Use max on the iterator to find the last key
author
Diane Trout
<diane@ghic.org>
Fri, 20 Mar 2015 21:45:29 +0000
(14:45 -0700)
committer
Diane Trout
<diane@ghic.org>
Fri, 20 Mar 2015 21:45:29 +0000
(14:45 -0700)
htsworkflow/pipelines/genome_mapper.py
patch
|
blob
|
history
diff --git
a/htsworkflow/pipelines/genome_mapper.py
b/htsworkflow/pipelines/genome_mapper.py
index 4f57bbbaac97f4742fcee673b9ff17fd320f632d..62619e2155362207612a7f0dabf3ed13c5b77db4 100644
(file)
--- a/
htsworkflow/pipelines/genome_mapper.py
+++ b/
htsworkflow/pipelines/genome_mapper.py
@@
-88,11
+88,10
@@
class constructMapperDict(object):
builds = self.genome_dict[elements[0]]
# sort build names the way humans would
- keys = builds.keys()
- keys.sort(key=natural_sort_key)
+ last_key = max(builds, key=natural_sort_key)
# return the path from the 'last' build name
- return builds[
keys[-1]
]
+ return builds[
last_key
]
elif len(elements) == 2:
# we have species, and build name