Hi all,
I'm getting a problem running the LHOC angle script in the antibody modeling protocol. To reproduce:
python -m pdb ../rosetta/main/source/scripts/python/public/plot_VL_VH_orientational_coordinates/plot_LHOC.py -h3_fasc H3_modeling_scores.fasc -graft_dir grafting -output_dir vhvl
I have uploaded the H3_modeling_scores.fasc file and the contents of the grafting directory. Here is the error message:
Traceback (most recent call last):
File "../rosetta/main/source/scripts/python/public/plot_VL_VH_orientational_coordinates/plot_LHOC.py", line 120, in <module>
score_file = ScoreFile(i, infiles, outpath, names).plot_for_all_coordinates(tempfiles, angles_file)
File "/cluster/ziheng/rosetta/main/source/scripts/python/public/plot_VL_VH_orientational_coordinates/ScoreFile.py", line 68, in plot_for_all_coordinates
self.plot_hist_and_top_x(coord, tempfiles, angles_file)
File "/cluster/ziheng/rosetta/main/source/scripts/python/public/plot_VL_VH_orientational_coordinates/ScoreFile.py", line 129, in plot_hist_and_top_x
color = color_dict[decoy.template_no]
KeyError: 48
The relevant files are on here:
https://drive.google.com/open?id=1-HxJrvePkJU19p70RPem72LvhVndPE57
When I ran it through thedebugger it seems that all the decoys have template_no 48, whereas the color_dict's keys is only 0-12 or something.
Thanks for the help,
Ziheng Wang
Solved this problem. Just need to convert the numpy byte string to python string first
I have the same problem. How to convert the byte to string? Could you provide more details? Thank you!
@Ziheng, the templates shouldn't all be the same unless all your tempates were really bad except one of them. The reason you are seeing 48 is probably the error/bug (Rosetta team please comment here) in the output of H3_modeling_scores.fasc which I was able to see with the first snippet below. You would have seen this if you took a few minutes to inspect the output file. As you can see in the description there are numbers prefixing some of the description fields but not all of them. In the next snippet you see that the color_dict in constants.py only goes up to '9' for the 10th color because there are only 10 models. So no you don't convert to a numpy byte array. You fiile a bug report to Rosetta for prefixing the "model" under description column with numbers (not sure if this is an mpi issue maybe). Why? Because to get the model, inside ScoreFile.py (third snippet) the template number is defined by the 7 character decoy_array[name][6] , i.e. the single digit character after "model-" which therefore can only be 0-9. So if say row 6 in the first snippet had one of the 10 lowest models, LHOC would bomb because the 7th character is an "l" the character before the hypen because it is prefixed with a '48'. I found this problem because my lowest scores actually had single digits prefixing "model" (fourth snippet) and so it bombs because the 7th charater is the hypen which is not an index of the color_dict. So let's file a bug report for the description column having number prefixes before "model" in the H3_modeling_scores.fasc file.
## should only see these model-* numbers 0-9 (NOT 0-12 as indicated in the post):