Update: July 26, 2019
This section of the forum is no longer actively monitored. We are working on a support migration plan that we will share here shortly. Apologies for this inconvenience.

`File stdout()` just references path str?

In the `output` of `task prepGWAS` I attempt to pass a file to my 2nd task.

However, I'm having difficulty working with that file within the scripts of my 2nd task. It just looks like the string of the path to the stdout cromwell folder in the gs bucket?

Do I need to tap into that path someone in order to access the file?

```
print(QCZ) == /cromwell_root/crom-buck/cromwell-execution/hailGWAS/6580b558-59da-4ed8-a310-d76656a05e43/call-prepGWAS/stdout

print( type(QCZ) ) == <class 'str'>

Error shutil.ReadError: dir.zip is not a zip file
```


***wdl***
```
workflow hailGWAS {
call prepGWAS
call runGWAS {input: qc_zip = prepGWAS.qc_zip}
}

task prepGWAS {
command {
cd ..; python prep-z-gwas.py;
}
output {
File qc_zip = stdout()
}
runtime {
docker: 'hashrocketsyntax/java-py-hail:nz'
}
}

task runGWAS {
File qc_zip

command {
cd ..; export QCZ=${qc_zip}; python run-z-gwas.py;
}
output {
String out = read_int(stdout())
}
runtime {
docker: 'hashrocketsyntax/java-py-hail:nz'
}
}

```

**end of first task script**
```
dir = mt.write('mt_dir')

shutil.make_archive('dir', 'zip', 'mt_dir')
```

**beginning of second task script**
```
import os
import shutil
import hail as hl;

QCZ = os.getenv('QCZ')

print(QCZ)
print( type(QCZ) )

qc_unzip = shutil.unpack_archive('dir', format='zip')
```

Cromwell 42 on Google Cloud

Answers

Sign In or Register to comment.