griffithlab / pVACtools

http://www.pvactools.org
BSD 3-Clause Clear License
141 stars 59 forks source link

Missing MHCflurry downloadable file #218

Closed zhangbaifeng closed 5 years ago

zhangbaifeng commented 5 years ago

Describe the bug Traceback (most recent call last): File "/opt/conda/bin/pvacseq", line 11, in sys.exit(main()) File "/opt/conda/lib/python3.6/site-packages/tools/pvacseq/main.py", line 99, in main args[0].func.main(args[1]) File "/opt/conda/lib/python3.6/site-packages/tools/pvacseq/run.py", line 107, in main if allele in MHCI.all_valid_allele_names(): File "/opt/conda/lib/python3.6/site-packages/lib/prediction_class.py", line 136, in all_valid_allele_names valid_alleles.update(prediction_class().valid_allele_names()) File "/opt/conda/lib/python3.6/site-packages/lib/prediction_class.py", line 192, in valid_allele_names predictor = Class1AffinityPredictor.load() File "/opt/conda/lib/python3.6/site-packages/mhcflurry/class1_affinity_predictor.py", line 393, in load models_dir = get_default_class1_models_dir() File "/opt/conda/lib/python3.6/site-packages/mhcflurry/downloads.py", line 85, in get_default_class1_models_dir return get_path("models_class1", "models", test_exists=test_exists) File "/opt/conda/lib/python3.6/site-packages/mhcflurry/downloads.py", line 140, in get_path % (quote(path), download_name)) RuntimeError: Missing MHCflurry downloadable file: /tmp/1.2.0/models_class1/models. To download this data, run: mhcflurry-downloads fetch models_class1 in a shell. [job pvacseq.cwl] completed permanentFail { "mhc_i_filtered_neoepitopes": null, "mhc_ii_unfiltered_neoepitopes": null, "mhc_ii_filtered_neoepitopes": null, "mhc_i_unfiltered_neoepitopes": null } Final process status is permanentFail To Reproduce I start virtual environment, and then run: cwltool pvacseq.cwl --alleles HLA-A*02:01 --prediction_algorithms NetMHCpan --sample_name B10 --input_file vep.annotated.vcf

pvacseq.cwl script is:

!/usr/bin/env cwl-runner

cwlVersion: v1.0 class: CommandLineTool label: "run pVACseq"

baseCommand: [ "pvacseq", "run" ] requirements:

Log Output

NO

Output File NO

