TITLE: High-throughput SARS-CoV-2 and host genome sequencing - alignment protocol 
AUTHORS: Christopher Hughes

[DESCRIPTION]
<div class = "text-blocks"><div class = "text-block">This protocol is designed to perform alignment on low-coverage (0.5x - 3x) whole-genome human sequences from Illumina MiSeq and NovaSeq platforms. This protocol was derived from two previously validated alignment and variant calling pipelines:</div><div class = "text-block">Nextflow:</div><div class = "text-block">nf-core/sarek 2.5.2</div><div class = "text-block">https://github.com/nf-core/sarek</div><div class = "text-block"><span>Garcia M, Juhos S, Larsson M et al. Sarek: A portable workflow  for whole-genome sequencing analysis of germline and somatic variants  [version 1; peer review: awaiting peer review]</span><span style = "font-weight:bold;">.</span><span>. </span><span style = "font-style:italic;">F1000Research</span><span> 2020, 9:63. </span><a href="https://f1000research.com/articles/9-63/v1" style = "text-decoration:underline;color:blue;cursor:pointer;"><span style = ":;">doi: 10.12688/f1000research.16665.1</span></a><span style = ":;">.</span></div><div class = "text-block">and</div><div class = "text-block">WDL + GATK4:</div><div class = "text-block">gatk4-genome-processing-pipeline</div><div class = "text-block"><a href="https://github.com/gatk-workflows/gatk4-genome-processing-pipeline" style = "text-decoration:underline;color:blue;cursor:pointer;"><span style = ":;">https://github.com/gatk-workflows/gatk4-genome-processing-pipeline</span></a></div><div class = "text-block"><span>Poplin, R. </span><span style = "font-style:italic;">et al.</span><span> Scaling accurate genetic variant discovery to tens of thousands of samples. </span><span style = "font-style:italic;">bioRxiv</span><span> 201178 (2017). doi:10.1101/201178</span></div><div class = "text-block">Protocol image adapted (removed indel realignment step) from Figure 1 of Poplin, R. et al (2017). </div><div class = "text-block">What this pipeline does:</div><div class = "text-block">1. Performs quality check of demultiplexed FASTQ data</div><div class = "text-block">2. Aligns and maps FASTQ to the human reference</div><div class = "text-block">3. Marks duplicates in the alignments</div><div class = "text-block">4. Recalibrates base quality using known variants</div><div class = "text-block">5. Creates an index for the .BAM file</div><div class = "text-block">6. Validates the .BAM file for any errors</div><div class = "text-block">7. Calculates coverage per contig, .BAM file statistics, and plots those statistics</div><div class = "text-block">Inputs:</div><div class = "text-block">Demultiplexed FASTQ files for a single sample for one or multiple lanes</div><div class = "text-block">Outputs:</div><div class = "text-block">Aligned, de-deduped, recalibrated, QC'd BAM file</div><div class = "text-block">Coverage statistics and plots</div><div class = "text-block">BAM statistics and plots</div><div class = "text-block">FASTQ statistics and plots</div></div>

[STEPS]
?. [Alignment]
The pipeline is broken into two steps: alignment and recalibration. First, alignment is performed using the alignment.sh script:
?. [Recalibration]
After each lane for the sample has been aligned, the .bams are merged, duplicates are marked and base recalibration is performed using recalibration.sh:
?. [SLURM Submission]
An example script of how each sample is submitted to SLURM:
?. [MultiQC Report]
MultiQC is a tool that allows for aggregation of several output reports from each sample. We use MultiQC to generate reports for all of our samples by navigating to the parent directory and running the command:
?. [MultiQC Report]
A configuration file is used to generate the MultiQC report. This .yaml should be saved in the home directory as multiqc_config.yaml: Expected output: