submit_sra
pipes/WDL/workflows/submit_sra.wdl

WORKFLOW submit_sra

File Path pipes/WDL/workflows/submit_sra.wdl
WDL Version 1.0
Type workflow

Imports

Namespace Path
ncbi_tools ../tasks/tasks_ncbi_tools.wdl
terra ../tasks/tasks_terra.wdl

Workflow: submit_sra

Submit reads to SRA

Author: Broad Viral Genomics
viral-ngs@broadinstitute.org

Inputs

Name Type Description Default
reads_bams Array[File] - -
flowcell_id String - -
ncbi_ftp_config_js File - -
sra_meta_tsv File - -
sra_bioproject String - -
sra_data_bucket_uri String - -
3 optional inputs with default values

Outputs

Name Type Expression
sra_xml File sra_tsv_to_xml.submission_xml
sra_response Array[File] sra_upload.reports_xmls

Calls

This workflow calls the following tasks or subworkflows:

CALL TASKS gcs_sra_dump_reads → gcs_copy

Input Mappings (2)
Input Value
infiles reads_bams
gcs_uri_prefix "~{sra_data_bucket_uri}/~{flowcell_id}/"

CALL TASKS sra_tsv_to_xml

Input Mappings (4)
Input Value
meta_submit_tsv sra_meta_tsv
config_js ncbi_ftp_config_js
bioproject sra_bioproject
data_bucket_uri "~{sra_data_bucket_uri}/~{flowcell_id}"

CALL TASKS sra_upload → ncbi_sftp_upload

Input Mappings (5)
Input Value
config_js ncbi_ftp_config_js
submission_xml sra_tsv_to_xml.submission_xml
additional_files []
target_path "~{prefix}/sra"
wait_for "1"

Images

Container images used by tasks in this workflow:

🐳 viral-baseimage

quay.io/broadinstitute/viral-baseimage:0.3.0

Used by 1 task:
  • gcs_sra_dump_reads
🐳 Parameterized Image
⚙️ Parameterized

Configured via input:
docker

Used by 2 tasks:
  • sra_tsv_to_xml
  • sra_upload
← Back to Index

submit_sra - Workflow Graph

🖱️ Scroll to zoom • Drag to pan • Double-click to reset • ESC to close

submit_sra - WDL Source Code

version 1.0

import "../tasks/tasks_ncbi_tools.wdl" as ncbi_tools
import "../tasks/tasks_terra.wdl" as terra

workflow submit_sra {
    meta {
        description: "Submit reads to SRA"
        author: "Broad Viral Genomics"
        email:  "viral-ngs@broadinstitute.org"
        allowNestedInputs: true
    }

    input {
        Array[File]  reads_bams
        String       flowcell_id

        File         ncbi_ftp_config_js
        File         sra_meta_tsv
        String       sra_bioproject
        String       sra_data_bucket_uri

        String       prod_test = "Production" # Production or Test
    }

    String prefix = "/~{prod_test}/~{flowcell_id}"

    call terra.gcs_copy as gcs_sra_dump_reads {
        input:
            infiles        = reads_bams,
            gcs_uri_prefix = "~{sra_data_bucket_uri}/~{flowcell_id}/"
    }
    call ncbi_tools.sra_tsv_to_xml {
        input:
            meta_submit_tsv  = sra_meta_tsv,
            config_js        = ncbi_ftp_config_js,
            bioproject       = sra_bioproject,
            data_bucket_uri  = "~{sra_data_bucket_uri}/~{flowcell_id}"
    }
    call ncbi_tools.ncbi_sftp_upload as sra_upload {
        input:
            config_js        = ncbi_ftp_config_js,
            submission_xml   = sra_tsv_to_xml.submission_xml,
            additional_files = [],
            target_path      = "~{prefix}/sra",
            wait_for         = "1"
    }

    output {
        File          sra_xml            = sra_tsv_to_xml.submission_xml
        Array[File]   sra_response       = sra_upload.reports_xmls
    }
}