biobakery / MetaPhlAn

MetaPhlAn is a computational tool for profiling the composition of microbial communities from metagenomic shotgun sequencing data
http://segatalab.cibio.unitn.it/tools/metaphlan/index.html
MIT License
302 stars 86 forks source link

[BUG]ValueError: Number of passed names did not match number of header fields in the file A clear and concise description of what the bug is. #213

Closed Damianyangyang closed 1 year ago

Damianyangyang commented 1 year ago

Describe the bug merge_metaphlan_tables.py _abundance_metagenome.txt > output/merged_abundance_table.txt Traceback (most recent call last): File "/home/bioinfo/sunyy/.conda/envs/mpa4/bin/merge_metaphlan_tables.py", line 8, in sys.exit(main()) File "/home/bioinfo/sunyy/.conda/envs/mpa4/lib/python3.7/site-packages/metaphlan/utils/merge_metaphlan_tables.py", line 73, in main merge(args.aistms, open(args.o, 'w') if args.o else sys.stdout, args.gtdb_profiles) File "/home/bioinfo/sunyy/.conda/envs/mpa4/lib/python3.7/site-packages/metaphlan/utils/merge_metaphlan_tables.py", line 35, in merge iIn = pd.read_csv(f, sep='\t', skiprows=len(headers), names=names, usecols=[0,2] if not gtdb else range(2), index_col=0) File "/home/bioinfo/sunyy/.local/lib/python3.7/site-packages/pandas/util/_decorators.py", line 311, in wrapper return func(args, kwargs) File "/home/bioinfo/sunyy/.local/lib/python3.7/site-packages/pandas/io/parsers/readers.py", line 586, in read_csv return _read(filepath_or_buffer, kwds) File "/home/bioinfo/sunyy/.local/lib/python3.7/site-packages/pandas/io/parsers/readers.py", line 482, in _read parser = TextFileReader(filepath_or_buffer, kwds) File "/home/bioinfo/sunyy/.local/lib/python3.7/site-packages/pandas/io/parsers/readers.py", line 811, in init self._engine = self._make_engine(self.engine) File "/home/bioinfo/sunyy/.local/lib/python3.7/site-packages/pandas/io/parsers/readers.py", line 1040, in _make_engine return mapping[engine](self.f, self.options) # type: ignore[call-arg] File "/home/bioinfo/sunyy/.local/lib/python3.7/site-packages/pandas/io/parsers/c_parser_wrapper.py", line 69, in init self._reader = parsers.TextReader(self.handles.handle, kwds) File "pandas/_libs/parsers.pyx", line 542, in pandas._libs.parsers.TextReader.cinit File "pandas/_libs/parsers.pyx", line 770, in pandas._libs.parsers.TextReader._get_header ValueError: Number of passed names did not match number of header fields in the file

Platform (please complete the following information):

github-actions[bot] commented 1 year ago

Thank you for creating this issue. We currently field issues through our bioBakery Discourse Support Forum. If you would please post the issue to discourse we would be happy to sync up with you to get it resolved.