Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conda Install #108

Open
JChristopherEllis opened this issue Feb 28, 2020 · 5 comments
Open

Conda Install #108

JChristopherEllis opened this issue Feb 28, 2020 · 5 comments

Comments

@JChristopherEllis
Copy link

Installed Midas with the conda install and also download the database.

However, I get the following error....

Error: File not found: hs-blastn

Are there other items that need to be installed with conda?

Thanks,
Chris

@nick-youngblut
Copy link

I ran into this too. It seems to be due to midas assuming that the executables are in certain paths instead of just checking the PATH var:

def add_executables(args):
        """ Identify relative file and directory paths """
        src_dir = os.path.dirname(os.path.abspath(__file__))
        main_dir = os.path.dirname(src_dir)
        args['stream_seqs'] = '/'.join([src_dir, 'run', 'stream_seqs.py'])
        args['hs-blastn'] = '/'.join([main_dir, 'bin', platform.system(), 'hs-blastn'])
        args['bowtie2-build'] = '/'.join([main_dir, 'bin', platform.system(), 'bowtie2-build'])
        args['bowtie2'] = '/'.join([main_dir, 'bin', platform.system(), 'bowtie2'])
        args['samtools'] = '/'.join([main_dir, 'bin', platform.system(), 'samtools'])

        for arg in ['hs-blastn', 'stream_seqs', 'bowtie2-build', 'bowtie2', 'samtools']:
                if not os.path.isfile(args[arg]):
                        sys.exit("\nError: File not found: %s\n" % args[arg])

        for arg in ['hs-blastn', 'bowtie2-build', 'bowtie2', 'samtools']:
                if not os.access(args[arg], os.X_OK):
                        sys.exit("\nError: File not executable: %s\n" % args[arg])

Changing this to:

from distutils.spawn import find_executable
for exe in [...]:
    if find_executable(exe) is None:
        sys.exit("\nError: File not found: {}\n".format(exe))

...would fix that check, but then the code that specifies the paths for the executables would also need to change. I'll create a PR

@marcomeola
Copy link

Can you specify which file has to be modified?

@nick-youngblut
Copy link

Can you specify which file has to be modified?

./midas/utility.py

@npavlovikj
Copy link

Any updates on merging Nick's PR? I can patch the conda recipe to look for the executables in PATH, but it is much better if the code is updated in MIDAS release itself.

@cirodri1
Copy link

Hello! I am encountering the same issue, but since I am using a High Performance Computing cluster from my institution I do not have the permissions to change the files. Has this been solved in any other way or with an update? The version that is installed in the HPC is midas/1.3.2

Aiswarya-prasad added a commit to Aiswarya-prasad/MIDAS that referenced this issue Oct 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants