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

Add table display for link graph #276

Merged
merged 1 commit into from
Sep 17, 2024
Merged

Add table display for link graph #276

merged 1 commit into from
Sep 17, 2024

Conversation

CunliangGeng
Copy link
Member

@CunliangGeng CunliangGeng commented Sep 16, 2024

Dora found it confused to handle LinkGraph data. To make it easier, a table display was added, so that user can display the LinkGraph as a table, e.g.

  >>> lg = LinkGraph()

  
Display the empty LinkGraph object:
  >>> lg
  |    |   Object 1 |   Object 2 |   Metcalf Score |   Rosetta Score |
  |----|------------|------------|-----------------|-----------------|


  Add a link between a GCF and a Spectrum object:
  >>> lg.add_link(gcf, spectrum, metcalf=Score("metcalf", 1.0, {"cutoff": 0.5}))


  Display all links in LinkGraph object:
  >>> lg
  |    |     Object 1 |               Object 2 |   Metcalf Score |   Rosetta Score |
  |----|--------------|------------------------|-----------------|-----------------|
  |  1 | GCF(id=gcf1) | Spectrum(id=spectrum1) |               1 |               - |

Copy link
Member Author

CunliangGeng commented Sep 16, 2024

Copy link
Contributor

@gcroci2 gcroci2 left a comment

Choose a reason for hiding this comment

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

Very nice! I also think this is very useful for users.

As in #275 and #277, tests are failing due to an error with antiSMASH.

Copy link
Member Author

CunliangGeng commented Sep 17, 2024

Merge activity

  • Sep 17, 8:12 AM EDT: @CunliangGeng started a stack merge that includes this pull request via Graphite.
  • Sep 17, 8:14 AM EDT: Graphite rebased this pull request as part of a merge.
  • Sep 17, 8:15 AM EDT: @CunliangGeng merged this pull request with Graphite.

@CunliangGeng CunliangGeng changed the base branch from fix_gnps_quantification_folder to graphite-base/276 September 17, 2024 12:12
@CunliangGeng CunliangGeng changed the base branch from graphite-base/276 to dev September 17, 2024 12:12
@CunliangGeng CunliangGeng merged commit acf1cf8 into dev Sep 17, 2024
1 of 4 checks passed
@CunliangGeng CunliangGeng deleted the add_print_links branch September 17, 2024 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants