nmdp-bioinformatics / gfe-db

Graph database representing IPD-IMGT/HLA sequence data as GFE
https://gfe-db.readthedocs.io
GNU General Public License v3.0
9 stars 15 forks source link

Fix failure when `limit=''` #76

Closed pbashyal-nmdp closed 1 year ago

pbashyal-nmdp commented 1 year ago

For input:

{
  "ALIGN": "False",
  "KIR": "False",
  "LIMIT": "",
  "MEM_PROFILE": "False",
  "RELEASES": "3350"
}

Was failing with:

usage: app.py [-h] -o OUT_DIR [-r RELEASE] [-k] [-a] [-p] [-v] [-l [LIMIT]]
app.py: error: argument -l/--limit: invalid int value: ''

The calling script now calls with "$LIMIT", so "" is set for blank limit. Fix was to cast to int only when a value exists.