Python error running BinSanity on custom vm

Hi there,

I have been working on a custom ubuntu vm which now has quite a few tools that I am using to analyse de novo metagenome assmeblies. I am attempting to use a binning tool called BinSanity (, but I am getting what I think is a python error when I try to run it. The purpose of the below command is to generate a coverage file for the main workflow command, and I managed to get this particular step to work on my mac a short while ago. Any ideas?

(file names have been replaced with description of files in ‘< >’):-

Binsanity-profile -i <my_input_fasta_file> -s <my_directory_containing_bam_files> --ids <my_contig_id_txt_file> -c <output_name> -T 8

                Contigs formated to generate counts

Traceback (most recent call last):
File “/usr/local/bin/Binsanity-profile”, line 166, in
File “/usr/local/bin/Binsanity-profile”, line 28, in feature_counts[“featureCounts”,"-M","-O", “-F”, “SAF”,"-T",str(threads),"-a", os.path.join(outputdir,str(outname)+".saf"),"-o", os.path.join(outputdir,str(outname)+".readcounts"),str(mapfile_file)],stdout=subprocess.PIPE)
File “/usr/lib/python2.7/”, line 523, in call
return Popen(*popenargs, **kwargs).wait()
File “/usr/lib/python2.7/”, line 711, in init
errread, errwrite)
File “/usr/lib/python2.7/”, line 1343, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

Do you have all of the dependencies for BinSanity installed correctly? Particularly featureCounts?

It should be installed and available on the PATH, i.e. you can run:

featureCounts -v

and the version will be reported.

Ah ha, that will be it! I thought I had installed through miniconda but in this case I hadn’t so forgot that dependency. Thanks for figuring it out!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.