Open edisagarcia opened 3 years ago
Hi Ed,
My guess is that there's an issue with the path to the directory of all your cog_stats.txt file. Did you replace lines 9 - 11 with your personal paths?
Also, cogformat.py isn't intended to be downloaded and run, but rather used as an example for writing your own script. As I say in the tutorial: "This script isn’t intended to be downloaded and used because it’s written specifically for my sample nomenclature, but I’ve linked it here as reference if you write your own script."
Cheers, Edna
Yes, I have changed them. Thanks again, I will use as an example to write my own script. Cheers, Ed
Hi Edna, Thank you so much for making available your pipeline for metagenomics. It has helped me a lot. I am trying to use the cogformat.py for my resutls of rpsblast cog. However, it appears this error:
Traceback (most recent call last): File "cogformat.py", line 60, in
output = formatCOG(directoryCOG)
File "cogformat.py", line 34, in formatCOG
COGinput = pd.read_csv(COGfiles[file2], sep='\s+', index_col = 0, names = ['Function', 'Count'])
File "/home/p277936/.local/lib/python3.8/site-packages/pandas/io/parsers.py", line 605, in read_csv
return _read(filepath_or_buffer, kwds)
File "/home/p277936/.local/lib/python3.8/site-packages/pandas/io/parsers.py", line 463, in _read
return parser.read(nrows)
File "/home/p277936/.local/lib/python3.8/site-packages/pandas/io/parsers.py", line 1052, in read
index, columns, col_dict = self._engine.read(nrows)
File "/home/p277936/.local/lib/python3.8/site-packages/pandas/io/parsers.py", line 2096, in read
values = data.pop(self.index_col[i])
IndexError: list index out of range
The line 2096 looks fine in the cog_stats.txt file (similar to the other lines). I am wondering if you have a suggestion to solve this issue. Cheers, Ed