Skip to content

1.0.5 Non strict mode

Choose a tag to compare

@pbashyal-nmdp pbashyal-nmdp released this 04 Oct 14:58
· 185 commits to master since this release
b26c187

Supports non-strict mode makes valid alleles by adding expression characters to invalid alleles.

Use non strict mode in config to reduce alleles that may be valid with expression characters.

>>> my_configs = {'strict': False, 'verbose_log': True}
>>> import pyard
>>> ard = pyard.init(config=my_configs, load_mac=False)

>>> ard.redux('A*24:329', 'lgx')
A*24:329 is not valid. Using A*24:329Q
'A*24:329Q'

>>> ard.redux('DQB1*03:276', 'lgx')
DQB1*03:276 is not valid. Using DQB1*03:276N
'DQB1*03:01'

Add non-strict and verbose modes to pyard CLI.

❯ pyard --gl "DQB1*03:276" -r lgx
Typing Error: DQB1*03:276 is not valid GL String.
 DQB1*03:276 is not a valid Allele

❯ pyard --non-strict --gl "DQB1*03:276" -r lgx
DQB1*03:01

❯ pyard --non-strict --verbose --gl "DQB1*03:276" -r lgx
DQB1*03:276 is not valid. Using DQB1*03:276N
DQB1*03:01