cadnano2 icon indicating copy to clipboard operation
cadnano2 copied to clipboard

Trouble using honeycomb lattice in cadnano2 using linux terminal

Open nikitan24 opened this issue 2 years ago • 6 comments

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)

nikitan24 avatar Jul 31 '23 09:07 nikitan24

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.

sdouglas avatar Aug 03 '23 11:08 sdouglas

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.

nikitan24 avatar Aug 03 '23 11:08 nikitan24

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?

sdouglas avatar Aug 03 '23 12:08 sdouglas

Ok sure will try tracking that. Yes, I am using the latest version of PyQt6, 6.5.2

nikitan24 avatar Aug 03 '23 12:08 nikitan24

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.

sdouglas avatar Aug 03 '23 12:08 sdouglas

Will surely try both of these options. Thank you very much.

nikitan24 avatar Aug 03 '23 12:08 nikitan24