TITLE: Running the Titan_ONT Workflow on Terra.bio
AUTHORS: Francis J Ambrosio, Jill V Hagey, Kevin  Libuit, Technical  Outreach and Assistance for States Team

[DESCRIPTION]
The Titan_ONT workflow is a part of the Public Health Viral Genomics Titan series for SARS-CoV-2 genomic characterization. Titan_ONT was written specifically to process basecalled and demultiplexed Oxford Nanopore Technology (ONT) read data. Input reads are assumed to be the product of sequencing ARTIC V3 tiled PCR-amplicons designed for the SARS-CoV-2 genome. Upon initiating a Titan_ONT run,  input read data provided for each sample will be processed to perform consensus genome assembly, infer the quality of both raw read data and the generated consensus genome, and assign lineage or clade designations as outlined in the Titan_ONT data workflow diagram below.

Additional technical documentation for the Titan_ONT workflow is available at:
https://public-health-viral-genomics-theiagen.readthedocs.io/en/latest/titan_workflows.html#titan-workflows-for-genomic-characterization

  

Required input data for Titan_ONT:
Basecalled and demultiplexed ONT read data files (single FASTQ file per sample)
Primer sequence coordinates of the PCR scheme utilized in BED file format
Titan_ONT has not been written to process FAST5 files

Video Instruction:
Theiagen Genomics: Titan Genomic Characterization
https://www.youtube.com/watch?v=zP9I1r6TNrw

Theiagen Genomics: Titan Outputs QC
https://www.youtube.com/watch?v=Amb-8M71umw

For technical assistance please contact us at: TOAST@cdc.gov


[STEPS]
SECTION: Running the Titan_ONT Workflow
1. To run the Titan_ONT workflow click on the 'Workflows' panel in the newly created workspace. It should bring you to your workflow page.  Click on the 'Titan_ONT' tile to bring up the Titan_ONT assembly workflow page (if you do not see the Titan_ONT workflow in your workspace, please see our video on importing a workflow to Terra.bio: https://youtu.be/ZRpQylIDMzo)

 
This will bring up the Titan_ONT workflow page:   

  
Select the version of the workflow you would like to run. Double check that you are using the latest version of the workflow. Alternately, you may specify another version, but should only pick a stable version (with numbers) NOT a 'main' or 'dev' version. Preferably the latest version. 

  
Ensure that "Run workflow(s) with inputs defined by data table" is selected. Select the root entity type for the data you wish to analyze. If you would like to check for previous runs using the same inputs and configuration, check the "Use call caching" box.

NOTE: Call caching allows Terra to identify and skip jobs that have been run previously; this option is by default enabled to avoid unnecessary compute costs. More information on Terra call caching, including examples of when you may want to disable this feature, is available through the Terra Support Documentation. 


   
Click "SELECT DATA" and choose the samples you wish to analyze

     
Complete the INPUTS form with the appropriate attributes (if you have not yet uploaded any data to Terra.bio, please see our video on uploading ONT reads: https://youtu.be/XKNFMj8ic1k)

The top two rows of inputs represent variables that have to be provided by the user. This was the information that we populated the sample data table with in the previous step. 

In our example, for the first row, the 'demultiplex_reads' variable, we clicked on the 'Attribute' text box and wrote 'this.reads' to indicate that the 'demultiplex_reads' we wish to analyze are under the 'reads' column of our selected datatable. In the second row we input our primer_bed file of choice, which should be saved as a workspace element in Terra (if you do not have this saved as a workspace element please see our video on uploading a workspace element: https://youtu.be/Qrbz7uRtwmQ). In the third row, the 'samplename' variable, we selected on the 'Attribute' text box and wrote 'this.ont_specimen_id' to indicate the 'samplename' of each sample we are analyzing can be found in the `this.ont_specimen_id' column of our selected datatable. 

NOTE: If you named your columns something other than reads then just type "this." followed by whatever the column name is. We would advise naming your reads column "reads" for clarity.

  
Once your input form is complete, move on to the OUTPUTS form and select "Use Defaults'. Terra will then populate the OUTPUTS form with all of the default outputs options generated by the workflow. If you forget to do this you won't have easily accessible results! Save these changes by clicking the 'Save' button.

   
Once your INPUTS and OUTPUTS forms are complete, click the 'Save' button on the top right-hand side of the page. The yellow caution icons should disappear and the Run Analysis option should be made available. 


    
You are now ready to run the Titan_ONT workflow! Click on the 'Run Analysis' button to the right of the 'Outputs' tab. A popup window should appear titled 'Confirm launch'. If the 'Run Analysis' button is greyed out, you need to save your recent changes by clicking the 'Save' button. 

   
Clicking the 'Launch' button should bring you to the 'Job History' panel where each sample will be queued for the Titan ONT analysis. The status will change from queued to submitted to running.