%%{init: {'theme': 'base', 'themeVariables': { 'lineColor': '#404040'}}}%%

        %% GenPipes Schema for dnaseq.py
        %% Ref: https://bitbucket.org/mugqic/genpipes/src/master/pipelines/dnaseq_high_coverage/
        %% Author Shaloo Shalini <shalz@hotmail.com>
        %% -t germline_high_cov


        graph LR
        Node1{{ 1. <br/> Picard <br/>SAM <br/>to FASTQ }}:::nodefill
        Node2{{ 2. <br/> Skewer <br/>Trimming }}:::nodefill
        Node3{{ 3. <br/> BWA <br/>SAMbamba <br/>sort <br/>SAM }}:::nodefill
        Node4{{ 4. <br/> SAMbamba <br/>merge <br/>SAM <br/>files }}:::nodefillblack
        Node5{{ 5. <br/> GATK <br/>indel <br/>re-aligner }}:::nodefill
        Node6{{ 6. <br/> SAMbamba <br/>merge <br/>realigned }}:::nodefillblack
        Node7{{ 7. <br/> Picard <br/>Fixmate }}:::nodefill
        Node8{{ 8. <br/> Metrics }}:::nodefill
        Node9{{ 9. <br/> Picard <br/>Calculate <br/>HS Metrics  }}:::nodefill
        Node10{{ 10. <br/> GATK <br/>Callable <br/>Loci }}:::nodefill
        Node11{{ 11. <br/> Call <br/>Variants }}:::nodefill
        Node12{{ 12. <br/> Preprocess <br/> VCF }}:::nodefill
        Node13{{ 13. <br/> SNP<br/>Effect }}:::nodefill
        Node14{{ 14. <br/> Gemini <br/>Annotations }}:::nodefill
        Node15{{ 15. <br/> Cram <br/>Output }}:::nodefill

        Input1[[fa:fa-file-archive-o .BAM]]
        Input2[[fa:fa-file-archive-o .FASTQ]]

        MetricsOP([fa:fa-sticky-note-o Report ])
        PHMetricsOP([fa:fa-sticky-note-o Report ])
        GemOP([fa:fa-sticky-note-o Report ])
        CramOP([fa:fa-sticky-note-o Report ])

        Input1 --> Node1 -.-> Node2
        Input2 --> Node2

        Node2 -.-> Node3 -.-> Node4 -.-> Node5 -.-> Node6
        Node4 -.-> Node15
        Node5 -.-> Node7
        Node7 -.-> Node8 & Node9 & Node10 & Node11
        Node8 -.-> Node9
        Node11 -.-> Node12 -.-> Node13 -.-> Node14

        Node8 --> MetricsOP
        Node9 --> PHMetricsOP
        Node14 --> GemOP
        Node15 --> CramOP

        subgraph readSetSteps[" "]
          Node1
          Node2
          Node3
        end
        subgraph sampleSetSteps[" "]
          Node5
          Node6
          Node7
          Node8
          Node9
          Node10
          Node11
          Node12
          Node13
          Node14
          Node15

          MetricsOP
          PHMetricsOP
          GemOP
          CramOP
        end

        classDef greenRect fill:#E4FBF4,stroke:white
        class readSetSteps greenRect
        classDef blueRect fill:#DEF6FC,stroke:white
        class sampleSetSteps blueRect
        classDef nodefill fill:#ffffff,stroke:gray,stroke-width:2px
        classDef nodefillblack fill:black,stroke:black,color:white,stroke-width:2px
