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

export2graphlan error #4

Open
ZhangMin-123 opened this issue Jan 20, 2022 · 4 comments
Open

export2graphlan error #4

ZhangMin-123 opened this issue Jan 20, 2022 · 4 comments
Assignees

Comments

@ZhangMin-123
Copy link

Hi,

I'm trying to use export2graphlan on my humann3 abundance table output. but when I RUN:
"Traceback (most recent call last):
File "/home/meta/miniconda2/envs/meta/bin/export2graphlan.py", line 768, in
main()
File "/home/meta/miniconda2/envs/meta/bin/export2graphlan.py", line 511, in main
lefse_input = DataMatrix(args.lefse_input, args)
File "/home/meta/miniconda2/envs/meta/bin/hclust2.py", line 149, in init
index_col = self.args.sname_row if self.args.sname_row > -1 else None
File "/home/meta/miniconda2/envs/meta/lib/python2.7/site-packages/pandas/io/parsers.py", line 678, in parser_f
return _read(filepath_or_buffer, kwds)
File "/home/meta/miniconda2/envs/meta/lib/python2.7/site-packages/pandas/io/parsers.py", line 446, in _read
data = parser.read(nrows)
File "/home/meta/miniconda2/envs/meta/lib/python2.7/site-packages/pandas/io/parsers.py", line 1036, in read
ret = self._engine.read(nrows)
File "/home/meta/miniconda2/envs/meta/lib/python2.7/site-packages/pandas/io/parsers.py", line 1886, in read
values = data.pop(self.index_col[i])
IndexError: list index out of range".
物种.xlsx

Any ideas what's going wrong?
Thanks in advance!

@fasnicar fasnicar self-assigned this Jan 20, 2022
@fasnicar
Copy link
Member

Hi, can you please provide the full command and also the input file(s) you're using?

@ZhangMin-123
Copy link
Author

export2graphlan.py --skip_rows 1,2 -i taxonomy.tsv \

  --tree temp/merged_abundance.tree.txt \
  --annotation temp/merged_abundance.annot.txt \
  --most_abundant 1000 --abundance_threshold 20 --least_biomarkers 10 \
  --annotations 3,4 --external_annotations 7

Traceback (most recent call last):
File "/home/meta/miniconda2/envs/meta/bin/export2graphlan.py", line 768, in
main()
File "/home/meta/miniconda2/envs/meta/bin/export2graphlan.py", line 511, in main
lefse_input = DataMatrix(args.lefse_input, args)
File "/home/meta/miniconda2/envs/meta/bin/hclust2.py", line 149, in init
index_col = self.args.sname_row if self.args.sname_row > -1 else None
File "/home/meta/miniconda2/envs/meta/lib/python2.7/site-packages/pandas/io/parsers.py", line 678, in parser_f
return _read(filepath_or_buffer, kwds)
File "/home/meta/miniconda2/envs/meta/lib/python2.7/site-packages/pandas/io/parsers.py", line 446, in _read
data = parser.read(nrows)
File "/home/meta/miniconda2/envs/meta/lib/python2.7/site-packages/pandas/io/parsers.py", line 1036, in read
ret = self._engine.read(nrows)
File "/home/meta/miniconda2/envs/meta/lib/python2.7/site-packages/pandas/io/parsers.py", line 1886, in read
values = data.pop(self.index_col[i])
IndexErrotaxonomy.xlsx

@timj6599
Copy link

i got the same error. any fixes?

@fasnicar
Copy link
Member

fasnicar commented Aug 7, 2024

It could be due to the presence of the NCBI_tax_ID column. Can you check if removing it will solve it? In this case, I can implement a code fix for this case.

Thanks,
Francesco

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

3 participants