psathyrella / partis

B- and T-cell receptor sequence annotation, simulation, clonal family and germline inference, and affinity prediction
GNU General Public License v3.0
54 stars 34 forks source link

Run error: yaml is needed, manually installed, keeps failing #253

Closed mihuber closed 6 years ago

mihuber commented 6 years ago

Hi. Thanks for making parts available. We ran into an error we cannot solve. First, it failed with a missing import, yaml module not found. We installed it from https://github.com/yaml/pyyaml but without C bindings, as we failed to install https://github.com/yaml/libyaml.

Then, we tried

/tmp/partis/bin/partis annotate --infname small.fasta --outfname ./IgG1_annotate.csv

where the fasta file is

>123_reads-IGHV3-23_IGHJ6_19_tcaattctaagggttcatcac_378
GAGGTGCAGCTGTTGGAGTCTGGGGGAGGCTTGGTACAGCCTGGGGGGTCCCTGAGACTC
TCCTGTGCAGCCTCTGGATTCACCTTTAGCAACTATGCCATGAGCTGGGTCCGCCAGGCT
CCAGGGAAGGGGCTGGAGTGGGTCTCAACTATTAGTGGTGGTGGTGCTACCACATACTAC
GCAGACTCCGTGAAGGGCCGCTTCACCATCTCCAGAGACAATTCCAAGAACACGGTGTAT
GTGCAAATGAGCAGCCTGAGAGCCGAGGACACGGCCGTATATTACTGTGCGAAAGTCGGG
GACCCAGATTACTATGATTACTACTCTTACTACCTTATGGACGTCTGGGGCCAAGGGACC
ACGGTCACCGTCTCCTCA

It failed with dozens of error messages. The content of /tmp/mihuber/hmms/598867/erris

ERROR invalid model header info in /rv_home/mihuber/_output/small/sw/hmms/IGHV3-23_star_01.yaml
terminate called after throwing an instance of 'YAML::TypedBadConversion<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >'
  what():  bad conversion

Any idea on how to solve this?

@ozagordi

psathyrella commented 6 years ago

hmm, it looks like the pyyaml line was removed as part of the switch to a conda Dockerfile. Which has been working for people, but that could be system dependent (what are you on? rhel? ubuntu? version?). All the same I'll loop in @matsen to see if it was removed on purpose.

As a stopgap, you could install pyyaml with pip from inside the conda env, i.e. the same way as colored-traceback is installed:

source activate partis
pip install pyyaml

As far as the rest, yaml is successfully throwing an error from within ham's c++, but that's a different yaml install than the python one. In either case, I'd have to see the yaml file that it's claiming has bad header info to guess what's wrong, but it seems exceedingly likely that fixing the pyyaml install will resolve things.

ozagordi commented 6 years ago

Hi. I tried this and it worked, but I had to wrestle with the different pyyaml and msgpack version. So, if I correctly reconstruct what I did, one has to install msgpack-python first, and not msgpack (which is a newer version which pyyaml wouldn't support). So

pip install msgpack-python
pip install pyyaml

If pyaml and/or msgpack are already installed, it would be wise to uninstall them and try in the order above.

psathyrella commented 6 years ago

ok cool thanks for the details. I'm working out how to combine the various install changes, then I'll update.

What OS + version are you on?

ozagordi commented 6 years ago

Ubuntu 16.04

-- Sent from a mobile device. Please excuse any typos.

psathyrella commented 6 years ago

I'm putting more detail in the other issue, but in short, yes the pyyaml install was removed by accident. It seems to not be necessary when inside docker, and I wish I could figure out who was installing it as a dep, but oh well. It could have to do with the order that you do the conda installs, which the dockerfile enforces. I put it back in the docker file. Also, sorry, it was dumb to tell you to install by hand ^ with pip, the version problems were almost certainly because I should've said to use conda.