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

MixMHCpred not creating mixmhcpred_outputs.txt in tmp dir #149

Open
3 tasks done
zakimolvi opened this issue Apr 27, 2020 · 1 comment
Open
3 tasks done

MixMHCpred not creating mixmhcpred_outputs.txt in tmp dir #149

zakimolvi opened this issue Apr 27, 2020 · 1 comment

Comments

@zakimolvi
Copy link

I'm a big fan of using mhctools as a python wrapper for NetMHC. I am trying to use it now for MixMHCpred, but I am having the following issue:

Running the following code:

predictor = NetMHCpan(alleles=don_alleles)
predictor2 = MixMHCpred(alleles=don_alleles)
preds = predictor.predict_peptides(sample_peptides)
preds2 = predictor2.predict_peptides(sample_peptides)

Outputs:

File "/Users/zaki/PycharmProjects/HLA_ligands_ALSF/3-bindingPreds.py", line 50, in pan_mix_preds
    preds2 = predictor2.predict_peptides(sample_peptides)
  File "/opt/anaconda3/lib/python3.7/site-packages/mhctools/mixmhcpred.py", line 98, in predict_peptides
    results.extend(parse_mixmhcpred_results(output_file_path))
  File "/opt/anaconda3/lib/python3.7/site-packages/mhctools/mixmhcpred.py", line 116, in parse_mixmhcpred_results
    df = pd.read_csv(filename, comment="#", sep="\t")
  File "/opt/anaconda3/lib/python3.7/site-packages/pandas/io/parsers.py", line 676, in parser_f
    return _read(filepath_or_buffer, kwds)
  File "/opt/anaconda3/lib/python3.7/site-packages/pandas/io/parsers.py", line 448, in _read
    parser = TextFileReader(fp_or_buf, **kwds)
  File "/opt/anaconda3/lib/python3.7/site-packages/pandas/io/parsers.py", line 880, in __init__
    self._make_engine(self.engine)
  File "/opt/anaconda3/lib/python3.7/site-packages/pandas/io/parsers.py", line 1114, in _make_engine
    self._engine = CParserWrapper(self.f, **self.options)
  File "/opt/anaconda3/lib/python3.7/site-packages/pandas/io/parsers.py", line 1891, in __init__
    self._reader = parsers.TextReader(src, **kwds)
  File "pandas/_libs/parsers.pyx", line 374, in pandas._libs.parsers.TextReader.__cinit__
  File "pandas/_libs/parsers.pyx", line 674, in pandas._libs.parsers.TextReader._setup_parser_source
FileNotFoundError: [Errno 2] File 
/var/folders/d7/8tw42scd6pj3fh6j4mhyj6580000gn/T/mhctoolsl4e89xigmixmhcpred/mixmhcpred_outputs.txt does not exist: 
'/var/folders/d7/8tw42scd6pj3fh6j4mhyj6580000gn/T/mhctoolsl4e89xigmixmhcpred/mixmhcpred_outputs.txt'

The tmp dir in the traceback does exist and contains mixmhcpred_inputs.txt, but not mixmhcpred_outputs.txt. So it seems MixMHCpred is failing to write the outputs. What could cause this?

Other info:

  • MixMHCpred dir is in project PATH
  • MixMHCpred runs successfully from command line
  • predictor.predict_peptides (NetMHCpan) works fine (but predictor2.predict_peptides (MixMHCpred) does not)
@timodonnell
Copy link
Contributor

Not sure what's happening here - could you provide a small working example (with peptides etc) so I can try to reproduce? It would also be helpful to know the mixmhcpred version you have installed and confirm that running mixmhcpred manually yourself works.

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

2 participants