AuReMe / mpwt

Pathway Tools multiprocessing wrapper (for PathoLogic).
GNU Lesser General Public License v3.0
15 stars 0 forks source link

issue when there is an extra file in the input folder #80

Closed lcottret closed 1 year ago

lcottret commented 2 years ago

If there is a file that is not taxon_id.tsv in the input folder, mpwt will try to open it as a folder.

`mpwt -f outfiles/pathologicInputs/ --patho

Traceback (most recent call last): File "/home/lcottret/.local/bin/mpwt", line 8, in sys.exit(run_mpwt()) File "/home/lcottret/.local/lib/python3.8/site-packages/mpwt/main.py", line 358, in run_mpwt multiprocess_pwt(input_folder=input_folder, File "/home/lcottret/.local/lib/python3.8/site-packages/mpwt/mpwt_workflow.py", line 147, in multiprocess_pwt independent_mpwt(input_folder, output_folder, patho_inference, File "/home/lcottret/.local/lib/python3.8/site-packages/mpwt/mpwt_workflow.py", line 333, in independent_mpwt run_patho_flat_ids, run_flat_ids = check_input_and_existing_pgdb(run_ids, input_folder, output_folder, number_cpu_to_use) File "/home/lcottret/.local/lib/python3.8/site-packages/mpwt/pathologic_input.py", line 92, in check_input_and_existing_pgdb for species_file in os.listdir(species_folder_path): NotADirectoryError: [Errno 20] Not a directory: 'outfiles/pathologicInputs/pgdbs.tsv.bak' `

The input folder can serve as other purposes, it would be nice to allow extra fils in this directory.

ArnaudBelcour commented 2 years ago

Hi @lcottret,

Thanks for the feedback, I have pushed a commit on the branch mpwt 0.8.0 that should fix this issue.