Skip to content

Commit

Permalink
Various adjustments to t1dgrs2 v2 pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
ngaddis committed Sep 25, 2024
1 parent 0a04366 commit a929f55
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
"default": "",
"required": true
},
"run_id": {
"type": "str",
"default": "",
"required": true
},
"ref_bfile": {
"type": "str",
"default": "",
Expand Down Expand Up @@ -105,10 +110,11 @@
"inputs": {
"working_dir": "<inputs.working_dir>generate_file_for_export",
"output_dir": "<inputs.output_dir>generate_file_for_export",
"run_id": "<inputs.run_id>",
"t1dgrs2_results_file": "<steps.calculate_t1dgrs2.outputs.results>",
"missingness_summary_file": "<steps.merge_missingness_summaries.outputs.merged_file>",
"remove_file": "<inputs.control_samples>",
"output_file": "<inputs.output_dir><inputs.sample_id>_for_export.csv",
"remove_file": "<inputs.ref_samples>",
"output_file": "<inputs.output_dir>generate_file_for_export/_for_export.csv",
"missing_hla_threshold": "<inputs.missing_hla_threshold>",
"missing_non_hla_threshold": "<inputs.missing_non_hla_threshold>"

Expand Down
10 changes: 5 additions & 5 deletions t1dgrs2_pipeline/v2.0/pipeline_config/t1dgrs2_tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@
}
},
"cmd": [
"/opt/extract_gvcf_variants.pl",
"/opt/merge_file_rows.sh",
"--merge_list",
"<inputs.merge_list>",
"--merge-header_row_count",
Expand Down Expand Up @@ -412,6 +412,9 @@
"output_dir": {
"type": "dir"
},
"run_id": {
"type": "str"
},
"t1dgrs2_results_file": {
"type": "file"
},
Expand All @@ -421,9 +424,6 @@
"remove_file": {
"type": "file"
},
"output_file": {
"type": "str"
},
"missing_hla_threshold": {
"type": "int",
"default": 1
Expand All @@ -442,7 +442,7 @@
"--remove_file",
"<inputs.remove_file>",
"--output_file",
"<inputs.output_file>",
"<inputs.output_dir><inputs.run_id>_export.csv",
"--missing_hla_threshold",
"<inputs.missing_hla_threshold>",
"--missing_non_hla_threshold",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def get_running_workflows():
if args.sequencing_provider == 'revvity':
result = re.search(r'^\S+\-(\d+)_\d+-WGS.+\.hard-filtered.gvcf.gz$', file)
elif args.sequencing_provider == 'genedx':
result = re.search(r'^(\d+).hard-filtered.gvcf.gz$', file)
result = re.search(r'^(\S+).hard-filtered.gvcf.gz$', file)
if result:
sample_id = result.group(1)

Expand Down
4 changes: 2 additions & 2 deletions t1dgrs2_pipeline/v2.0/scripts/extract_gvcf_variants.pl
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
'sample_id=s' => \$sample_id,
'gvcf=s' => \$gvcf,
'variant_list=s' => \$variant_list,
'hla_variants_file' => \$hla_variants_file,
'non_hla_variants_file' => \$non_hla_variants_file,
'hla_variants_file=s' => \$hla_variants_file,
'non_hla_variants_file=s' => \$non_hla_variants_file,
'out_prefix=s' => \$out_prefix,
'pass_only:i' => \$pass_only,
'filter_by_gq:i' => \$filter_by_gq,
Expand Down
4 changes: 2 additions & 2 deletions t1dgrs2_pipeline/v2.0/scripts/generate_file_for_export.pl
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
open(REMOVE, $remove_file);
while(<REMOVE>) {
chomp;
$remove{$_} = 1;
@F = split("\t");
$remove{$F[1]} = 1;
}
close REMOVE;


# Open output file for writing
open(OUTPUT_FILE, ">".$output_file);
print OUTPUT_FILE join(",", "RTI_Accession","GRS2","Missingness_Filter")."\n";
Expand Down
48 changes: 48 additions & 0 deletions wgs_qc_wf_tools/v1.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<details>
<summary>Usage</summary>

``` shell
# Launch step 1
docker run -ti \
-v /rti-01/ngaddis:/rti-01/ngaddis \
-e task=launch_step_1 \
-e aws_access_key_id=<AWS_ACCESS_KEY_ID> \
-e aws_secret_access_key=<AWS_SECRET_ACCESS_KEY> \
-e parameters=<PARAMETERS> \
-e name=<NAME> \
-e role_arn=<ROLE_ARN> \ # Optional - default arn:aws:iam::515876044319:role/service-role/OmicsWorkflow-20240601210363
-e output_uri=<OUTPUT_URI> \ # Optional - default s3://rti-nida-iomics-oa-healthomics-output/
-e storage_capacity=<STORAGE_CAPACITY> \ # Optional - default 1000
-e workflow_id=<WORKFLOW_ID> \ # Optional - default 3565858
--rm rtibiocloud/wgs_qc_wf_tools:v1.0_1e4fbb0

# Launch step 2
docker run -ti \
-v /rti-01/ngaddis:/rti-01/ngaddis \
-e task=launch_step_2 \
-e aws_access_key_id=<AWS_ACCESS_KEY_ID> \
-e aws_secret_access_key=<AWS_SECRET_ACCESS_KEY> \
-e step_1_output_json=<STEP_1_OUTPUT_JSON> \
-e step_2_config_output_dir=<STEP_2_CONFIG_OUTPUT_DIR> \
-e role_arn=<ROLE_ARN> \ # Optional - default arn:aws:iam::515876044319:role/service-role/OmicsWorkflow-20240601210363
-e output_uri=<OUTPUT_URI> \ # Optional - default s3://rti-nida-iomics-oa-healthomics-output/
-e storage_capacity=<STORAGE_CAPACITY> \ # Optional - default 1000
-e minimum_ancestry_sample_count=<MINIMUM_ANCESTRY_SAMPLE_COUNT> \ # Optional - default 50
-e workflow_id=<WORKFLOW_ID> \ # Optional - default 5499609
--rm rtibiocloud/wgs_qc_wf_tools:v1.0_1e4fbb0
```
</details>


<details>
<summary>Build instructions</summary>

``` shell
cd biocloud_docker_tools/wgs_qc_wf_tools/v1.0

# Local build
docker build . -t wgs_qc_wf_tools/wgs_qc_wf_tools:v1.0

```
</details>

0 comments on commit a929f55

Please sign in to comment.