Skip to content

Depicting deletions with plotsr - #100

Merged
lrauschning merged 6 commits into
schneebergerlab:masterfrom
ira-zibbu:depict_deletions
Jul 24, 2026
Merged

lrauschning merged 6 commits into
schneebergerlab:masterfrom
ira-zibbu:depict_deletions

Conversation

@ira-zibbu

Copy link
Copy Markdown
Contributor

Hi,

Long-time user of plotsr, and I enjoy the visualizations it generates. However one feature I have long wanted was to also depict deletions in the synteny plots with a dedicated ribbon. Here I have minimally update the code to enable this.

  • Please check if the PR fulfills these requirements
  • Is the commit message clear and explains what the PR does?
  • Is the PR tested?
  • Are tests for the changes available and added (for bug fixes / features)
  • If needed, docs have been added / updated (for bug fixes / features)
  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

This PR introduces the ability to depict deletions with a dedicated ribbon.

  • What is the current behavior? (You can also link to an open issue here)

Currently, deletions are not depicted in the synteny plots.

  • What is the new behavior (if this is a feature change)?

Deletion mutations (with the key 'DEL') are depicted with red ribbons. See the following example from two E. coli genomes:

image

  • Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

To the best of my knowledge this should not break the application. The provided test ran successfully.

  • Other information:

The main CLI in plotsr.py contains options to disable depicting certain kinds of mutations.

    filtering.add_argument('--nosyn', help='Do not plot syntenic regions', default=False, action='store_true')
    filtering.add_argument('--noinv', help='Do not plot inversions', default=False, action='store_true')
    filtering.add_argument('--notr', help='Do not plot translocations regions', default=False, action='store_true')
    filtering.add_argument('--nodup', help='Do not plot duplications regions', default=False, action='store_true')

I was unable to figure out how these options are used by the script to introduce flexibility in depictions. I propose than an option also be included for deletions, to allow the user to disable depicting deletions if that behaviour is not required.

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

Sorry for the long radio silence, Manish left the lab and plotsr maintenance has been a bit chaotic.
The changes look good, I'll look for a way to get the CLI thing working as well and then merge.

@lrauschning

Copy link
Copy Markdown
Contributor

Merging, CI on python 3.11 seems to be a bit broken

@lrauschning
lrauschning merged commit 494e246 into schneebergerlab:master Jul 24, 2026
3 of 4 checks passed
@lrauschning

Copy link
Copy Markdown
Contributor

Thanks for the improvement @ira-zibbu :)

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