TITLE: Instructions for recreating elPrep 4.0.0 WGS benchmarks
AUTHORS: Charlotte Herzeel

[DESCRIPTION]
<div class = "text-blocks"><div class = "text-block">Instructions for recreating the elPrep4.0.0 WGS benchmarks used in the following paper:</div><div class = "text-block">Herzeel C, Costanza P, Decap D, Fostier J, Verachtert W. elPrep: A multithreaded framework for sequence analysis. BioRxv https://doi.org/10.1101/492249  </div></div>

[STEPS]
?. Configuration1.1 Hardware1.2 Software
These instructions have been tested with elPrep v.4.0.0. The following assumes that everything is performed from a working directory WORKDIR.
* 2x18-core Intel Xeon processor E5-2699v3 Haswell @ 2.3GHz* 256 GB RAM* 2x400 GB SSD
* Ubuntu 14.04.5 LTS* elPrep 4.0.0
?. Installation
The following steps are required to run elPrep:1. Download the elPrep binary distribution from https://github.com/ExaScience/elprepDirect download link: https://github.com/ExaScience/elprep/releases/download/v4.0.0/elprep-v4.0.0.tar.gz  2. mdkir elprep-v4.0.0 3. mv elprep-v4.0.1.tar.gz elprep-v4.0.04. cd elprep-v4.0.05. tar xvf elprep-v4.0.0.tar.gz6. PATH=$WORKDIR/elprep-v4.0.0:$PATH
?. Data preparation3.1 Required tools3.2 Required data3.3 Data preparation steps3.3.1 Create the reference index3.3.2 Clean up the FASTQ files3.3.3 Align the FASTQ files to create a BAM file3.3.4 Create the hg38 elfasta file3.3.5 Create elsites files from vcf files
Our WGS benchmark uses the public data provided by Illumina (https://www.illumina.com/platinumgenomes.html). This data consists of unaligned FASTQ files, which can be downloaded from the European Nucleotide Archive (https://www.ebi.ac.uk/ena/data/view/PRJEB3381). The following steps describe how to download, prepare, and align the data using BWA mem (version 0.7.17). Similarly, our benchmark requires the reference genome and databases with known SNPs to be converted into elPrep-specific formats. The following steps also describe how to download the data from public repositories and creating the elPrep-specific conversions.
1. Ensure GCC installed (version 4.8.4 recommended)2. Download BWA source code from https://github.com/lh3/bwa Direct link: https://github.com/lh3/bwa/releases/download/v0.7.17/bwa-0.7.17.tar.bz23. tar xvf bwa-0.7.17.tar.bz24. cd bwa-0.7.175. make6. cd $WORKDIR
The FASTQ files at the ENA provide the Illumina sequence identifiers only as comments, but for optical duplicate marking to be done properly in elPrep, Picard, and GATK, they need to be used as actual sequence identifiers in the FASTQ files before they are aligned with BWA mem. This can be arranged with a small tool we provide (https://github.com/ExaScience/correct-platinum-fastq-sequence-identifier) or another tool.Download and install our tool for fixing FASTQ read names. These instructions assume you have a working Golang installation (see https://golang.org/doc/install):1. go get github.com/ExaScience/correct-platinum-fastq-sequence-identifier2. go build github.com/ExaScience/correct-platinum-fastq-sequence-identifier
FASTQ files* Download Illumina Platinum whole-genome NA12878 FASTQ files from https://www.ebi.ac.uk/ena/data/view/PRJEB3381Direct links: ftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERR194/ERR194147/ERR194147_1.fastq.gzftp://ftp.sra.ebi.ac.uk/vol1/fastq/ERR194/ERR194147/ERR194147_2.fastq.gzReference files* Download the hg38 reference files from http://lh3.github.io/2017/11/13/which-human-reference-genome-to-useDirect link:ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/000/001/405/GCA_000001405.15_GRCh38/seqs_for_alignment_pipelines.ucsc_ids/GCA_000001405.15_GRCh38_no_alt_analysis_set.fna.gz
Known variants* Download the database with known SNPs from https://software.broadinstitute.org/gatk/download/bundleDirect links:ftp://gsapubftp-anonymous@ftp.broadinstitute.org/bundle/hg38/Mills_and_1000G_gold_standard.indels.hg38.vcf.gzftp://gsapubftp-anonymous@ftp.broadinstitute.org/bundle/hg38/dbsnp_138.hg38.vcf.gzWhen attempting a download, this may result in an error message that the login is incorrect. This is because the ftp site only allows a maximum of 25 users at the same time. If this happens, try again.
?. Benchmarking elPrep
elPrep provides a lot of filtering options. The following benchmark implements a pipeline that executes the following four steps:1. Sorting by coordinate order (equivalent to, for example https://software.broadinstitute.org/gatk/documentation/tooldocs/current/picard_sam_SortSam.php)2. Marking PCR and optical duplicates (equivalent to, for example, https://software.broadinstitute.org/gatk/documentation/tooldocs/current/picard_sam_markduplicates_MarkDuplicates.php)3. Base quality score recalibration (equivalent to, for example, https://software.broadinstitute.org/gatk/documentation/tooldocs/current/org_broadinstitute_hellbender_tools_walkers_bqsr_BaseRecalibrator.php)4. Applying base quality score recalibration (equivalent to, for example, https://software.broadinstitute.org/gatk/documentation/tooldocs/current/org_broadinstitute_hellbender_tools_walkers_bqsr_ApplyBQSR.php)Please see the elPrep documentation at https://github.com/ExaScience/elprep for further filtering options.