Closed ErikPoppleton closed 5 years ago
Hey Erik,
thanks for pointing this out. The problem seems to be caused by the fact that some of the bases in the json fil lacks the "type" field. How do you handle this case in your script? Do you use a default value? See for example base n. 589.
cheers, Lorenzo
In our version I handle this by having "N" as the default value. oxDNA still does not like this and so it requires further manual modification of the text file, but it does export. Perhaps we should put a number in there so oxDNA accepts it as an input, but the viewer shows them as distinctly different (they're given a random color in a different material).
I have added a new option to the script (-d/--default-base) so that the user can choose the default base type. It can be either A, C, G, T, R or an integer value. R means that the base type is chosen randomly (which is the default).
This file was not able to be exported with the tacoxDNA Tiamat converter (file extension changed from .dnajson to .txt to allow it to be uploaded). It worked when I used the converter on the Sulcgroup github on it. Further investigation makes me suspect that you are a commit behind and don't have the code that handles unassigned bases in the Tiamat file. Would you like me to fix it and submit a pull request?
design4E.txt
Error log:
Assuming DNA## Assuming Tiamat version 2
Traceback (most recent call last): File "/home/tacoxdna/git/tacoxDNA/src/Tiamat_oxDNA.py", line 379, in strands = split_bases_to_strands(bases) File "/home/tacoxdna/git/tacoxDNA/src/Tiamat_oxDNA.py", line 126, in split_bases_to_strands strand = Strand(idx, base_lst, local_id) File "/home/tacoxdna/git/tacoxDNA/src/Tiamat_oxDNA.py", line 58, in init enumerate(base_info_lst, local_id_strart)] File "/home/tacoxdna/git/tacoxDNA/src/Tiamat_oxDNA.py", line 19, in init self.val = base_info['type'][0]
KeyError: 'type'Some errors have been detected, output not generated