Strainplan sample2markers.py error

68 views
Skip to first unread message

Hiren Ghosh

unread,
Feb 2, 2020, 1:42:04 PM2/2/20
to metaphl...@googlegroups.com
Hello,

 I am getting an error while running StrainPhlan, the command as bellow and my dependent tools versions as follows: 

Python 2.7.9
MetaPhlAn Version 2.7.2
bcftools Version: 1.7
samtools Version: 1.2

sample2markers.py --ifn_samples merged_MIBSFF3015_trim_.sam.bz2 --input_type sam --output_dir .

Traceback (most recent call last):
  File "/apps/software/MetaPhlAn/2.7.2-foss-2015b/strainphlan_src/ooSubprocess.py", line 244, in wrapper
    return f(*args, **kwargs)
  File "/apps/software/MetaPhlAn/2.7.2-foss-2015b/strainphlan_src/sample2markers.py", line 401, in run_sample
    bcftools_exe=args['bcftools_exe'])
  File "/apps/software/MetaPhlAn/2.7.2-foss-2015b/strainphlan_src/sample2markers.py", line 320, in sam2markers
    stderr=error_pipe)
  File "/apps/software/MetaPhlAn/2.7.2-foss-2015b/strainphlan_src/ooSubprocess.py", line 181, in chain
    %(' | '.join(self.chain_cmds), return_code))
ooSubprocessException: Failed when executing the command: dump_file.py --input_file merged_MIBSFF3015_trim_.sam.bz2 | samtools view -bS - | samtools sort - -o ./merged_MIBSFF3015_trim_.sam.bz2.bam.sorted | samtools mpileup -u - | bcftools view -c -g -p 1.1 -
return code: 255

Any technical help on troubleshooting this would be highly appreciated. 

Kind regards, 
Hiren 

Aitor Blanco-Miguez

unread,
Feb 3, 2020, 11:07:06 AM2/3/20
to MetaPhlAn-users
Hi Hiren,
I think your problem is the version of samtools you are using. Citing the tutorial:

Pre-requisites
StrainPhlAn requires python 2.7 and the libraries pysam (tested on version 0.8.3), biopython, msgpack, pandas (tested on version 0.22), numpy (tested on version 1.14.2) and scipy (tested on version 1.0.0), dendropy (tested on version 3.12.0). Besides, StrainPhlAn also needs the following programs in the executable path:
  • bowtie2 for mapping reads against the marker database.
  • MUSCLE for the alignment step.
  • samtools, bcftools and vcfutils.pl which can be downloaded from here for building consensus markers. Note that vcfutils.pl is included in bcftools and StrainPhlAn only works with samtools version 0.1.19 as samtools has changed the output format after this version.

You should install the version 0.1.19 of Samtools.

I hope this can help you.

Best,
Aitor
Reply all
Reply to author
Forward
0 new messages