Problems with panphlan_map.py

Hi
I new using panphlan. I tried the tutorial running ```
panphlan_map.py -p Eubacterium_rectale/Eubacterium_rectale_pangenome.tsv
–indexes Eubacterium_rectale/Eubacterium_rectale \
-i sample01.fastq
-o map_results/sample01_erectale.csv
but I obtained the same error…

(ERR): “$/Eubacterium_rectale” does not exist or is not a Bowtie 2 index
Exiting now …
[I] Rejected 0 reads over 0 total
Bowtie2 mapping and SAM filtering completed.
[I] Samtools version 1.13; path: $/miniconda3/bin/samtools
[I] samtools view -bS /tmp/panphlan_zhj2ejsl.sam
[main_samview] fail to read the header from “/tmp/panphlan_zhj2ejsl.sam”.
samtools sort: failed to read header from “-”
[I] samtools index /tmp/panphlan_dqx7xngo.bam
samtools index: “/tmp/panphlan_dqx7xngo.bam” is in a format that cannot be usefully indexed
[E] Samtools index encountered some error.

I have the 6 generated files xxx1.bt2, xxx2.bt2, xxx3.bt2, xxx4.bt2 and xxx.rev.1.bt2 and xxx.rev.2.bt2
Also, I created a new folder containing only the 6 bt2 files, but it’s the same
Finally, I tried with another pangenome (Bifidobacterium longum) but I obtain the same error.

Do you have any suggestion?

Thank you,
Joao

Hello !

If you got the pangenome folder from the panphlan_download_pangenome.py -i Eubacterium_rectale command, all should be fine.

It might depends on what’s the working directory when you run panphlan_map.py. Maybe the indexes are just not found. Otherwise it could come from your BowTie 2 version as well. Which one is it ?

bowtie2 version installed is 2.4.2

Regarding the work directory… yesterday, the pangenome folder and the sample fastq file were in different folders; but now, I created a folder containing the pangenome folder and the fastq sample, but the result is the same
Maybe I’m missing something regarding work directory?
Thanks again for your help

I’m personally using the 2.3.4 version, but looking at the change logs on GitHub, this shouldn’t be a problem here.

Basically when you provide indexes to Bowtie2 (here in PanPhlAn through the --indexes argument) you provide the path to the files and the prefix here the prefix Eubacterium_rectale will detect all:

Eubacterium_rectale.1.bt2  
Eubacterium_rectale.3.bt2 
Eubacterium_rectale.rev.1.bt2  
Eubacterium_rectale.2.bt2  
Eubacterium_rectale.4.bt2  
Eubacterium_rectale.rev.2.bt2

so basically if the Eubacterium_rectale indexes are in a Eubacterium_rectale/ folder in the working directory, --indexes Eubacterium_rectale/Eubacterium_rectale should work.

I’ll try to check with the new Bowtie2 version to see if there are some issue here

1 Like

Thank you for your time

Hello Joao, how did you solve the issue? Did you?