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

feat: Allow custom color palettes for XString objects #123

Open
wants to merge 4 commits into
base: devel
Choose a base branch
from

Conversation

ahl27
Copy link
Collaborator

@ahl27 ahl27 commented Jan 2, 2025

Adds a collection of functions that allow users to specify new color palettes to display XString objects. This solves #115.

Slight refactor to move global variables into a package-specific environment to remove some <<- calls.

Also allows for users to specify colors for BString objects if they'd like, though the default is still no coloring.

Adds some additional unit tests and documentation pages.

I'm not sure I love the update_X_palette format for the function names...maybe updateDNApalette or update_DNA_COLORED_LETTERS would be better? Unsure.

Example usage is below.

DNA_palette <- list(
  A=list(fg="blue",bg="black"),
  T=list(fg="red",bg='black'),
  G=list(fg='green',bg='black'),
  C=list(fg='yellow',bg='black')
)
AA_palette <- list(
  A=list(fg="white", bg="purple"),
  B=list(fg=rgb(1,1,1), bg='orange')
)
B_palette <- list(
  A=list(bg='green'),
  B=list(bg="red"),
  C=list(bg='blue'),
  D=list(fg="orange"),
  E=list(fg="yellow")
)
Screenshot 2025-01-02 at 13 19 44

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