I have a problem when using extract_markers.py. Because the metaphlan database was not installed under the default directory, I used the command “-d” to assign the path of the database.
First, I tried “extract_markers.py -d /gpfs/data/lilab/home/zhoub03/software/metaphlan3_database/mpa_v30_CHOCOPhlAn_201901/mpa_v30_CHOCOPhlAn_201901.fna -c s__Bifidobacterium_breve -o clade_markers”. The error is
Sun Sep 6 16:01:52 2020: Start extract markers execution
Sun Sep 6 16:01:52 2020: Generating DB markers FASTA…
Sun Sep 6 16:03:46 2020: Done.
Sun Sep 6 16:03:46 2020: Loading MetaPhlan 3.0 database…Traceback (most recent call last):
File “/gpfs/share/apps/python/cpu/3.6.5/bin/extract_markers.py”, line 8, in
File “/gpfs/share/apps/python/cpu/3.6.5/lib/python3.6/site-packages/metaphlan/utils/extract_markers.py”, line 135, in main
extract_markers(args.database, args.clade, args.output_dir)
File “/gpfs/share/apps/python/cpu/3.6.5/lib/python3.6/site-packages/metaphlan/utils/extract_markers.py”, line 98, in extract_markers
db = pickle.load(bz2.BZ2File(database))
File “/gpfs/share/apps/python/cpu/3.6.5/lib/python3.6/bz2.py”, line 172, in peek
File “/gpfs/share/apps/python/cpu/3.6.5/lib/python3.6/_compression.py”, line 68, in readinto
data = self.read(len(byte_view))
File “/gpfs/share/apps/python/cpu/3.6.5/lib/python3.6/_compression.py”, line 103, in read
data = self._decompressor.decompress(rawblock, size)
OSError: Invalid data stream
It seems to indicate that I should use the zipped file. So I tried “extract_markers.py -d /gpfs/data/lilab/home/zhoub03/software/metaphlan3_database/mpa_v30_CHOCOPhlAn_201901/mpa_v30_CHOCOPhlAn_201901.fna.bz2 -c s__Bifidobacterium_breve -o clade_markers”. It reported
Sun Sep 6 16:04:19 2020: Start extract markers execution
Sun Sep 6 16:04:19 2020: Generating DB markers FASTA…Could not locate a Bowtie index corresponding to basename “/gpfs/data/lilab/home/zhoub03/software/metaphlan3_database/mpa_v30_CHOCOPhlAn_201901/mpa_v30_CHOCOPhlAn_201901.fna”
Error: Encountered internal Bowtie 2 exception (#1)
Command: /gpfs/share/apps/bowtie2/126.96.36.199/bin/bowtie2-inspect-s --wrapper basic-0 /gpfs/data/lilab/home/zhoub03/software/metaphlan3_database/mpa_v30_CHOCOPhlAn_201901/mpa_v30_CHOCOPhlAn_201901.fna
[e] An error was ocurred executing a external tool, exiting…
Sun Sep 6 16:04:19 2020: Stop StrainPhlAn 3.0 execution.
However, the bowtie index has been built under that directory with all six index files. I would appreciate it if you could tell me what command I should use.
Thank you so much!!!