Skip to content

Commit

Permalink
Merge pull request #977 from biorack/untargeted_dev
Browse files Browse the repository at this point in the history
Add new raw data subdirectories to mirror walk
  • Loading branch information
bkieft-usa authored Nov 12, 2024
2 parents cd431eb + 34bb916 commit 2a6ef26
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions metatlas/untargeted/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ def mirror_mzmine_results_to_gnps2(
logging.info("Walking through local directory %s and uploading mzmine results to GNPS2..."%(local_directory))
for file_path in local_directory.rglob('*'):
if file_path.is_file() and file_path.suffix in ('.mgf', '.csv', '.tab'):
logging.info("Uploading %s to GNPS2..." % file_path.name)
#logging.info("Uploading %s to GNPS2..." % file_path.name)
local_path = str(file_path)
remote_path = f"{remote_directory}/{file_path.name}"
sftp.put(local_path, remote_path)
Expand Down Expand Up @@ -1021,7 +1021,7 @@ def mirror_raw_data_to_gnps2(
if os.path.exists(check_project_raw_dir):
local_directory = check_project_raw_dir
else:
possible_subdirs = ["jgi", "egsb", "akuftin", "agolini", "kblouie"]
possible_subdirs = ["jgi", "egsb", "akuftin", "agolini", "kblouie", "lzhan", "smkosina", "jsjordan", "mtvu", "tharwood"]
for subdir in possible_subdirs:
check_project_raw_dir = os.path.join(raw_data_dir, subdir, project)
if os.path.exists(check_project_raw_dir):
Expand Down Expand Up @@ -1069,7 +1069,7 @@ def mirror_raw_data_to_gnps2(
logging.info("Walking through local directory %s and uploading mzML files to GNPS2..."%(local_directory))
for file_path in local_directory.rglob('*'):
if file_path.is_file() and file_path.suffix == '.mzML' and polarity_short in file_path.name:
logging.info("Uploading %s to GNPS2..." % file_path.name)
#logging.info("Uploading %s to GNPS2..." % file_path.name)
local_path = str(file_path)
remote_path = f"{polarity_directory}/{file_path.name}"
sftp.put(local_path, remote_path)
Expand Down Expand Up @@ -1781,7 +1781,7 @@ def write_metadata_per_new_project(
if os.path.exists(check_project_raw_dir):
full_mzml_path = check_project_raw_dir
else:
possible_subdirs = ["jgi", "egsb", "akuftin", "agolini", "kblouie"]
possible_subdirs = ["jgi", "egsb", "akuftin", "agolini", "kblouie", "lzhan", "smkosina", "jsjordan", "mtvu", "tharwood"]
for subdir in possible_subdirs:
check_project_raw_dir = os.path.join(raw_data_dir, subdir, parent_dir)
if os.path.exists(check_project_raw_dir):
Expand Down

0 comments on commit 2a6ef26

Please sign in to comment.