Closed levlitichev closed 7 years ago
Ah, I realized that I should first be calling add_gr_column.py
. That works fine, but calling compute_gr_metrics.py
on the output of that script yields the same error.
(gr50) ~/code/gr50/SRC/python/scripts $ python add_gr_column.py ../../../INPUT/toy_example_input1.tsv > output.tsv
(gr50) ~/code/gr50/SRC/python/scripts $ python compute_gr_metrics.py output.tsv > output2.tsv
Traceback (most recent call last):
File "compute_gr_metrics.py", line 42, in <module>
main()
File "compute_gr_metrics.py", line 37, in main
data = pd.read_csv(reader, delimiter='\t')
File "/Users/lev/miniconda2/envs/gr50/lib/python2.7/site-packages/pandas/io/parsers.py", line 655, in parser_f
return _read(filepath_or_buffer, kwds)
File "/Users/lev/miniconda2/envs/gr50/lib/python2.7/site-packages/pandas/io/parsers.py", line 392, in _read
filepath_or_buffer, encoding, compression)
File "/Users/lev/miniconda2/envs/gr50/lib/python2.7/site-packages/pandas/io/common.py", line 210, in get_filepath_or_buffer
raise ValueError(msg.format(_type=type(filepath_or_buffer)))
ValueError: Invalid file path or buffer object type: <class 'gr50.linereader.LineReader'>
(gr50) ~/code/gr50/SRC/python/scripts $ head output2.tsv
(gr50) ~/code/gr50/SRC/python/scripts $
Looks like Pandas recently changed how it validates file/buffer-like objects. (I swear LineReader used to work fine!) I've fixed it and will merge it in momentarily.
Thanks for the fix! I managed to do what I wanted to do using the online GR calculator. It's a nice tool. Thank you for creating and maintaining it.
On Tue, Jun 13, 2017 at 4:41 PM, Jeremy Muhlich notifications@github.com wrote:
Closed #34 https://github.com/datarail/gr_metrics/issues/34 via #35 https://github.com/datarail/gr_metrics/pull/35.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/datarail/gr_metrics/issues/34#event-1122154626, or mute the thread https://github.com/notifications/unsubscribe-auth/AJZrI2b46wUfFBWu8vj8z-ucWe_7UPEWks5sDvP6gaJpZM4N0gl4 .
Hello,
I'm trying to use the Python implementation of this code. It seems like pandas doesn't like reading this LineReader object that you're using. If you could provide any assistance, it would be much appreciated.
Thank you, Lev