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

Need clarification for "transpose" flag in rst-table renderer #7

Open
MikiGrit opened this issue Dec 2, 2014 · 6 comments
Open

Need clarification for "transpose" flag in rst-table renderer #7

MikiGrit opened this issue Dec 2, 2014 · 6 comments

Comments

@MikiGrit
Copy link

MikiGrit commented Dec 2, 2014

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.

@AndreasHeger
Copy link
Owner

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
#7.

@MikiGrit
Copy link
Author

MikiGrit commented Dec 4, 2014

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?).

@AndreasHeger
Copy link
Owner

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
#7 (comment).

@MikiGrit
Copy link
Author

MikiGrit commented Dec 5, 2014

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

@AndreasHeger
Copy link
Owner

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
#7 (comment).

@MikiGrit
Copy link
Author

MikiGrit commented Dec 9, 2014

Yes, definitely. It helped me a lot! Documentation could be more polished but it's still definitely big help for me :).

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

2 participants