andrewrech / antigen.garnish

Other
46 stars 13 forks source link

mhcflurry-predict is not in PATH #116

Closed itamuria closed 4 years ago

itamuria commented 5 years ago

Hello,

I am trying to run the examples of the github and I receive this error. Why could be?

mhcflurry-predict is not in PATH

Thanks, All the best, Ibon

leeprichman commented 5 years ago

Hi Ibon, I would try manually rerunning the mhcflurry install commands that are wrapped in the install script from the shell first.

pip install mhcflurry mhcflurry-downloads fetch

Then try running the examples or the test command from the README. Let me know if this works.

itamuria commented 5 years ago

Hi, I did and now I don't have this error. I have another one but we can close this post. Thanks, All the best, Ibon

itamuria commented 4 years ago

Hello again, I am working in a Ubuntu (v 18) and I have installed the mhcflurry but when I run the antigen.garnish, still I receive the error:

mhcflurry-predict is not in PATH Download: https://github.com/hammerlab/mhcflurry

If I check it in the PATH I can see the bin folder that contain the files:

echo $PATH /home/tcr/anaconda3/bin:/home/tcr/anaconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

What more can I try? Thanks, All the best, Ibon

leeprichman commented 4 years ago

Hi Ibon,

I would first rerun

pip install mhcflurry
mhcflurry-downloads fetch

from the shell.

antigen.garnish checks that mhcflurry is installed with which mhcflurry from a system call. Try that from the shell after rerunning those commands, and let me know what that returns.

Lastly, I would check that your pip default install path is covered in that $PATH variable.

Finally, if all else fails, you can always check out the Docker image which can be used to execute a wrapper script or simple used as an interactive virtual machine.

itamuria commented 4 years ago

Hi Lee,

Thanks for proposing different options. There is something strange with mhcflurry that I am trying to fix. Meanwhile, I am testing the Docker image. I am new using docker images and I have some doubts. I would appreciate if you could help me.

1) When I try in my own computer I have sudo permissions so I can run all the steps that you have in your web: https://github.com/immune-health/antigen.garnish/wiki/Docker My question, in this case, is how could I run a script instead of copy paste each command.

2) In the cluster, I don't have sudo permissions and I am using singularity. I can pull the docker without problems because there is not any parameter of the docker.

/usr/bin/singularity pull docker://leeprichman/antigen_garnish

But in the case of the next steps, I don't know exactly where could I include the parameters.

cID=$(docker run -it -d leeprichman/snpeff /bin/bash)

I tried including in different parts but I didn't obtain good results.

cID=$(/usr/bin/singularity run -it -d docker://leeprichman/snpeff /bin/bash)
cID=$(/usr/bin/singularity run docker://leeprichman/snpeff  -it -d /bin/bash)
cID=$(/usr/bin/singularity run docker://leeprichman/snpeff  /bin/bash -it -d)
leeprichman commented 4 years ago

Hi Ibon,

On your local machine you could write a shell script to run all of the docker commands instead of line by line.

You could also directly interact with the virtual machine if thats more comfortable. For this you would:

  1. Download the image:
docker pull leeprichman/antigen_garnish
  1. Launch the container from the local machine and copy on the netMHC dependencies:
# start up our container
cID=$(docker run -it -d leeprichman/antigen_garnish /bin/bash)

# copy netMHC tars on, see README for links, change version names as appropriate
netMHC="netMHC-4.0a.Linux.tar.gz"
netMHCII="netMHCII-2.3.Linux.tar.gz"
netMHCpan="netMHCIIpan-3.2.Linux.tar.gz"
netMHCIIpan="netMHCpan-4.0a.Linux.tar.gz"

docker cp $netMHC $cID:/$netMHC
docker cp $netMHCII $cID:/$netMHCII
docker cp $netMHCpan $cID:/$netMHCpan
docker cp $netMHCIIpan $cID:/$netMHCIIpan

# run the configuration script
docker exec $cID config_netMHC.sh
  1. Load on any files you want in the container with docker cp myfile.txt $cID:/myfile.txt, such as VCFs, and HLA tables.

  2. Now you can directly interact with the container and get a command prompt within the virtual machine:

    
    docker exec -it $cID /bin/bash

your files will be in the root directory if thats where you copied them

ls /

open R if you want to run commands that way

R



5. If you write an Rscript with commands for antigen garnish in R, you could use `docker cp` to copy it onto the container and run it from the virtual machine command prompt with the `Rscript` command, or from your local machine by passing the command to the container with `docker exec $cID Rscript my_Rscript_file.R`

6. Remember to use `docker cp` to copy your output off the container before shutting it down or the data will not be saved locally.

I'm not familiar with singularity so unfortunately I don't know how to help you with this. If you are able to install Docker directly to your cluster, you could follow the same steps to run antigen.garnish as you would on your local machine.

-Lee
itamuria commented 4 years ago

Thanks for your advises Lee. All the best, ibon