Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new raw data subdirectories to mirror walk #977

Merged
merged 2 commits into from
Nov 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading