Trouble using honeycomb lattice in cadnano2 using linux terminal
Hello , I have trouble using cadnano2 in ubuntu where it shows the following error when clicking onto honeycomb lattice option.Although firstly it was fine.The error occured today.
Traceback (most recent call last): File "/home/nikita/virtualenvs/cn24x/lib/python3.10/site-packages/cadnano2/views/sliceview/slicerootitem.py", line 33, in partAddedSlot partItem = PartItem(modelPart, parent=self) File "/home/nikita/virtualenvs/cn24x/lib/python3.10/site-packages/cadnano2/views/sliceview/partitem.py", line 51, in init self._setLattice([], modelPart.generatorFullLattice()) File "/home/nikita/virtualenvs/cn24x/lib/python3.10/site-packages/cadnano2/model/parts/part.py", line 696, in generatorFullLattice return product(list(range(self._maxRow)), list(range(self._maxCol))) TypeError: 'str' object cannot be interpreted as an integer Aborted (core dumped)
This is peculiar. Did you happen to change the lattice size in the preferences? It’s complaining that the dimensions are stored as a string value but I am not sure why else it would change from the default int value.
Yes I happen to change some preferences in the lattice when following a tutorial but I after reset it to default preferences. The application version for linux mostly hangs when clicked on any icon after that setting I guess.Tried re-installing it but to no avail.
You might try deleting the QSettings preferences file that is generated by cadnano. The problem is that I don’t know where that’s stored in Linux, so you might have to track it down. Is this using the latest version of PyQt6, 6.5.2?
Ok sure will try tracking that. Yes, I am using the latest version of PyQt6, 6.5.2
The other thing if you’re comfortable modifying the source (see development instructions in the readme), is to explicitly cast those values as ints:
https://github.com/douglaslab/cadnano2/blob/17aa62910e376d08dc4e979edb928eb0f4ca61eb/cadnano2/model/parts/honeycombpart.py#L36
becomes
self._maxRow = int(kwargs.get('maxRow', app().prefs.honeycombRows))
and likewise for self._maxCol.
Will surely try both of these options. Thank you very much.