1
$\begingroup$

I start saying my background is Biology and I'm totally new to WDL, so I'm aware my code will be messy but I'm trying to learn.

My problem is, essentially, to run a Docker container I built and tested for a tool on WDL (Terra platform). Now, I'm struggling a bit in understanding how to get input and generate output, and if they have to be contained in a path within the Docker. I successfully run this tool on a normal cluster, but Terra is a different story...

Shortly, what the tool does is determining the k-mers distribution in a pangenome and use the haplotypes support from the graph structure to infer genotypes for samples "mapped" on the pangenome graph space (more info here).

The tool requires as input a VCF file from the pangenome, a reference genome and a set of samples to genotype; all this information is specified within a .yaml file the user would normally edit once the tool is installed on a cluster to point to the correct directories where files are.

  1. Firstly, I would like to give users the choice over what pangenome VCF file is loaded, as there are two main ways to build pangenome graphs and the genome inference is substantially affected by them.
  2. Secondly, I want also to give a choice over the type of reference used, as variants for the samples can be called both against GRCh38 as well as CHM13.
  3. Finally, I would like to give users freedom over the number of samples to genotype but also understand where this data (uncompressed .fastq files) have to be access on Terra and loaded in WDL

The tools generates five directories after the execution is completed, I'm not sure whether I have to create them beforehand for output to be access by users. Let me know.

Following, the script I wrote up to now. I have a few problems at different stages of the implementation as you can see. Please let me know if you can help and what kind of additional information you might need. Thanks in advance!

code version 1.0

workflow PanGenie {
    input {
        File? PANGENOME_VCF # input vcf with variants to be genotyped
        File? REFERENCE_GENOME # reference genome used to call variants from the graph
        Array[File]? INUPT_READS_SET # actual .fastq file
        Array[String]? SAMPLEs_FASTQ_READS # reads (FASTA/FASTQ format, uncompressed) for samples' to genotype

        Int CORES = 24 # number of cores to allocate for PanGenie execution
        Int DISK_STORAGE = 100 # storage memory for output files
    }

    File PANGENOME_VCF ## lets the user decide whether to use a mc-CACTUS or a PGGB based vcf file
    File REFERENCE_GENOME ## lets the user chose what reference to call variants from (GRCh38 or CHM13)
    File PANGENIE = "/app/pangenie/build/src/PanGenie" ## path to executable within Docker

    task pangenie_exe {
        input {
            File PANGENOME_VCF
            File REFERENCE_GENOME
            Array[File] INUPT_READS_SET
        }

        command {
            snakemake --cores CORES
        }

        output {
            Directory benchmark = ""
            Directory genotypes = ""
            Directory input_vcf = ""
            Directory pangenie = ""
            Directory pangenome = ""
        }

        runtime {
            memory: "300 GB"
            CPU: CORES
            disks: "local-disk " + DISK_STORAGE + " SSD"
            docker: "quay.io/overcraft90/eblerjana_pangenie"
            preemptible: 1 # can be useful for tools which execute sequential steps in a pipeline generating intermediate outputs
        }
    }
}
$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.