CGATReport
CGATReport copied to clipboard
Need clarification for "transpose" flag in rst-table renderer
Hi,
I would like to ask: Is "transpose" flag in rst-table renderer working? Or otherwise... what is it doing?
My intention was to swap rows and columns in the table. So that tracks (slices) would each render in column. But it seems that this flag has no effect.
Thanks.
Hi,
thanks, indeed, "transpose" was not working. It now will transpose the dataframe. I have pushed the latest changes, let me know if it works!
Best wishes, Andreas
On 12/02/14 17:02, WestFlame wrote:
Hi,
I would like to ask: Is "transpose" flag in rst-table renderer working? Or otherwise... what is it doing?
My intention was to swap rows and columns in the table. So that tracks and slices would each render in column. But it seems that this flag has no effect.
Thanks.
— Reply to this email directly or view it on GitHub https://github.com/AndreasHeger/CGATReport/issues/7.
Thanks, but now when I add the "transpose" flag, it fails with this error:
stage: invocation
exception: ImportError
message: No module named _bsddb
traceback:
File “/home/miki/programy/anaconda/envs/cgat/lib/python2.7/site-packages/CGATReport-0.2.1-py2.7.egg/CGATReport/report_directive.py”, line 300, in run
transformers)
File “/home/miki/programy/anaconda/envs/cgat/lib/python2.7/site-packages/CGATReport-0.2.1-py2.7.egg/CGATReport/Dispatcher.py”, line 69, in __init__
self.cache = Cache.Cache(Cache.tracker2key(tracker))
File “/home/miki/programy/anaconda/envs/cgat/lib/python2.7/site-packages/CGATReport-0.2.1-py2.7.egg/CGATReport/Cache.py”, line 68, in __init__
self.cache_filename, “c”, writeback=False)
File “/home/miki/programy/anaconda/envs/cgat/lib/python2.7/shelve.py”, line 239, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
File “/home/miki/programy/anaconda/envs/cgat/lib/python2.7/shelve.py”, line 223, in __init__
Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback)
File “/home/miki/programy/anaconda/envs/cgat/lib/python2.7/anydbm.py”, line 84, in open
mod = __import__(result)
File “/home/miki/programy/anaconda/envs/cgat/lib/python2.7/dbhash.py”, line 7, in <module>
import bsddb
File “/home/miki/programy/anaconda/envs/cgat/lib/python2.7/bsddb/__init__.py”, line 67, in <module>
import _bsddb
I tried to install bsddb module but with no success (is it necessary anyway?).
Hi @WestFlame,
thanks, that is new, sorry for your troubles.
Does it only happen with the "transpose" flag?
Do you get the same error when running it from the command line via cgatreport-test? This might speed up debugging.
Best wishes, Andreas
On 12/04/14 12:07, WestFlame wrote:
Thanks, but now when I add the "transpose" flag, it fails with this error:
|stage: invocation exception: ImportError message: No module named _bsddb traceback:
File “/home/miki/programy/anaconda/envs/cgat/lib/python2.7/site-packages/CGATReport-0.2.1-py2.7.egg/CGATReport/report_directive.py”, line 300, in run transformers) File “/home/miki/programy/anaconda/envs/cgat/lib/python2.7/site-packages/CGATReport-0.2.1-py2.7.egg/CGATReport/Dispatcher.py”, line 69, in __init__ self.cache = Cache.Cache(Cache.tracker2key(tracker)) File “/home/miki/programy/anaconda/envs/cgat/lib/python2.7/site-packages/CGATReport-0.2.1-py2.7.egg/CGATReport/Cache.py”, line 68, in __init__ self.cache_filename, “c”, writeback=False) File “/home/miki/programy/anaconda/envs/cgat/lib/python2.7/shelve.py”, line 239, in open return DbfilenameShelf(filename, flag, protocol, writeback) File “/home/miki/programy/anaconda/envs/cgat/lib/python2.7/shelve.py”, line 223, in __init__ Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback) File “/home/miki/programy/anaconda/envs/cgat/lib/python2.7/anydbm.py”, line 84, in open mod = __import__(result) File “/home/miki/programy/anaconda/envs/cgat/lib/python2.7/dbhash.py”, line 7, in <module> import bsddb File “/home/miki/programy/anaconda/envs/cgat/lib/python2.7/bsddb/__init__.py”, line 67, in <module> import _bsddb
| |
I tried to install bsddb module but with no success (is it necessary anyway?).
— Reply to this email directly or view it on GitHub https://github.com/AndreasHeger/CGATReport/issues/7#issuecomment-65622772.
Hi Andreas,
unfortunately I was not able to reproduce the previous error (I did clean install for sure).
But with the following patch (probably very ugly, I don't fully understand your code), the transpose is now working for me.
--- /home/miki/sources/CGATReport/CGATReportPlugins/Renderer.py
+++ /home/miki/programy/anaconda/envs/cgat/lib/python2.7/site-packages/CGATReport-0.2.1-py2.7.egg/CGATReportPlugins/Renderer.py
@@ -640,6 +640,7 @@
'''
def __call__(self, dataframe, path):
+ dataframe = self.modifyTable(dataframe)
results = ResultBlocks()
Best regards, Mikulas
Thanks!
I will follow this up.
Best wishes, Andreas
P.S. Do you find CGATReport useful? We are using it heavily within our group (10 people) but we don't have much reported users outside.
On 12/05/14 09:09, WestFlame wrote:
Hi Andreas,
unfortunately I was not able to reproduce the previous error (I did clean install for sure).
But with the following patch (probably very ugly, I don't fully understand your code), the transpose is now working for me.
|--- /home/miki/sources/CGATReport/CGATReportPlugins/Renderer.py +++ /home/miki/programy/anaconda/envs/cgat/lib/python2.7/site-packages/CGATReport-0.2.1-py2.7.egg/CGATReportPlugins/Renderer.py @@ -640,6 +640,7 @@ '''
def __call__(self, dataframe, path):
dataframe = self.modifyTable(dataframe) results = ResultBlocks()
| |
Best regards, Mikulas
— Reply to this email directly or view it on GitHub https://github.com/AndreasHeger/CGATReport/issues/7#issuecomment-65763926.
Yes, definitely. It helped me a lot! Documentation could be more polished but it's still definitely big help for me :).