Preserve Loci between assemblies
giagitom opened this issue · comments
Hi,
I am trying to generate an Expression
from a Loci
and than use the expression
to make a selection
and create a new loci
based on a different structure
(having a different Biological Unit for example)
I'm doing this in the following way:
const expression = Loci.toExpression(BU1_loci)
const selection = Script.getStructureSelection(expression, BU2_structure);
const BU2_loci = StructureSelection.toLociWithSourceUnits(selection);
The problem is that BU2_loci is always empty.
Am I doing something wrong? Or there is a different way to achieve this?
That is generally not possible. There is no general way o achieve this. Depending on what you want to do you could only work with Script Expressions and only convert them to Locis when needed.
Thanks, I'll keep this in mind.