Make a list of outputs
I'm trying to build a list of output files into one file, which is used as an input for the next task. Building the output list part is keep failing. Here is my code.
workflow build_normalDB {
call CreateFoFN
call CreateNormalDB {
input:
normalDB_list = CreateFoFN.fofn_list
}
output {
File normalDB = CreateNormalDB.normalDB
File mappingBiase = CreateNormalDB.mappingBiase
File targetWeight = CreateNormalDB.targetWeight
}
}
task CreateFoFN {
# Command parameters
Array[String] normal_covs
String fofn_name
command <<<
mv ${write_lines(normal_covs)} ${fofn_name}.list
>>>
output {
File fofn_list = "${fofn_name}.list"
}
runtime {
docker: "ubuntu:latest"
}
}
task CreateNormalDB {
File normalDB_list # a list of normal coverage files
File normal_panel # normals.merged.min5.vcf.gz
String outdir # .
# Runtime parameters
Int? machine_mem_gb
Int? disk_space_gb
Int disk_size = ceil(size(normal_panel, "GB")) + 20
command <<<
Rscript /usr/local/lib/R/site-library/PureCN/extdata/Coverage.R \
--outdir ${outdir} \
--coveragefiles ${normalDB_list} \
--normal_panel ${normal_panel} \
--genome hg19 --force
>>>
runtime {
docker: "quay.io/shbrief/pcn_docker"
cpu : 2
memory: "32 GB"
disks: "local-disk " + select_first([disk_space_gb, disk_size]) + " SSD"
}
output {
File normalDB = "normalDB.rds"
File mappingBiase = "mapping_bias.rds"
File targetWeight = "target_weight.txt"
}
}
I asked a similar question before, but now the setup is changed little bit and the workflow is broken again. I referenced this post (https://github.com/gatk-workflows/seq-format-conversion/blob/master/paired-fastq-to-unmapped-bam.wdl) and used 'participant_set' entity, but it's not working. I tried to combine those `mv` and `Rscript` in one task, because `pcn_docker` is on ubuntu. Not working neither. Any suggestion will be welcomed. Thanks.
Comments
5 comments
HI Sehyun,
I am taking a look and will get back to you.
Hi Sushma, is there any update with this issue? Thanks! - Sehyun
Hello Sehyun,
Sorry about the delay. What errors are you getting when you say that the building the output list part is failing? Do you have any error logs?
Hi Sushma,
No specific error message. Actually it says the job 'succeeded', but the output file is empty.
Sehyun,
I created a test Workflow in a test Terra workspace containing just the task CreateFoFN and tested it with some sample data. It worked successfully and created an output file. Can you explain how you are running this workflow and which root entity type you are using in your set up?
This is what I did:
I used a Sample Set since the attribute type for normal_covs is Array[String] and the output was generated as expected.
Sushma
Please sign in to leave a comment.