Skip to content

Commit

Permalink
fix of download
Browse files Browse the repository at this point in the history
  • Loading branch information
baminou committed Feb 15, 2018
1 parent 09748cc commit f542130
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions workflow/tools/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@
import os
from utils import get_task_dict, save_output_json
import sys
import time

task_dict = get_task_dict(sys.argv[1])
cwd = os.getcwd()

#time.sleep(2*60)

def download_file(object_id, out_dir, file_name):
docker_container = "quay.io/baminou/minibam-collab-dckr:latest"
download_source = "collab"
Expand All @@ -27,19 +24,19 @@ def download_file(object_id, out_dir, file_name):
# Download normal bam file
object_id = task_dict.get('input').get('normal_bam').get('object_id')
file_name = task_dict.get('input').get('normal_bam').get('file_name')
#download_file(object_id, cwd, file_name)
download_file(object_id, cwd, file_name)

# Download tumor bam files
for i in range(0,len(task_dict.get('input').get('tumor_bams'))):
object_id = task_dict.get('input').get('tumor_bams')[i].get('object_id')
file_name = task_dict.get('input').get('tumor_bams')[i].get('file_name')
#download_file(object_id, cwd, file_name)
download_file(object_id, cwd, file_name)

# Download VCF files
for i in range(0,len(task_dict.get('input').get('vcf_files'))):
object_id = task_dict.get('input').get('vcf_files')[i].get('object_id')
file_name = task_dict.get('input').get('vcf_files')[i].get('file_name')
#download_file(object_id, cwd, file_name)
download_file(object_id, cwd, file_name)

save_output_json({
'directory': cwd
Expand Down
2 changes: 1 addition & 1 deletion workflow/tools/generate_minibam.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
with open(json_file, 'w') as f:
json.dump(json_input, f, indent=4, sort_keys=True)

#subprocess.check_output(['cwltool','--debug','--relax-path-checks','--non-strict','/home/ubuntu/pcawg-minibam/pcawg_minibam_wf.cwl',json_file])
subprocess.check_output(['cwltool','--debug','--relax-path-checks','--non-strict','/home/ubuntu/pcawg-minibam/pcawg_minibam_wf.cwl',json_file])

save_output_json({
'output_directory': os.getcwd()
Expand Down

0 comments on commit f542130

Please sign in to comment.