metaphlan4
command:merge_metaphlan_tables.py *_abundance_metagenome.txt > output/merged_abundance_table.txt
error:
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
Were all the profiles generated using the same metaphlan 4 code and database version?
In my case yes.
I also have the same issue…
Hi @Alessandro_Lasorsa
Which params did you use to run metaphlan on the samples?