MakeDb doesn't check for the existence of valid repo input files

Issue #81 resolved
Jason Vander Heiden created an issue

From Lepennetier:

Using the MakeDb.py, I guet the following error:

Traceback (most recent call last):
  File "/usr/local/bin/MakeDb.py", line 1398, in <module>
    args.func(**args_dict)
  File "/usr/local/bin/MakeDb.py", line 1091, in parseIgBlast
    repo_dict = getRepo(repo)
  File "/usr/local/lib/python3.5/dist-packages/changeo/IO.py", line 46, in getRepo
    sys.exit('ERROR: No valid germline fasta files were found in %s', repo)
TypeError: exit expected at most 1 arguments, got 2

The getRepo function expect a file with .fasta extension, and apparently crashes otherwise, even if the files are well-formated and valid germline.

I thought it deserved to share, so a little warning like "files must have .fasta extension" may be a good idea for the doc.

-r REPO [REPO ...] List of folders and/or fasta files containing IMGT- gapped germline sequences corresponding to the set of germlines used in the IgBLAST alignment. (default: None)

Comments

Doc changes were made in 7751ac8, but I think this is actually a bug. We should check for valid input files and exit cleanly with an informative message if they aren't found, probably by checking for valid arguments before calling the main parsing functions in MakeDb.

Comments (2)

  1. Log in to comment