griffithlab / pVACtools

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

ImportError: No module named mhcnuggets.src.predict && subprocess.CalledProcessError returned non-zero exit status 1 #386

Closed qindan2008 closed 5 years ago

qindan2008 commented 5 years ago

Describe the bug

Executing MHC Class I predictions Converting .vcf to TSV Completed Splitting TSV into smaller chunks Splitting TSV into smaller chunks - Entries 1-24 Completed Generating Variant Peptide FASTA and Key Files Generating Variant Peptide FASTA and Key Files - Entries 1-48 Completed Making binding predictions on Allele HLA-A02:01 and Epitope Length 8 with Method MHCnuggetsI - File /DataProcess/Project/neoepiscope/test/MHC_Class_I/tmp/H_NJ-HCC1395-HCC1395.MHCnuggetsI.HLA-A02:01.8.tsv_1-48 Traceback (most recent call last): File "/usr/local/lib/python3.5/site-packages/pvactools-1.3.7-py3.5.egg/lib/call_mhcnuggets.py", line 14, in raise err ImportError: No module named mhcnuggets.src.predict An exception occured in thread 0: (<class 'subprocess.CalledProcessError'>, Command '['python', '/usr/local/lib/python3.5/site-packages/pvactools-1.3.7-py3.5.egg/lib/call_mhcnuggets.py', '/DataProcess/Project/neoepiscope/test/MHC_Class_I/tmp/H_NJ-HCC1395-HCC1395_21.fa.split_1-48', 'HLA-A02:01', '8', 'I', '/tmp/tmpmzq31xj8']' returned non-zero exit status 1). Traceback (most recent call last): File "/usr/local/lib/python3.5/site-packages/pvactools-1.3.7-py3.5.egg/lib/pipeline.py", line 335, in call_iedb lib.call_iedb.main(arguments) File "/usr/local/lib/python3.5/site-packages/pvactools-1.3.7-py3.5.egg/lib/call_iedb.py", line 48, in main (response_text, output_mode) = prediction_class_object.predict(args.input_file, args.allele, args.epitope_length, args.iedb_executable_path, args.iedb_retries) File "/usr/local/lib/python3.5/site-packages/pvactools-1.3.7-py3.5.egg/lib/prediction_class.py", line 269, in predict return MHCnuggets.predict(self, input_file, allele, epitope_length, iedb_executable_path, iedb_retries, 'I') File "/usr/local/lib/python3.5/site-packages/pvactools-1.3.7-py3.5.egg/lib/prediction_class.py", line 103, in predict response = run(arguments, check=True) File "/usr/local/lib/python3.5/subprocess.py", line 398, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['python', '/usr/local/lib/python3.5/site-packages/pvactools-1.3.7-py3.5.egg/lib/call_mhcnuggets.py', '/DataProcess/Project/neoepiscope/test/MHC_Class_I/tmp/H_NJ-HCC1395-HCC1395_21.fa.split_1-48', 'HLA-A02:01', '8', 'I', '/tmp/tmpmzq31xj8']' returned non-zero exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/bin/pvacseq", line 11, in load_entry_point('pvactools==1.3.7', 'console_scripts', 'pvacseq')() File "/usr/local/lib/python3.5/site-packages/pvactools-1.3.7-py3.5.egg/tools/pvacseq/main.py", line 92, in main args[0].func.main(args[1]) File "/usr/local/lib/python3.5/site-packages/pvactools-1.3.7-py3.5.egg/tools/pvacseq/run.py", line 163, in main pipeline.execute() File "/usr/local/lib/python3.5/site-packages/pvactools-1.3.7-py3.5.egg/lib/pipeline.py", line 426, in execute self.call_iedb(chunks) File "/usr/local/lib/python3.5/site-packages/pvactools-1.3.7-py3.5.egg/lib/pipeline.py", line 336, in call_iedb p.print("Making binding predictions on Allele %s and Epitope Length %s with Method %s - File %s - Completed" % (a, epl, method, filename)) File "/usr/local/lib/python3.5/site-packages/pymp/init.py", line 148, in exit raise exc_t(exc_val) TypeError: init() missing 1 required positional argument: 'cmd'

