Skip to content

Conversation

@joverlee521
Copy link
Contributor

@joverlee521 joverlee521 commented Jul 9, 2025

Description of proposed changes

Add optional flags to support uses of the similar assign-colors script in mpox

Related issue(s)

Related to nextstrain/mpox#286

Checklist

  • Checks pass
  • If adding a script, add an entry for it in the README.

This is useful for ignoring categories in specific builds even if they share 
the same default ordering TSV.

Changes modified from mpox
<nextstrain/mpox@b6b793c>
Adding the option to support the force included color orderings in mpox
<nextstrain/mpox@f9221c0>
parser.add_argument('--ordering', type=str, required=True,
help="""Input TSV file defining the color ordering where the first
column is the field and the second column is the trait in that field.
column is the category and the second column is the trait in that category.
Copy link
Member

Choose a reason for hiding this comment

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

[sidebar] I always struggle to name these things, especially when they have a value attached. Category / trait / value seems pretty good.

Comment on lines +26 to +30
parser.add_argument('--ignore-categories', type=str, default=[], nargs='*',
help="""Do not create colors for these categories even if they are
included in the metadata and ordering TSV. This is useful for ignoring
categories in specific builds even if they share the same default
ordering TSV.""")
Copy link
Member

@jameshadfield jameshadfield Jul 9, 2025

Choose a reason for hiding this comment

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

[discussion] An alternative UI would be to have ordering TSVs for different categories and then allow multiple --ordering values. Thoughts? Do we plan on vendoring some big ordering list, or copy-paste across repos?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I suspect that there will be some overlap in ordering but not always. Even for division/location, the ordering may depend on where the pathogen is circulating? I'd think each pathogen would have it's own ordering TSV to support their own uses.

Comment on lines +31 to +35
parser.add_argument('--force-include-categories', type=str, default=[],nargs='*',
help="""Force include all color orderings for these categories even if
there are traits not included in the metadata TSV. This is useful for
creating colorings for traits not (yet) present in metadata to solve
bootstrapping issue.""")
Copy link
Member

Choose a reason for hiding this comment

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

I have no idea what a "bootstrapping issue" is. I suspect this is a valid use-case, but perhaps adjust the argument help text?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

To be honest, I'm not 100% sure what the bootstrapping issue is either, I was just trying to support the changes added in mpox from nextstrain/mpox@f9221c0.

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.

3 participants