-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #203 from 4dn-dcic/0.8.1
0.8.1
- Loading branch information
Showing
21 changed files
with
333 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/usr/bin/python | ||
import os | ||
import subprocess | ||
import boto3 | ||
|
||
|
||
def main(): | ||
language = os.environ.get('LANGUAGE') | ||
local_wfdir = os.environ.get('LOCAL_WFDIR') | ||
subprocess.call(['mkdir', '-p', local_wfdir]) | ||
|
||
if language == 'wdl': | ||
main_wf = os.environ.get('MAIN_WDL', '') | ||
wf_files = os.environ.get('WDL_FILES', '') | ||
wf_url = os.environ.get('WDL_URL') | ||
else: | ||
main_wf = os.environ.get('MAIN_CWL', '') | ||
wf_files = os.environ.get('CWL_FILES', '') | ||
wf_url = os.environ.get('CWL_URL') | ||
# turn into a list | ||
if not wf_files: | ||
wf_files = [] | ||
elif ' ' in wf_files: | ||
wf_files = wf_files.split(' ') | ||
else: | ||
wf_files = [wf_files] | ||
wf_files.append(main_wf) | ||
wf_url = wf_url.strip('/') | ||
|
||
print("main workflow file: %s" % main_wf) | ||
print("workflow files: " + str(wf_files)) | ||
|
||
s3 = boto3.client('s3') | ||
for wf_file in wf_files: | ||
target = "%s/%s" % (local_wfdir, wf_file) | ||
source = "%s/%s" % (wf_url, wf_file) | ||
if wf_url.startswith('http'): | ||
subprocess.call(["wget", "-O" + target, source]) | ||
elif wf_url.startswith('s3'): | ||
wf_loc = wf_url.replace('s3://', '') | ||
bucket_name = wf_loc.split('/')[0] | ||
if len(wf_loc.split('/')) > 1: | ||
subdirectory = wf_loc.replace(bucket_name + '/', '') | ||
key = subdirectory + '/' + wf_file | ||
else: | ||
key = wf_file | ||
print("downloading key %s from bucket %s to target %s" % (key, bucket_name, target)) | ||
s3.download_file(Bucket=bucket_name, Key=key, Filename=target) | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
python-lambda-4dn==0.12.0 | ||
dcicutils==0.6.0 | ||
Benchmark-4dn==0.5.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ include = | |
*/tibanna/* | ||
*/tibanna_4dn/* | ||
[aliases] | ||
test=pytest | ||
test=check | ||
|
||
[tool:pytest] | ||
addopts = | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{ | ||
"args": { | ||
"app_name": "bwa-mem", | ||
"input_parameters": {}, | ||
"cwl_child_filenames": [], | ||
"output_target": { | ||
"out_bam": "lalala/out.bam" | ||
}, | ||
"secondary_output_target": {}, | ||
"cwl_main_filename": "bwa-mem.cwl", | ||
"secondary_files": {}, | ||
"output_S3_bucket": "tibanna-output", | ||
"app_version": "5", | ||
"cwl_directory_local": "tests/files/cwl_upload/", | ||
"cwl_version": "v1", | ||
"input_files": { | ||
"fastq1": { | ||
"bucket_name": "4dn-tool-evaluation-files", | ||
"object_key": "GM12878_SRR1658581_1pc_1_R1.fastq.h10000" | ||
}, | ||
"fastq2": { | ||
"bucket_name": "4dn-tool-evaluation-files", | ||
"object_key": "GM12878_SRR1658581_1pc_1_R2.fastq.h10000" | ||
}, | ||
"bwa_index": { | ||
"bucket_name": "elasticbeanstalk-fourfront-webdev-files", | ||
"object_key": "1f53df95-4cf3-41cc-971d-81bb16c486dd/4DNFIZQZ39L9.bwaIndex.tgz" | ||
} | ||
}, | ||
"input_parameters": { | ||
"nThreads": 2 | ||
} | ||
}, | ||
"config": { | ||
"ebs_size": 30, | ||
"ebs_type": "io1", | ||
"json_bucket": "4dn-aws-pipeline-run-json", | ||
"EBS_optimized": false, | ||
"ebs_iops": 500, | ||
"shutdown_min": 30, | ||
"instance_type": "t2.large", | ||
"password": "dragonfly", | ||
"log_bucket": "tibanna-output", | ||
"key_name": "4dn-encode", | ||
"cloudwatch_dashboard": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
{ | ||
"hints": [ | ||
{ | ||
"dockerPull": "duplexa/4dn-hic:v42.1", | ||
"class": "DockerRequirement" | ||
} | ||
], | ||
"arguments": [], | ||
"class": "CommandLineTool", | ||
"inputs": [ | ||
{ | ||
"type": [ | ||
"File" | ||
], | ||
"id": "#fastq1", | ||
"inputBinding": { | ||
"position": 1, | ||
"separate": true | ||
} | ||
}, | ||
{ | ||
"type": [ | ||
"File" | ||
], | ||
"id": "#fastq2", | ||
"inputBinding": { | ||
"position": 2, | ||
"separate": true | ||
} | ||
}, | ||
{ | ||
"type": [ | ||
"File" | ||
], | ||
"id": "#bwa_index", | ||
"inputBinding": { | ||
"position": 3, | ||
"separate": true | ||
} | ||
}, | ||
{ | ||
"type": [ | ||
"int" | ||
], | ||
"id": "#nThreads", | ||
"inputBinding": { | ||
"position": 6, | ||
"separate": true | ||
}, | ||
"default": 4 | ||
}, | ||
{ | ||
"type": [ | ||
"null", | ||
"string" | ||
], | ||
"id": "#prefix", | ||
"inputBinding": { | ||
"position": 5, | ||
"separate": true | ||
}, | ||
"default": "out" | ||
}, | ||
{ | ||
"type": [ | ||
"null", | ||
"string" | ||
], | ||
"id": "#outdir", | ||
"inputBinding": { | ||
"position": 4, | ||
"separate": true | ||
}, | ||
"default": "." | ||
} | ||
], | ||
"outputs": [ | ||
{ | ||
"type": [ | ||
"null", | ||
"File" | ||
], | ||
"id": "#out_bam", | ||
"outputBinding": { | ||
"glob": "*.bam" | ||
} | ||
} | ||
], | ||
"baseCommand": [ | ||
"run-bwa-mem.sh" | ||
], | ||
"requirements": [ | ||
{ | ||
"class": "InlineJavascriptRequirement" | ||
} | ||
], | ||
"cwlVersion": "v1.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Empty file.
37 changes: 37 additions & 0 deletions
37
tests/tibanna/unicorn/run_task_awsem/event_cwl_upload.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"args": { | ||
"app_name": "md5", | ||
"language": "cwl draft-3", | ||
"input_parameters": {}, | ||
"cwl_version": "draft-3", | ||
"output_target": { | ||
"report": "ac18f2bb-c256-40bf-9562-cdc6179d6f9a/report" | ||
}, | ||
"secondary_output_target": {}, | ||
"cwl_main_filename": "main.cwl", | ||
"cwl_child_filenames": ["child1.cwl", "child2.cwl"], | ||
"secondary_files": {}, | ||
"output_S3_bucket": "elasticbeanstalk-fourfront-webdev-wfoutput", | ||
"app_version": "0.0.4", | ||
"cwl_directory_local": "tests/tibanna/unicorn/run_task_awsem/cwl_upload/", | ||
"input_files": { | ||
"input_file": { | ||
"bucket_name": "elasticbeanstalk-fourfront-webdev-files", | ||
"object_key": "f4864029-a8ad-4bb8-93e7-5108f462ccaa/4DNFIRSRJH45.fastq.gz" | ||
} | ||
}, | ||
"input_env": {"TESTENV": 1234} | ||
}, | ||
"config": { | ||
"ebs_size": 0, | ||
"ebs_type": "io1", | ||
"json_bucket": "4dn-aws-pipeline-run-json", | ||
"EBS_optimized": "", | ||
"ebs_iops": 500, | ||
"shutdown_min": 30, | ||
"instance_type": "", | ||
"password": "", | ||
"log_bucket": "tibanna-output", | ||
"key_name": "4dn-encode" | ||
} | ||
} |
Oops, something went wrong.