Skip to content

Conversation

mdziurzynski
Copy link

Unlike with metabolites or reactions, direct modification of Gene class id property may lead implicit gene duplications in the model. The user should be notified that there is a special, safe function designed just for that.

Im just not quite sure about the super(Gene, self.__class__).id.fset(self, new_id) syntax and will welcome any comments.

@Midnighter
Copy link
Member

I think that modifying the ID can cause so many issues that we should consider disallowing that.

Copy link
Member

@cdiener cdiener left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late review. Might need a rebase to the latest version and an entry in the release notes. Thx

"Use cobra.manipulation.modify.rename_genes to safely rename genes.",
UserWarning
)
super(Gene, self.__class__).id.fset(self, new_id)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As Moritz said, better not even set it but throw an error with the same message instead of a warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants