From 108408b8a9d2022b07be3fd6c1912c5133786e04 Mon Sep 17 00:00:00 2001 From: D-Pankey <30415217+D-Pankey@users.noreply.github.com> Date: Thu, 7 May 2026 16:42:08 -0400 Subject: [PATCH 1/5] Update README with parse_cohort_files.py details Added usage instructions and examples for parse_cohort_files.py commands. --- scripts/README.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/scripts/README.md b/scripts/README.md index f9f69c0..dec1d10 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -49,3 +49,47 @@ In this command: - `tmp-fg` is the filegroup slug to which files should be copied. - `12345` is the ID of the request for which the files belong. - `runId=ABCD_123 runMode="XSeq"` are optional key-value pairs that can be added as metadata when copying files. + +## parse_cohort_files.py +This script is typically used before submitting Tempo Jobs for alignment. +There are three commands in this script. +-`Parse` Creates the input file to run Tempo jobs by comparing the cohort directory with bams and parsing the differences. +-`Check` Creates a script do those file exist. +-`Remove` Creates a scripts which deletes the files. + +Usage: + +Prerequisite: + + Switch to tempobot for access to cohort directory: + source /usersoftware/core006/dodzdo.sh + + Activate conda environemt: + conda activate py37 + + Set enviornment variables: + - BEAGLE_USER + - BEAGLE_PW + - BEAGLE_ENDPOINT + +Here is an example for parse_cohort_files.py *parse* command: +``` + +python3 parse_cohort_files.py parse [] + - can be a single file, multiple files, or a wildcard (e.g., /path/to/files/*.txt) + - is the path containing existing directories to compare + +python3 parse_cohort_files.py parse /data1/core006/ccs_pipelines/tempo/wes_repo/Results/v2.1.x/cohort_level/*.txt /data1/core006/ccs_pipelines/tempo/wes_repo/Results/v2.1.x/bams/ parse_output.txt diff_output.txt +``` +Here is an example for parse_cohort_files *check* command: +``` +python3 parse_cohort_files.py check [] + +python3 parse_cohort_files.py check CCS_F00000.cohort.txt CCS_F00000.cohort.check.sh +``` +Here is an example for parse_cohort_files *remove* command: +``` +python3 parse_cohort_files.py remove [] + +python3 parse_cohort_files.py remove CCS_F00000.cohort.txt CCS_F00000.cohort.remove_file.sh +``` From b7cfaacea4dbd76d12db3a1de7e6a7c8742b5504 Mon Sep 17 00:00:00 2001 From: D-Pankey <30415217+D-Pankey@users.noreply.github.com> Date: Thu, 7 May 2026 17:59:54 -0400 Subject: [PATCH 2/5] Update README with submit_tempo_jobs.py details Added documentation for submit_tempo_jobs.py script and usage examples. --- scripts/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/README.md b/scripts/README.md index dec1d10..1084b32 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -93,3 +93,14 @@ python3 parse_cohort_files.py remove [] python3 parse_cohort_files.py remove CCS_F00000.cohort.txt CCS_F00000.cohort.remove_file.sh ``` +## submit_tempo_jobs.py + +The submit_tempo_jobs.py script is used to submit tempo jobs to voyager using the file created from the parse command. + +Here is a usage example of submit_tempo_jobs: + +``` +python submit_tempo_jobs.py diff_output.txt CCS_F00000 + +python submit_tempo_jobs.py [] +``` From eb705fe9d2e1e8adec008a51c4268cb325762646 Mon Sep 17 00:00:00 2001 From: D-Pankey <30415217+D-Pankey@users.noreply.github.com> Date: Wed, 20 May 2026 16:17:13 -0400 Subject: [PATCH 3/5] updated argument restriction --- scripts/parse_cohort_files.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/parse_cohort_files.py b/scripts/parse_cohort_files.py index 5d8155f..edcfb39 100644 --- a/scripts/parse_cohort_files.py +++ b/scripts/parse_cohort_files.py @@ -144,17 +144,23 @@ def parse_cohort_file(input_files, directory_path, output_file, diff_output_file """ if __name__ == "__main__": - if len(sys.argv) < 6: + if len(sys.argv) < 2: print(HELP) exit(1) command = sys.argv[1] if command == "parse": + if len(sys.argv) < 6: + print(HELP) + exit(1) input_files = sys.argv[2:-3] directory_path = sys.argv[-3] output_file = sys.argv[-2] diff_output_file = sys.argv[-1] parse_cohort_file(input_files, directory_path, output_file, diff_output_file) elif command == "remove": + if len(sys.argv) < 3: + print(HELP) + exit(1) input_file = sys.argv[2] if len(sys.argv) > 2: output_file = sys.argv[3] @@ -162,6 +168,9 @@ def parse_cohort_file(input_files, directory_path, output_file, diff_output_file else: create_remove_script(input_file) elif command == "check": + if len(sys.argv) < 3: + print(HELP) + exit(1) input_file = sys.argv[2] if len(sys.argv) > 2: output_file = sys.argv[3] @@ -169,5 +178,4 @@ def parse_cohort_file(input_files, directory_path, output_file, diff_output_file else: create_check_script(input_file) else: - print(HELP) - \ No newline at end of file + print(HELP) \ No newline at end of file From 2c850872c6425bdcb716e4d2146be8e70729f7d4 Mon Sep 17 00:00:00 2001 From: D-Pankey <30415217+D-Pankey@users.noreply.github.com> Date: Thu, 21 May 2026 13:40:44 -0400 Subject: [PATCH 4/5] updating check and remove command argument requirement --- scripts/parse_cohort_files.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/parse_cohort_files.py b/scripts/parse_cohort_files.py index edcfb39..4a767bd 100644 --- a/scripts/parse_cohort_files.py +++ b/scripts/parse_cohort_files.py @@ -136,10 +136,8 @@ def parse_cohort_file(input_files, directory_path, output_file, diff_output_file python3 parse_cohort_files.py parse [] - can be a single file, multiple files, or a wildcard (e.g., /path/to/files/*.txt) - is the path containing existing directories to compare -python3 parse_cohort_files.py remove [] -python3 parse_cohort_files.py check [] -python3 parse_cohort_files.py list_dir [] -python3 parse_cohort_files.py compare +python3 parse_cohort_files.py remove +python3 parse_cohort_files.py check """ @@ -158,7 +156,7 @@ def parse_cohort_file(input_files, directory_path, output_file, diff_output_file diff_output_file = sys.argv[-1] parse_cohort_file(input_files, directory_path, output_file, diff_output_file) elif command == "remove": - if len(sys.argv) < 3: + if len(sys.argv) != 4: print(HELP) exit(1) input_file = sys.argv[2] @@ -168,7 +166,7 @@ def parse_cohort_file(input_files, directory_path, output_file, diff_output_file else: create_remove_script(input_file) elif command == "check": - if len(sys.argv) < 3: + if len(sys.argv) != 4: print(HELP) exit(1) input_file = sys.argv[2] From 8470328367682781607781e331d3b7cd1674f3d4 Mon Sep 17 00:00:00 2001 From: D-Pankey <30415217+D-Pankey@users.noreply.github.com> Date: Thu, 21 May 2026 16:02:40 -0400 Subject: [PATCH 5/5] Fix typos in README for parse_cohort_files.py Corrected typos and improved clarity in the README. --- scripts/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/README.md b/scripts/README.md index 1084b32..d8490a2 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -54,7 +54,7 @@ In this command: This script is typically used before submitting Tempo Jobs for alignment. There are three commands in this script. -`Parse` Creates the input file to run Tempo jobs by comparing the cohort directory with bams and parsing the differences. --`Check` Creates a script do those file exist. +-`Check` Creates a script to check if files exist. -`Remove` Creates a scripts which deletes the files. Usage: @@ -64,7 +64,7 @@ Prerequisite: Switch to tempobot for access to cohort directory: source /usersoftware/core006/dodzdo.sh - Activate conda environemt: + Activate conda environment: conda activate py37 Set enviornment variables: @@ -83,13 +83,13 @@ python3 parse_cohort_files.py parse /data1/core006/ccs_pipelines/tempo/wes_repo/ ``` Here is an example for parse_cohort_files *check* command: ``` -python3 parse_cohort_files.py check [] +python3 parse_cohort_files.py check python3 parse_cohort_files.py check CCS_F00000.cohort.txt CCS_F00000.cohort.check.sh ``` Here is an example for parse_cohort_files *remove* command: ``` -python3 parse_cohort_files.py remove [] +python3 parse_cohort_files.py remove python3 parse_cohort_files.py remove CCS_F00000.cohort.txt CCS_F00000.cohort.remove_file.sh ```