Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xacct.py sort by numeric field #2

Open
dariober opened this issue Dec 25, 2017 · 0 comments
Open

xacct.py sort by numeric field #2

dariober opened this issue Dec 25, 2017 · 0 comments

Comments

@dariober
Copy link
Owner

xacct.py -v
xacct.py 0.3.0

Sort by MaxRSS gives:

xacct.py -s MaxRSS
Traceback (most recent call last):
  File "/home/db291g/bin/xacct.py", line 341, in <module>
    sacct_mrg= sorted(sacct_mrg, key=lambda k: k[s], reverse= rev)
TypeError: '<' not supported between instances of 'str' and 'int'

Probably due to a mix of numbers and strings in the sort field:

xacct.py
64377  WW00295.chr14.pindelChrom  node25    9027    48000   8          COMPLETED  Mon 25 15:44:36  02:29:10  
64413  WW00300.chr4.pindelChrom   node25    .       48000   8          RUNNING    Mon 25 15:44:36  00:07:03  
64561  WW00284.chr9.pindelChrom   .         .       48000   0          PENDING    Mon 25 15:44:39  00:00:00  
64339  WW00275.chr4.pindelChrom   node07    10753   48000   8          COMPLETED  Mon 25 15:50:45  05:52:27  
64414  WW00300.chr20.pindelChrom  node07    .       48000   8          RUNNING    Mon 25 15:50:45  00:00:54  
64562  WW00307.chr5.pindelChrom   .         .       48000   0          PENDING    Mon 25 15:51:11  00:00:00  
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant