Skip to content

Add additional functionality for alignment compare script!#1

Open
emmahodcroft wants to merge 7 commits intomainfrom
improve-align-compare
Open

Add additional functionality for alignment compare script!#1
emmahodcroft wants to merge 7 commits intomainfrom
improve-align-compare

Conversation

@emmahodcroft
Copy link

@emmahodcroft emmahodcroft commented Mar 10, 2025

Building on the initial great script to compare alignments, I've added some additional functionality to make it more flexible and generalizable!

@kstrotjohann you should check it still works on your data appropriately before it gets merged!

In the long-term we may want to break scripts like this into another repo so they can be easily found and re-used 😁

Changes:

  • added an argument to reduce printing messages unless --verbose is specified
  • Rectified a FutureWarning
  • Change font to matplotlib default so it should work on any system (turns out I don't have Arial! 🤔 )
  • Generalize plotting so it works with any number of alignments being compared (colours, columns, names)
  • Added an argument (--cds-coords) so one can give the start-end of the coding region and just compare these (allows one to not have to trim sequences to the coding region beforehand!)

Tests run:

  • I ran on two alignments (EV-D68) after each change to ensure code runs and answers are reasonable sensible
  • However I did not check to see if the counts etc are valid (ex: counting stop muts myself and comparing to the code) as in theory none of the changes I made should impact this -- hoping that Keno can check against his original runs 😁

@emmahodcroft
Copy link
Author

Added one more change - changed the sum-of-pairs plot to be a scatterplot with variable-Y-axis rather than a bar chart. The numbers are very large and can be sometimes different, sometimes very similar, this helps to allow that adjustment a bit better.

Not exactly the same plot, but an example of before and after.
Before:
image

After:
image

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.

1 participant