To Reproduce

pvacseq run \
/DataProcess/software/pVACtools-master/tests/test_data/pvacseq/input.vcf H_NJ-HCC1395-HCC1395 \ HLA-A*02:01,HLA-B*35:01,DRB1*11:01 \ MHCnuggetsI MHCnuggetsII NNalign NetMHC PickPocket SMM SMMPMBEC SMMalign \ ./test \ -e 8,9,10

Log Output

additional_report_columns: null
allele_specific_binding_thresholds: false
alleles:
- HLA-A*02:01
- HLA-B*35:01
binding_threshold: 500
downstream_sequence_length: 1000
epitope_lengths:
- 8
- 9
- 10
exclude_NAs: false
expn_val: 1.0
fasta_size: 200
iedb_executable: null
iedb_retries: 5
input_file: /DataProcess/software/pVACtools-master/tests/test_data/pvacseq/input.vcf
input_file_type: vcf
keep_tmp_files: false
maximum_transcript_support_level: 1
minimum_fold_change: 0.0
n_threads: 1
net_chop_method: null
net_chop_threshold: 0.5
netmhc_stab: false
normal_cov: 5
normal_sample_name: null
normal_vaf: 0.02
output_dir: /DataProcess/Project/neoepiscope/test/MHC_Class_I
pass_only: false
peptide_sequence_length: 21
phased_proximal_variants_vcf: null
prediction_algorithms:
- MHCnuggetsI
- NetMHC
- PickPocket
- SMM
- SMMPMBEC
proximal_variants_file: null
pvactools_version: 1.3.7
sample_name: H_NJ-HCC1395-HCC1395
spacers: null
tdna_cov: 10
tdna_vaf: 0.25
tmp_dir: /DataProcess/Project/neoepiscope/test/MHC_Class_I/tmp
top_score_metric: median
trna_cov: 10
trna_vaf: 0.25

Output File the output file named "MHC_Class_I/H_NJ-HCC1395-HCC1395.tsv" has 25 lines, just paste the first 3 lines below

