# Strainphlan Error: No matching key/data pair found

**URL:** <https://forum.biobakery.org/t/strainphlan-error-no-matching-key-data-pair-found/1955>\
**Category:** StrainPhlAn\
**Created:** [April 19, 2021, 7:31am UTC](https://forum.biobakery.org/t/strainphlan-error-no-matching-key-data-pair-found/1955 "2021-04-19T07:31:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sarei](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@sarei](https://forum.biobakery.org/u/sarei)\
**Post date:** [April 19, 2021, 7:31am UTC](https://forum.biobakery.org/t/strainphlan-error-no-matching-key-data-pair-found/1955/1 "2021-04-19T07:31:20Z")

</div>

Hi Everybody,

I hope you can help me. I am pretty new in metagenomic analysis and currently trying to understand the biobakery tools and especially to apply them.

I am currently into one error using Strainphlan which is can not solve.

For a small set of 4 samples I generate .pkl files using the following command

```auto
sample2markers.py -i sams/*.sam.bz2 -o consensus_markers -n 8

```

I tried to further use strainphlan to generate a tree file and an alignment.

strainphlan -s consensus\_markers/\*.pkl -m db\_markers/s\_\_Faecalibacterium\_prausnitzii.fna -r eference\_genomes/G000273725.fna -o output -n 8 -c s\_\_Faecalibacterium\_prausnitzii --mutation\_rates

I am then runnign into an error  
Mon Apr 19 07:10:52 2021: Start StrainPhlAn 3.0 execution  
Mon Apr 19 07:10:52 2021: Creating temporary directory…  
Mon Apr 19 07:10:53 2021: Done.  
Mon Apr 19 07:10:53 2021: Getting markers from main sample files…  
Mon Apr 19 07:10:59 2021: Done.  
Mon Apr 19 07:10:59 2021: Getting markers from main reference files…Warning: [blastn] Examining 5 or more matches is recommended  
Error: mdb\_dbi\_open: MDB\_NOTFOUND: No matching key/data pair found

Mon Apr 19 07:11:50 2021: Done.  
Mon Apr 19 07:11:50 2021: Removing bad markers / samples…  
[e] Phylogeny can not be inferred. Too many samples were discarded  
Mon Apr 19 07:11:50 2021: Stop StrainPhlAn 3.0 execution.

I hope you can help me with this issue.

Thank you very much for your help!!

Best  
Sandra

---

<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:** [April 19, 2021, 1:22pm UTC](https://forum.biobakery.org/t/strainphlan-error-no-matching-key-data-pair-found/1955/2 "2021-04-19T13:22:00Z")

</div>

Hi @sarei  
Thanks for getting in touch.  
From you output it looks like StrainPhlAn is not able to reconstruct enough _F. prausnitzii_ markers in your samples to infer the phylogeny. If StrainPhlAn is not able to reconstruct enough clade-specific markers from a sample (by default 20 markers) that sample will be discarded (this behaviour can be modified by using the `--sample_with_n_markers` parameter). Moreover, the mininum amount of filtered samples to run the phylogeny is 4, so in case one of your samples was discarded you will not be able to build the tree. If you use the option` --print_clades_only` StrainPhlAn will tell you the clades it is able to reconstruct with the specified parameters, e.g:  
`strainphlan -s consensus_markers/*.pkl -m db_markers/s __Faecalibacterium_prausnitzii.fna -r eference_genomes/G000273725.fna -o output -n 8 -c s__ Faecalibacterium_prausnitzii --print_clades_only`  
I hope this helps
