# Problems with panphlan\_map.py

**URL:** <https://forum.biobakery.org/t/problems-with-panphlan-map-py/2713>\
**Category:** PanPhlAn\
**Created:** [October 25, 2021, 1:02pm UTC](https://forum.biobakery.org/t/problems-with-panphlan-map-py/2713 "2021-10-25T13:02:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joao-Gatica](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/joao-gatica/32/1081_2.png) [@Joao-Gatica](https://forum.biobakery.org/u/Joao-Gatica)\
**Post date:** [October 25, 2021, 1:02pm UTC](https://forum.biobakery.org/t/problems-with-panphlan-map-py/2713/1 "2021-10-25T13:02:54Z")

</div>

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

```auto

```

---

<div class="post-metadata">

**Author:** ![leonard.dubois](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/leonard.dubois/32/750_2.png) [@leonard.dubois](https://forum.biobakery.org/u/leonard.dubois)\
**Post date:** [October 25, 2021, 1:30pm UTC](https://forum.biobakery.org/t/problems-with-panphlan-map-py/2713/2 "2021-10-25T13:30:05Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![Joao-Gatica](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/joao-gatica/32/1081_2.png) [@Joao-Gatica](https://forum.biobakery.org/u/Joao-Gatica)\
**Post date:** [October 26, 2021, 7:42am UTC](https://forum.biobakery.org/t/problems-with-panphlan-map-py/2713/3 "2021-10-26T07:42:02Z")

</div>

bowtie2 version installed is 2.4.2

---

<div class="post-metadata">

**Author:** ![Joao-Gatica](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/joao-gatica/32/1081_2.png) [@Joao-Gatica](https://forum.biobakery.org/u/Joao-Gatica)\
**Post date:** [October 26, 2021, 7:50am UTC](https://forum.biobakery.org/t/problems-with-panphlan-map-py/2713/4 "2021-10-26T07:50:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![leonard.dubois](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/leonard.dubois/32/750_2.png) [@leonard.dubois](https://forum.biobakery.org/u/leonard.dubois)\
**Post date:** [October 26, 2021, 8:58am UTC](https://forum.biobakery.org/t/problems-with-panphlan-map-py/2713/5 "2021-10-26T08:58:37Z")

</div>

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:

```auto
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

---

<div class="post-metadata">

**Author:** ![Joao-Gatica](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/joao-gatica/32/1081_2.png) [@Joao-Gatica](https://forum.biobakery.org/u/Joao-Gatica)\
**Post date:** [October 26, 2021, 10:33am UTC](https://forum.biobakery.org/t/problems-with-panphlan-map-py/2713/6 "2021-10-26T10:33:49Z")

</div>

Thank you for your time

---

<div class="post-metadata">

**Author:** ![Vladislav\_Shevtsov](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/vladislav_shevtsov/32/1402_2.png) [@Vladislav\_Shevtsov](https://forum.biobakery.org/u/Vladislav_Shevtsov)\
**Post date:** [April 22, 2022, 9:53am UTC](https://forum.biobakery.org/t/problems-with-panphlan-map-py/2713/7 "2022-04-22T09:53:07Z")

</div>

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