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

Remove class SingletonFamily and MF attribute id #192

Merged
merged 6 commits into from
Dec 19, 2023

Conversation

CunliangGeng
Copy link
Member

@CunliangGeng CunliangGeng commented Nov 27, 2023

Singleton molecular families can be well represented with the class MolecularFamily, and it's not needed to keep a specific class SingletonFamily for them, so this PR removed it.

As for the family id, the class SingleFamily automatically set it (i.e."singleton-" + uuid), while the class MolecularFamily requires users to provide the family id during initiation. It makes more sense to let users or loaders of molecular family to decide how to set family id. So in the GNPSMolecularFamilyLoader class, the name of singleton MF was updated to "singleton-" + spectrum_id.

The attribute id of MolecularFamily is unused by anywhere, so it's removed too.

@CunliangGeng CunliangGeng force-pushed the 11-27-filter_singleton_MFs branch from 66dd7ac to 79ec809 Compare December 14, 2023 08:33
@CunliangGeng CunliangGeng force-pushed the 11-27-remove_SingletonFamily_and_id branch from 5ad51fe to a0d5ea7 Compare December 14, 2023 08:33
@CunliangGeng CunliangGeng force-pushed the 11-27-filter_singleton_MFs branch from 79ec809 to 7894c6d Compare December 19, 2023 13:21
@CunliangGeng CunliangGeng force-pushed the 11-27-remove_SingletonFamily_and_id branch from fa32a02 to fc2f8d5 Compare December 19, 2023 13:21
Copy link
Member Author

CunliangGeng commented Dec 19, 2023

Merge activity

@CunliangGeng CunliangGeng force-pushed the 11-27-filter_singleton_MFs branch from 7894c6d to efe2148 Compare December 19, 2023 13:25
Base automatically changed from 11-27-filter_singleton_MFs to dev December 19, 2023 13:26
CunliangGeng and others added 6 commits December 19, 2023 13:27
Class MolecularFamily can be used to represent singleton molecular family.
We let the loaders like `GNPSMolecularFamilyLoader` to decide how to assign family id to singleton MFs.
Co-authored-by: Giulia Crocioni <55382553+gcroci2@users.noreply.github.com>
Co-authored-by: Giulia Crocioni <55382553+gcroci2@users.noreply.github.com>
@CunliangGeng CunliangGeng force-pushed the 11-27-remove_SingletonFamily_and_id branch from fc2f8d5 to 70a61b5 Compare December 19, 2023 13:27
@CunliangGeng CunliangGeng merged commit 30f157a into dev Dec 19, 2023
1 check failed
@CunliangGeng CunliangGeng deleted the 11-27-remove_SingletonFamily_and_id branch December 19, 2023 13:28
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.

2 participants