chromosome_name start stop reference variant gene_name transcript_name transcript_support_level amino_acid_change codon_change ensembl_gene_id hgvsc hgvsp wildtype_amino_acid_sequence downstream_amino_acid_sequence fusion_amino_acid_sequence variant_type protein_position transcript_expression gene_expression normal_depth normal_vaf tdna_depth tdna_vaf trna_depth trna_vaf index protein_length_change 2 217498305 217498305 T TGCTGCC IGFBP2 ENST00000233809 NA L/LLP ctg/ctGCTGCCg ENSG00000115457 ENST00000233809.4:c.59_60insGCTGCC ENSP00000233809.4:p.Leu20_Leu21insLeuPro MLPRVGCPALPLPPPPLLPLLLLLLGASGGGGGARAEVLFRCPPCTPERLAACGPPPVAPPAAVAAVAGGARMPCAELVREPGCGCCSVCARLEGEACGVYTPRCGQGLRCYPHPGSELPLQALVMGEGTCEKRRDAEYGASPEQVADNGDDHSEGGLVENHVDSTMNMLGGGGSAGRKPLKSGMKELAVFREKVTEQHRQMGKGGKHHLGLEEPKKLRPPPARTPCQQELDQVLERISTMRLPDERGPLEHLYSLHIPNCDKHGLYNLKQCKMSLNGQRGECWCVNPNTGKLIQGAPTIRGDPECHLFYNEQQEARGVHTQRMQ inframe_ins 20 NA NA NA NA 101 0.8910891089108911 NA NA 1.IGFBP2.ENST00000233809.inframe_ins.20L/LLP 4 40434704 40434725 AGCGGCTGCGGCGGCTGCGGCC A RBM47 ENST00000381793 NA AAAAAAAA/A gcGGCCGCAGCCGCCGCAGCCGCt/gct ENSG00000163694 ENST00000381793.2:c.1485_1505delGGCCGCAGCCGCCGCAGCCGC ENSP00000371212.2:p.Ala496_Ala502del MTAEDSTAAMSSDSAAGSSAKVPEGVAGAPNEAALLALMERTGYSMVQENGQRKYGGPPPGWEGPHPQRGCEVFVGKIPRDVYEDELVPVFEAVGRIYELRLMMDFDGKNRGYAFVMYCHKHEAKRAVRELNNYEIRPGRLLGVCCSVDNCRLFIGGIPKMKKREEILEEIAKVTEGVLDVIVYASAADKMKNRGFAFVEYESHRAAAMARRKLMPGRIQLWGHQIAVDWAEPEIDVDEDVMETVKILYVRNLMIETTEDTIKKSFGQFNPGCVERVKKIRDYAFVHFTSREDAVHAMNNLNGTELEGSCLEVTLAKPVDKEQYSRYQKAARGGGAAEAAQQPSYVYSCDPYTLAYYGYPYNALIGPNRDYFVKAGSIRGRGRGAAGNRAPGPRGSYLGGYSAGRGIYSRYHEGKGKQQEKGYELVPNLEIPTVNPVAIKPGTVAIPAIGAQYSMFPAAPAPKMIEDGKIHTVEHMISPIAVQPDPASAAAAAAAAAAAAAAVIPTVSTPPPFQGRPITPVYTVAPNVQRIPTAGIYGASYVPFAAPATATIATLQKNAAAAAAMYGGYAGYIPQAFPAAAIQVPIPDVYQTYinframe_del 495-502 NA NA NA NA 128 0.9765625 NA NA 2.RBM47.ENST00000381793.inframe_del.495-502AAAAAAAA/A

input_output.zip

another output file named "MHC_Class_I/H_NJ-HCC1395-HCC1395.tsv_1-24" seems the same with "MHC_Class_I/H_NJ-HCC1395-HCC1395.tsv" Expected behavior A clear and concise description of what you expected to happen.

qindan2008 commented 5 years ago

When I removed "MHCnuggetsI" and "MHCnuggetsII" from the above "pvacseq run" command, and just run the pipeline with :

pvacseq run \ /DataProcess/software/pVACtools-master/tests/test_data/pvacseq/input.vcf H_NJ-HCC1395-HCC1395 HLA-A02:01,HLA-B35:01,DRB1*11:01 NNalign NetMHC PickPocket SMM SMMPMBEC SMMalign ./test -e 8,9,10

It finished successfully without any errors, and output 3 directories:combined,MHC_Class_I,MHC_Class_II. All of the results seemed right.

So, it seems that there is something wrong with MHCnuggets packages. In addition,if pvacseq run with "MHCnuggetsI" or "MHCnuggetsII" , error occurred "ImportError: No module named mhcnuggets.src.predict" . However, when I checked the mhcnuggets package with " pip3.5 show mhcnuggets " , it returned:
Name: mhcnuggets Version: 2.2 Summary: MHCnuggets: Neoantigen peptide MHC binding prediction for class I and II Home-page: http://karchinlab.org/apps/mhcnuggets.html Author: Rohit Bhattacharya Author-email: rohit.bhattachar@gmail.com License: Apache License Location: /usr/local/lib/python3.5/site-packages Requires: numpy, scipy, scikit-learn, tensorflow, keras

It seemed the mhcnuggets package have been installed successfully.

susannasiebert commented 5 years ago

It seems that you have both python 3 and python 2 installed in parallel. This is probably the issue. MHCnuggets gets called via a script, which I assume gets called with your default python (python 2.7.15) but MHCnuggets is installed under python3. This is why we recommend using an environment manager like conda to keep python 2 and python 3 separate. Alternatively, you can use our Docker container which is available using the griffithlab:pvactools tag.

qindan2008 commented 5 years ago

OK, Thank you.