# Fail to produce the consensus-marker files

**URL:** <https://forum.biobakery.org/t/fail-to-produce-the-consensus-marker-files/1461>\
**Category:** StrainPhlAn\
**Created:** [December 20, 2020, 6:09pm UTC](https://forum.biobakery.org/t/fail-to-produce-the-consensus-marker-files/1461 "2020-12-20T18:09:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kang](https://avatars.discourse-cdn.com/v4/letter/k/d6d6ee/32.png) [@kang](https://forum.biobakery.org/u/kang)\
**Post date:** [December 20, 2020, 6:09pm UTC](https://forum.biobakery.org/t/fail-to-produce-the-consensus-marker-files/1461/1 "2020-12-20T18:09:51Z")

</div>

When I try to produce the consensus marker files:  
Command:  
sample2markers.py -i SRS013951.sam.bz2 -o consensus\_markers -n 40

Error:  
Sun Dec 20 19:01:59 2020: Start samples to markers execution  
Sun Dec 20 19:01:59 2020: Decompressing samples…  
Sun Dec 20 19:02:01 2020: Done.  
Sun Dec 20 19:02:01 2020: Converting samples to BAM format…  
[samopen] SAM header is present: 1132380 sequences.  
Sun Dec 20 19:02:09 2020: Done.  
Sun Dec 20 19:02:09 2020: Sorting BAM samples…  
[e] Parallel execution fails: [Errno 2] No such file or directory: ‘consensus\_markers/tmp/SRS013951.sorted.bam’  
Sun Dec 20 19:02:14 2020: Stop StrainPhlAn 3.0 execution.

I’m sure that the SRS013951.sam.bz2 is right (down load from your wedsite).  
I don’t know why the samtools don’t when the python script use it.

---

<div class="post-metadata">

**Author:** ![aitor.blancomiguez](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/aitor.blancomiguez/32/86_2.png) [@aitor.blancomiguez](https://forum.biobakery.org/u/aitor.blancomiguez)\
**Post date:** [December 21, 2020, 10:44am UTC](https://forum.biobakery.org/t/fail-to-produce-the-consensus-marker-files/1461/2 "2020-12-21T10:44:00Z")

</div>

Hi @kang  
Could you give me more details about the installation? Did you install metaphlan via conda? Which version of metaphlan did you install (you can run `metaphlan -v`)? Which version of samtools do you have installed (you can run `samtools --version`)?

---

<div class="post-metadata">

**Author:** ![kang](https://avatars.discourse-cdn.com/v4/letter/k/d6d6ee/32.png) [@kang](https://forum.biobakery.org/u/kang)\
**Post date:** [December 21, 2020, 9:50pm UTC](https://forum.biobakery.org/t/fail-to-produce-the-consensus-marker-files/1461/3 "2020-12-21T21:50:12Z")

</div>

Hi Aitor,  
Thank you for your reply!  
I install it with conda. MetaPhlAn version 3.0.7 (09 Dec 2020) and my smtools version 0.1.19-44428cd.

---

<div class="post-metadata">

**Author:** ![aitor.blancomiguez](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/aitor.blancomiguez/32/86_2.png) [@aitor.blancomiguez](https://forum.biobakery.org/u/aitor.blancomiguez)\
**Post date:** [December 22, 2020, 4:53pm UTC](https://forum.biobakery.org/t/fail-to-produce-the-consensus-marker-files/1461/4 "2020-12-22T16:53:07Z")

</div>

Hi @kang  
I think the problem is related with your version of Samtools. The first StrainPhlAn version was working only with your version (0.1.19). However, this is quite an old version and the usage of the functions differ a little bit. In StrainPhlAn 3.0 it is a requisite to have a version of Samtools superior to 1.0 (when developed, it was tested with Samtools 1.9) so I would suggest you to install the lastest version of Samtools and execute sample2markers.py again.  
I hope this fix your problem.

---

<div class="post-metadata">

**Author:** ![kang](https://avatars.discourse-cdn.com/v4/letter/k/d6d6ee/32.png) [@kang](https://forum.biobakery.org/u/kang)\
**Post date:** [December 24, 2020, 11:15pm UTC](https://forum.biobakery.org/t/fail-to-produce-the-consensus-marker-files/1461/5 "2020-12-24T23:15:41Z")

</div>

Hi Aitor,  
Thank you for your help! Now it work.  
Merry Chrismas!
