DRL / blobtools

Modular command-line solution for visualisation, quality control and taxonomic partitioning of genome datasets
GNU General Public License v3.0
187 stars 44 forks source link

OSError: [Errno 2] No such file or directory #78

Closed AnnabelleVH closed 5 years ago

AnnabelleVH commented 6 years ago

Hi,

I am struggling to run blobtools. May you help me please?

I had to downgrade the pip version for the install to correctly identify the depencies. For information, with pip 18.0, ./install results in:

[+] Checking dependencies... [+] [wget] /usr/local/bin/wget [+] [tar] /usr/bin/tar [+] [pip] pip [+] [python2.7] /usr/local/bin/python [+] Installing python dependencies... Traceback (most recent call last): File "setup.py", line 4, in from pip.req import parse_requirements ImportError: No module named req

I've got python 2.7.15, samtools 0.1.19 installed in and python dependencies installed using pip 9.0.3 (updated since). I exported the path to samtools: export PATH=$PATH:/path_to/samtools-0.1.19/

When I run the command: /blobtools create -i example/assembly.fna -b example/mapping_1.bam -t example/blast.out -o example/test --names /path_to/names.dmp --nodes /path_to/nodes.dmp, I receive the following error message:

[+] Parsing FASTA - example/assembly.fna [+] Creating nodesDB from /Users/annabelle/Applications/blobology-master/nodes.dmp and /Users/annabelle/Applications/blobology-master/names.dmp [+] Parsing tax0 - /Users/annabelle/Applications/blobtools/example/blast.out [+] Computing taxonomy using taxrule(s) bestsum [%] 100% [+] Parsing bam0 - /Users/annabelle/Applications/blobtools/example/mapping_1.bam [+] Checking with 'samtools flagstat' Traceback (most recent call last): File "/Users/annabelle/Applications/blobtools/lib/create.py", line 127, in main() File "/Users/annabelle/Applications/blobtools/lib/create.py", line 120, in main blobDb.parseCoverage(covLibObjs=cov_libs, no_base_cov=None, prefix=prefix) File "/Users/annabelle/Applications/blobtools/lib/BtCore.py", line 363, in parseCoverage base_cov_dict, covLib.reads_total, covLib.reads_mapped, read_cov_dict = BtIO.parseBam(covLib.f, set(self.dict_of_blobs), no_base_cov) File "/Users/annabelle/Applications/blobtools/lib/BtIO.py", line 394, in parseBam reads_total, reads_mapped = checkBam(infile) File "/Users/annabelle/Applications/blobtools/lib/BtIO.py", line 194, in checkBam for line in runCmd(command=command): File "/Users/annabelle/Applications/blobtools/lib/BtIO.py", line 159, in runCmd bufsize=-1) # buffersize of system File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 394, in init errread, errwrite) File "/usr/local/Cellar/python@2/2.7.15_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1047, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory

Do you know what's going wrong?

TomHarrop commented 6 years ago

I'm having the same problem. For me, I get that error unless I run blobtools from the installation directory. Is there any way around that?

DRL commented 5 years ago

Not sure whether still relevant, but the upcoming release gets rid of all samtools related problems ...