Skip to content

Commit

Permalink
Fix to determining JSON directory location.
Browse files Browse the repository at this point in the history
  • Loading branch information
ptth222 committed Jan 19, 2024
1 parent d246d77 commit b095701
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion isatools/convert/json2isatab.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import logging
import os
import shutil
import pathlib

from isatools import isajson, isatab

Expand Down Expand Up @@ -50,7 +51,7 @@ def convert(json_fp, path, i_file_name='i_investigation.txt',
write_factor_values_in_assay_table=write_factor_values_in_assay_table)
# copy data files across from source directory where JSON is located
log.info("Copying data files from source to target")
for file in [f for f in os.listdir(os.path.dirname(json_fp.name))
for file in [f for f in os.listdir(pathlib.Path(json_fp.name).resolve().parent)
if not (f.endswith('.txt') and (f.startswith('i_') or
f.startswith('s_') or
f.startswith('a_'))) and
Expand Down

0 comments on commit b095701

Please sign in to comment.