Skip to content

Add table display for link graph#276

Merged
CunliangGeng merged 1 commit into
devfrom
add_print_links
Sep 17, 2024
Merged

Add table display for link graph#276
CunliangGeng merged 1 commit into
devfrom
add_print_links

Conversation

@CunliangGeng

@CunliangGeng CunliangGeng commented Sep 16, 2024

Copy link
Copy Markdown
Member

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 |               - |

CunliangGeng commented Sep 16, 2024

Copy link
Copy Markdown
Member Author

@gcroci2 gcroci2 left a comment

Copy link
Copy Markdown
Contributor

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.

CunliangGeng commented Sep 17, 2024

Copy link
Copy Markdown
Member Author

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
@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