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

Expand MAC doesn't expand XX codes #345

Open
lgragert opened this issue Feb 16, 2025 · 7 comments
Open

Expand MAC doesn't expand XX codes #345

lgragert opened this issue Feb 16, 2025 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@lgragert
Copy link

XX codes are not considered valid MACs.

Should they be?

pyard --expand-mac "B*15:XX"
B*15:XX is an invalid MAC.

pyard --expand-mac "B*15:AB"
B*15:01/B*15:02
@lgragert
Copy link
Author

Users of the NMDP MAC Service UI will find that it expands XX codes, so they might be confused that this function does not. I suppose we need the error message to point them at this page so they understand that XX codes are not MAC codes? https://glstring.org/xxcodes.html

@pbashyal-nmdp
Copy link
Contributor

I'd think an equivalent expansion would be:

pyard --gl "B*15:XX" -r "P"

It's probably be a good idea to mention that XX codes are not MAC codes.

@pbashyal-nmdp pbashyal-nmdp self-assigned this Feb 17, 2025
@pbashyal-nmdp pbashyal-nmdp added the enhancement New feature or request label Feb 17, 2025
@lgragert
Copy link
Author

Hmmmm... what features does --expand-mac have that --gl does not?

@pbashyal-nmdp
Copy link
Contributor

pbashyal-nmdp commented Feb 17, 2025

--expand-mac just expands the MAC and validates each of the expansion makes sense.

--gl is paired with -r to reduce to certain level.
e.g.

pyard --gl "B*15:XX" -r "G"

@lgragert
Copy link
Author

Is --expand-mac precisely equivalent to --gl -r "U2" then, or does it differ in some way?

@pbashyal-nmdp
Copy link
Contributor

--expand-mac doesn't involve reduction.

e.g. AB MAC is defined as:

code  alleles
----  -------
AB    01/02

When you --expand-mac the MAC C*04:AB. It expands to C*04:01 and C*04:02 but only C*04:01 is a valid C allele. So it returns that as the expansion.

❯ pyard --expand-mac "C*04:AB"
C*04:01

versus A*04:AB

 pyard --expand-mac "A*04:AB"

produces no result because both expansion A*04:01 and A*04:02 are not valid alleles.

@lgragert
Copy link
Author

Got it, so --expand-mac is like --gl -r "U2" except the latter will remove invalid alleles for a particular DB version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants