Skip to content

Conversation

@pbashyal-nmdp
Copy link
Contributor

@pbashyal-nmdp pbashyal-nmdp commented Oct 3, 2023

  • 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

Closes #272
Fixes #266

Bump version: 1.0.4 → 1.0.5

pbashyal-nmdp and others added 3 commits October 3, 2023 12:12
* When running without a login, `os.getlogin()` fails. Switch to using `getuser()` from `getpass` module.

* Bump version: 1.0.3 → 1.0.4
    This commit was created by changelog-from-release in 'Post release' CI workflow
@pbashyal-nmdp pbashyal-nmdp added the enhancement New feature or request label Oct 3, 2023
@pbashyal-nmdp pbashyal-nmdp self-assigned this Oct 3, 2023
@pbashyal-nmdp pbashyal-nmdp changed the title Add strict flag Add non-strict mode Oct 3, 2023
```python
❯ scripts/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
❯ scripts/pyard --non-strict --gl "DQB1*03:276" -r lgx
DQB1*03:01
❯ scripts/pyard --non-strict --verbose --gl "DQB1*03:276" -r lgx
DQB1*03:276 is not valid. Using DQB1*03:276N
DQB1*03:01
```
Copy link
Contributor

@mmaiers-nmdp mmaiers-nmdp left a comment

Choose a reason for hiding this comment

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

yes

@mmaiers-nmdp mmaiers-nmdp merged commit b26c187 into nmdp-bioinformatics:master Oct 4, 2023
@pbashyal-nmdp pbashyal-nmdp deleted the add_strict_flag branch October 17, 2023 18:41
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

Successfully merging this pull request may close these issues.

Allow non strict mode pyard --validate fails for non-cwd options

2 participants