Expected behavior MHC_Class_I/*.final.tsv

susannasiebert commented 5 years ago

The MHCflurry files get downloaded by this line of the Dockerfile: https://github.com/griffithlab/docker-pvactools/blob/1.1.0/Dockerfile#L50. They are installed to /tmp/1.2.0/models_class1/ inside of the Docker container. My best guess is that something about the way things are set up on your machine changes things so that this directory is no longer in your path.

We also recently released a new pVACtools version (1.1.1) so you'll want to make sure to download the latest CWL.

susannasiebert commented 5 years ago

Digging into this some more, I believe the problem is that cwtools mounts a temporary directory into /tmp, basically overwriting what is already there. We can probably get around this by downloading the MHCflurry files into a different directory.

zhangbaifeng commented 5 years ago

Thanks, Susanna.

Susanna Kiwala notifications@github.com 于2018年10月29日周一 下午9:28写道:

The MHCflurry files get downloaded by this line of the Dockerfile: https://github.com/griffithlab/docker-pvactools/blob/1.1.0/Dockerfile#L50. They are installed to /tmp/1.2.0/models_class1/ inside of the Docker container. My best guess is that something about the way things are set up on your machine changes things so that this directory is no longer in your path.

We also recently released a new pVACtools version (1.1.1) so you'll want to make sure to download the latest CWL.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/griffithlab/pVACtools/issues/218#issuecomment-433909685, or mute the thread https://github.com/notifications/unsubscribe-auth/AM7G2k16EKEL2cFxsTbmRYyd1D0G7gOaks5upwKVgaJpZM4X9RR1 .

susannasiebert commented 5 years ago

The 1.1.1 version of the pvactools docker container has been rebuilt with the change to the MHCflurry data directory. Please download the latest version of the CWL to use this update.

As a side note, during testing I discovered that integer inputs to the CWL are not compatible with cwltool's command line passing of parameters. This is a known bug with cwltool (see https://github.com/common-workflow-language/cwltool/issues/342). For your run, you will need to specify an epitope length (because you're using a class I algorithm), which is an integer input to the CWL. To get around this issue, you will need to use a yml file for your arguments, instead of the command line passing you're currently using.

zhangbaifeng commented 5 years ago

Hi Susanna,

I edited pvacseq.cwl file like this:

"epitope_lengths: type: int[]? inputBinding: prefix: "-e" itemSeparator: ',' separate: false valueFrom: "9,10,11" ###Added by me

Then, I run "cwltool pvacseq.cwl --alleles HLA-A*02:01 --prediction_algorithms NetMHCpan --sample_name B10 --input_file ../test", ../test is VEP annotated vcf file. And got no error message and no result. Detailed log:

/share/Data01/zhangbaifeng/BLC/Neoantigen/pvac/bin/cwltool 1.0.20181012180214 Resolved 'pvacseq.cwl' to 'file:///share/Data01/zhangbaifeng/BLC/Neoantigen/pvac/pvactools_cwls/pvacseq.cwl' [job pvacseq.cwl] /tmp/tmpem0k8xj5$ docker \ run \ -i \ --volume=/tmp/tmpem0k8xj5:/QfsVBo:rw \ --volume=/tmp/tmpd9he6owp:/tmp:rw \ --volume=/share/Data01/zhangbaifeng/BLC/Neoantigen/pvac/test:/var/lib/cwl/stgae64af8b-04b6-4b57-a382-59e69dec86b3/test:ro \ --workdir=/QfsVBo \ --read-only=true \ --user=1015:1016 \ --rm \ --env=TMPDIR=/tmp \ --env=HOME=/QfsVBo \ griffithlab/pvactools:1.1.1 \ pvacseq \ run \ -l \ 21 \ /var/lib/cwl/stgae64af8b-04b6-4b57-a382-59e69dec86b3/test \ B10 \ HLA-A*02:01 \ NetMHCpan \ /QfsVBo \ --iedb-install-directory \ /opt/iedb \ --pass-only [job pvacseq.cwl] completed permanentFail { "combined_all_epitopes": null, "combined_filtered_epitopes": null, "combined_ranked_epitopes": null, "mhc_i_all_epitopes": null, "mhc_i_filtered_epitopes": null, "mhc_i_ranked_epitopes": null, "mhc_ii_all_epitopes": null, "mhc_ii_filtered_epitopes": null, "mhc_ii_ranked_epitopes": null } Final process status is permanentFail

Best, Baifeng

susannasiebert commented 5 years ago

This worked for me:

    epitope_lengths:
        type: int[]?
        inputBinding:
            prefix: "-e"
            itemSeparator: ','
            separate: false
        default:
          - 9
          - 10
          - 11
zhangbaifeng commented 5 years ago

I deleted "separate: false", because it will cause "-e9,10,11". But I also get same error as above.

[job pvacseq.cwl] /tmp/tmpk3v9cckz$ docker \

run \

-i \

--volume=/tmp/tmpk3v9cckz:/dkVQyw:rw \

--volume=/tmp/tmpalm8qo54:/tmp:rw \

--volume=/share/Data01/zhangbaifeng/BLC/Neoantigen/pvac/test:/var/lib/cwl/stg8ee6fffd-c25c-47b3-ac9b-ebe53ea4648f/test:ro \

--workdir=/dkVQyw \

--read-only=true \

--user=1015:1016 \

--rm \

--env=TMPDIR=/tmp \

--env=HOME=/dkVQyw \

griffithlab/pvactools:1.1.1 \

pvacseq \

run \

-e \

9,10,11 \

-l \

21 \

/var/lib/cwl/stg8ee6fffd-c25c-47b3-ac9b-ebe53ea4648f/test \

B10 \

HLA-A*02:01 \

NetMHCpan \

/dkVQyw \

--iedb-install-directory \

/opt/iedb \

--pass-only

[job pvacseq.cwl] completed permanentFail

{

"combined_all_epitopes": null,

"combined_filtered_epitopes": null,

"combined_ranked_epitopes": null,

"mhc_i_all_epitopes": null,

"mhc_i_filtered_epitopes": null,

"mhc_i_ranked_epitopes": null,

"mhc_ii_all_epitopes": null,

"mhc_ii_filtered_epitopes": null,

"mhc_ii_ranked_epitopes": null

}

Final process status is permanentFail

Susanna Kiwala notifications@github.com 于2018年10月30日周二 下午10:31写道:

This worked for me:

epitope_lengths:
    type: int[]?
    inputBinding:
        prefix: "-e"
        itemSeparator: ','
        separate: false
    default:
      - 9
      - 10
      - 11

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/griffithlab/pVACtools/issues/218#issuecomment-434323403, or mute the thread https://github.com/notifications/unsubscribe-auth/AM7G2o6Fm81tOi2TCPBAU0JXQ9lc9Wunks5uqGKxgaJpZM4X9RR1 .

susannasiebert commented 5 years ago

I attached the cwl file that worked on my machine. With this cwl I was able to get a succeeded run. Unfortunately, I'm unable to provide additional assistance beyond that since I can't reproduce your problem.

pvacseq.cwl.zip

zhangbaifeng commented 5 years ago

OK,thanks very much,susanna.

Best, Baifeng

On Tue, 30 Oct 2018 at 10:58 PM, Susanna Kiwala notifications@github.com wrote:

I attached the cwl file that worked on my machine. With this cwl I was able to get a succeeded run. Unfortunately, I'm unable to provide additional assistance beyond that since I can't reproduce your problem.

pvacseq.cwl.zip https://github.com/griffithlab/pVACtools/files/2530187/pvacseq.cwl.zip

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/griffithlab/pVACtools/issues/218#issuecomment-434334057, or mute the thread https://github.com/notifications/unsubscribe-auth/AM7G2pD5d_e2xDSrr45sUWajPCY7nvWwks5uqGkKgaJpZM4X9RR1 .