Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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.

src/nplinker/metabolomics/molecular_family.py Show resolved Hide resolved
@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
@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.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.