# Processing samples... error during StrainPhlAn 4 run

**URL:** <https://forum.biobakery.org/t/processing-samples-error-during-strainphlan-4-run/5157>\
**Category:** StrainPhlAn\
**Created:** [April 17, 2023, 8:24am UTC](https://forum.biobakery.org/t/processing-samples-error-during-strainphlan-4-run/5157 "2023-04-17T08:24:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zxyEmily](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/zxyemily/32/2106_2.png) [@zxyEmily](https://forum.biobakery.org/u/zxyEmily)\
**Post date:** [April 17, 2023, 8:24am UTC](https://forum.biobakery.org/t/processing-samples-error-during-strainphlan-4-run/5157/1 "2023-04-17T08:24:23Z")

</div>

Hi, @aitor.blancomiguez ,  
Question: I am getting the following error when running StrainPhlAn 4. I had some problems in step 5 "build the multiple sequence alignment and the phylogenetic tree”,Where could be a problem? What I should search for?

Database： I’m using sample data([http://cmprod1.cibio.unitn.it/biobakery4/github\_strainphlan4/](http://cmprod1.cibio.unitn.it/biobakery4/github_strainphlan4/))

Command: strainphlan -s consensus\_markers/\*.pkl -m db\_markers/t\_\_SGB1877.fna -r reference\_genomes/G000273725.fna.bz2 -o output -n 8 -c t\_\_SGB1877 --sample\_with\_n\_markers 0 --marker\_in\_n\_samples 0

Mon Apr 17 16:04:33 2023: Start StrainPhlAn 4.0.6 execution  
Mon Apr 17 16:04:33 2023: Creating temporary directory…  
Mon Apr 17 16:04:33 2023: Done.  
Mon Apr 17 16:04:33 2023: Filtering markers and samples…  
Mon Apr 17 16:04:33 2023: Getting markers from main samples…  
Mon Apr 17 16:04:33 2023: Done.  
Mon Apr 17 16:04:33 2023: Getting markers from main references…  
Warning: [blastn] Examining 5 or more matches is recommended  
Mon Apr 17 16:04:34 2023: Done.  
Mon Apr 17 16:04:34 2023: Removing bad markers / samples…  
Mon Apr 17 16:04:34 2023: Done.  
Mon Apr 17 16:04:34 2023: Getting markers from secondary samples and references…  
Mon Apr 17 16:04:34 2023: Done.  
Mon Apr 17 16:04:34 2023: Done.  
Mon Apr 17 16:04:34 2023: Writing samples as markers’ FASTA files…  
Mon Apr 17 16:04:34 2023: Done.  
Mon Apr 17 16:04:34 2023: Writing filtered clade markers as FASTA file…  
Mon Apr 17 16:04:34 2023: Done.  
Mon Apr 17 16:04:34 2023: Calculating polymorphic rates…  
Mon Apr 17 16:04:34 2023: Done.  
Mon Apr 17 16:04:34 2023: Executing PhyloPhlAn…  
Mon Apr 17 16:04:34 2023: Creating PhyloPhlAn database…  
Mon Apr 17 16:04:35 2023: Done.  
Mon Apr 17 16:04:35 2023: Generating PhyloPhlAn configuration file…  
Mon Apr 17 16:04:35 2023: Done.  
Mon Apr 17 16:04:35 2023: Processing samples…

[e] Command ‘[’/bin/mafft’, ‘–quiet’, ‘–anysymbol’, ‘–thread’, ‘1’, ‘–auto’, ‘output/tmpom0svapv/markers/848025373357.fna’]’ returned non-zero exit status 1.

[e] error while aligning  
command\_line: /bin/mafft --quiet --anysymbol --thread 1 --auto output/tmpom0svapv/markers/848025373357.fna  
stdin: None  
stdout: /StrainPhlAn\_test/output/tmpom0svapv/msas/848025373357.aln  
env: {‘XDG\_SESSION\_ID’: ‘322385’, ‘HOSTNAME’: ‘research’, ‘HARDWARE\_PLATFORM’: ‘x86\_64’, ‘TERM’: ‘xterm’, ‘SHELL’: ‘/bin/bash’, ‘HISTSIZE’: ‘1000’, ‘SSH\_CLIENT’: ‘192.168.6.3 54521 22’, ‘CONDA\_SHLVL’: ‘2’, ‘CONDA\_PROMPT\_MODIFIER’: '(MetaPhlAn) ', ‘OLDPWD’: ‘/home/xy.zhou’, ‘TIME\_STYLE’: ‘+%Y-%m-%d %H:%M:%S’, ‘SSH\_TTY’: ‘/dev/pts/2’, ‘USER’: ‘xy.zhou’, ‘LS\_COLORS’: ‘rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:_.tar=01;31:_.tgz=01;31:_.arc=01;31:_.arj=01;31:_.taz=01;31:_.lha=01;31:_.lz4=01;31:_.lzh=01;31:_.lzma=01;31:_.tlz=01;31:_.txz=01;31:_.tzo=01;31:_.t7z=01;31:_.zip=01;31:_.z=01;31:_.Z=01;31:_.dz=01;31:_.gz=01;31:_.lrz=01;31:_.lz=01;31:_.lzo=01;31:_.xz=01;31:_.bz2=01;31:_.bz=01;31:_.tbz=01;31:_.tbz2=01;31:_.tz=01;31:_.deb=01;31:_.rpm=01;31:_.jar=01;31:_.war=01;31:_.ear=01;31:_.sar=01;31:_.rar=01;31:_.alz=01;31:_.ace=01;31:_.zoo=01;31:_.cpio=01;31:_.7z=01;31:_.rz=01;31:_.cab=01;31:_.jpg=01;35:_.jpeg=01;35:_.gif=01;35:_.bmp=01;35:_.pbm=01;35:_.pgm=01;35:_.ppm=01;35:_.tga=01;35:_.xbm=01;35:_.xpm=01;35:_.tif=01;35:_.tiff=01;35:_.png=01;35:_.svg=01;35:_.svgz=01;35:_.mng=01;35:_.pcx=01;35:_.mov=01;35:_.mpg=01;35:_.mpeg=01;35:_.m2v=01;35:_.mkv=01;35:_.webm=01;35:_.ogm=01;35:_.mp4=01;35:_.m4v=01;35:_.mp4v=01;35:_.vob=01;35:_.qt=01;35:_.nuv=01;35:_.wmv=01;35:_.asf=01;35:_.rm=01;35:_.rmvb=01;35:_.flc=01;35:_.avi=01;35:_.fli=01;35:_.flv=01;35:_.gl=01;35:_.dl=01;35:_.xcf=01;35:_.xwd=01;35:_.yuv=01;35:_.cgm=01;35:_.emf=01;35:_.axv=01;35:_.anx=01;35:_.ogv=01;35:_.ogx=01;35:_.aac=01;36:_.au=01;36:_.flac=01;36:_.mid=01;36:_.midi=01;36:_.mka=01;36:_.mp3=01;36:_.mpc=01;36:_.ogg=01;36:_.ra=01;36:_.wav=01;36:_.axa=01;36:_.oga=01;36:_.spx=01;36:\*.xspf=01;36:’, ‘CONDA\_EXE’: ‘/software/Anaconda3/bin/conda’, ‘\_CE\_CONDA’: ‘’, ‘CONDA\_PREFIX\_1’: ‘/software/Anaconda3’, ‘MAIL’: ‘/var/spool/mail/xy.zhou’, ‘PATH’: ‘/bin:/software/Anaconda3/condabin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/lampp/bin:/mngs/bin:/code/pmd/Console:/ncbi-blast-2.10.0+/bin:/mngs/soft/kraken2:/Miniconda3/bin:/home/xy.zhou/.local/bin:/home/xy.zhou/bin’, ‘CONDA\_PREFIX’: ‘’, ‘PWD’: ‘/StrainPhlAn\_test’, ‘LANG’: ‘zh\_CN.UTF-8’, ‘PS1’: ‘(MetaPhlAn) [$USER@$PWD]$’, ‘HISTIGNORE’: ‘ls:ls -lrt:ls -al:clear:pwd’, ‘_CE\_M’: ‘’, ‘HISTCONTROL’: ‘ignoredups’, ‘SHLVL’: ‘1’, ‘HOME’: ‘/home/xy.zhou’, ‘CONDA\_PYTHON\_EXE’: ‘/software/Anaconda3/bin/python’, ‘LOGNAME’: ‘xy.zhou’, ‘SSH\_CONNECTION’: ‘192.168.6.3 54521 192.168.1.229 22’, ‘CONDA\_DEFAULT\_ENV’: ‘MetaPhlAn’, ‘LESSOPEN’: ‘||/usr/bin/lesspipe.sh %s’, ‘XDG\_RUNTIME\_DIR’: ‘/run/user/1006’, ‘HISTTIMEFORMAT’: ‘[%Y.%m.%d %H:%M:%S]’, '_’: ‘/bin/strainphlan’, ‘TMPDIR’: ‘/tmp’}

[e] Command ‘[’/bin/mafft’, ‘–quiet’, ‘–anysymbol’, ‘–thread’, ‘1’, ‘–auto’, ‘output/tmpom0svapv/markers/848025373357.fna’]’ returned non-zero exit status 1.

[e] error while aligning  
{‘program\_name’: ‘/bin/mafft’, ‘params’: ‘–quiet --anysymbol --thread 1 --auto’, ‘version’: ‘–version’, ‘command\_line’: ‘#program\_name# #params# #input# \> #output#’, ‘environment’: ‘TMPDIR=/tmp’}  
output/tmpom0svapv/markers/848025373357.fna  
/data/analysis/xingyazhou/StrainPhlAn\_test/output/tmpom0svapv/msas  
848025373357.aln

[e] Command ‘[’/bin/mafft’, ‘–quiet’, ‘–anysymbol’, ‘–thread’, ‘1’, ‘–auto’, ‘output/tmpom0svapv/markers/848025373357.fna’]’ returned non-zero exit status 1.

[e] msas crashed  
Mon Apr 17 16:04:37 2023: [Error] An error was ocurred executing a external tool, exiting…  
Mon Apr 17 16:04:37 2023: Stop StrainPhlAn execution.

Database:mpa\_vOct22\_CHOCOPhlAnSGB\_202212

Best regards,  
xingya

---

<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 20, 2023, 7:17am UTC](https://forum.biobakery.org/t/processing-samples-error-during-strainphlan-4-run/5157/2 "2023-04-20T07:17:51Z")

</div>

Hi @zxyEmily  
I see two problems with the analysis:

1. The tutorial read files were filtered out for speed up purposes to contain only reads mapping against the Jan21 markers. I see that in your case you are running it against Oct22. As the markers between versions might change, it can produce slightly different results or even not work.
2. The --sample\_with\_n\_markers and --marker\_in\_n\_samples parameters are set up to 0%, so you are adding empty markers and empty samples to the msa that might be producing the mafft error you are seeing.
