Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merging strands should keep at least one existing name #681

Closed
dave-doty opened this issue Nov 19, 2021 · 2 comments
Closed

merging strands should keep at least one existing name #681

dave-doty opened this issue Nov 19, 2021 · 2 comments
Assignees
Labels
bug Something isn't working closed in dev Indicates issue is closed in the dev branch, available at: https://scadnano.org/dev/ high priority Something cruicial to get working soon.

Comments

@dave-doty
Copy link
Member

If two strands are merged by adding a crossover or ligating, then at least one of the two strand names should be preserved. If exactly one strand has a name, that should be the name of the new strand.

However currently if exactly one strand has a name, it is erased when merging the strands.

@dave-doty dave-doty added the bug Something isn't working label Nov 19, 2021
@dave-doty
Copy link
Member Author

dave-doty commented Dec 9, 2021

More generally, we have the following precedence:

If a property is nullable/optional (e.g., name), then if one strand has the property and the other doesn't, then assign the property from the strand that had it as non-null.

If one strand is a scaffold and the other is not. In that case, no matter which was clicked first, take the properties from the scaffold.

If both strands have the property, then take the new property value from the strand that was clicked (in the case of ligate) or clicked first (in the case of creating a crossover). This means join_two_strands_with_substrands should be re-written to take a Boolean as a paramter properties_from_strand1 indicating whether to take the new properties from strand1 or from strand2.

@dave-doty
Copy link
Member Author

dave-doty commented Dec 9, 2021

Also re-write nick reducer and delete crossover/loopout/domain reducer to take properties from original strand (e.g., new names are same as name of strand before).

@dave-doty dave-doty added the high priority Something cruicial to get working soon. label Jan 21, 2022
rishabhmudradi added a commit that referenced this issue Feb 5, 2022
…g-strands-should-keep-at-least-one-existing-name

#681 merging strands should keep at least one existing name
@rishabhmudradi rishabhmudradi added the closed in dev Indicates issue is closed in the dev branch, available at: https://scadnano.org/dev/ label Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working closed in dev Indicates issue is closed in the dev branch, available at: https://scadnano.org/dev/ high priority Something cruicial to get working soon.
Projects
None yet
Development

No branches or pull requests

4 participants