TITLE: Long-read plant genome assembly and annotation: quality assessment
AUTHORS: Scott  Ferguson, Ashley  Jones, Justin  Borevitz

[DESCRIPTION]
With the introduction of long-read, third generation sequencing (e.g. Oxford Nanopore Technologies (ONT) and Pacific Biosciences (PacBio) and associated bioinformatics tools, we can now affordably assemble complex plant genomes with an accuracy and contiguity that was previously incredibly expensive to obtain. Long-read sequencing technology has dramatically improved our ability to generate de novo genome assemblies. In particular plant genomes, due to their large proportion of repetitive sequences, have highly benefited from long-read sequencing. Despite these improvements, challenges still remain in performing de novo assembly, namely in developing a reliable workflow and in tool choice. Here we present the assembly quality assessment proportion of our long-read plant genome assembly, scaffolding, and annotation workflow. We have developed and tested this workflow on many complex plant genomes. By using this workflow with a sufficient coverage of long-reads, a highly contiguous and accurate plant genome can be assembled.

[STEPS]
SECTION: Genome quality assessment
1. Having assembled a genome we want to assess how good it is. The three major considerations here are contiguity, accuracy and completeness.

Contiguity we can assess with numerical statistics: 
N50.
E-size.
number of sequences.
N50 and E-size are both ways of trying to express genome contiguity in a single easy to read number. E-size is a better metric but N50 is much more used. A much better way of showing your genome contiguity is with a histogram of sequence sizes, but this is harder to read and communicate.

For more infomation on E-Size see:
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3290791/
http://lh3.github.io/2020/04/08/a-new-metric-on-assembly-contiguity

Accuracy and completeness we measure with:
BUSCO.
LAI.
BUSCO checks your genome for highly conserved single copy lineage specific genes. Having discovered all BUSCO genes within your genome, this static reports on what percent of these genes have been: found, not-found, duplicated, and fragmented within your assembly. Better genomes have a high percent of single copy genes. LAI scores the proportion of LTR sequences in the genome that are intact, higher is better. To get a feel for this value you will need to read papers that cite this tool and report the genome LAI.

SECTION: N50
2. Save these commands to N50.sh, make executable, and add to path or place in a directory included in your path. This script works with the .genome file type, see "Long read  genome assembly - Step 2".

To calculate the N50 of a fasta/q file:
gne-file.sh XXX.fasta
N50.sh XXX.genome
 

SECTION: E-size
3. Save these commands to ESize.sh, make executable, and add to path or place in a directory included in your path. To calculate E-size call E-size.sh genome.fasta

Save these commands to E-size.sh, make executable, and add to path or place in a directory included in your path. This script works with the .genome file type, see "Long read  genome assembly - Step 2".

To calculate the E-size of a fasta/q file:
gne-file.sh XXX.fasta
E-size.sh XXX.genome
 


SECTION: BUSCO
4. To run BUSCO you will need to first download the lineage specific BUSCO set for your species from https://busco-data.ezlab.org/v4/data/lineages/.

Note: newer versions of BUSO will auto download gene sets, but we manually download ours so that we can save them to appropriate disk space. If you use the auto download within BUSCO your commands will be different, see https://busco.ezlab.org/.
 


SECTION: LAI
5. 
 

SECTION: Validation reads
6. An additional quality check we like to perform is to align our unused long reads to our finalised genome and look at the mapping percent and quality. A very high proportion of reads will align with good quality scores to a high quality genome.

The validation read set is made from all reads not used in assembly with an average quality score of 7 or greater. We don’t wish to align low quality reads as these will not align well due to sequencing errors and be a poor indicator of genome quality.
 

SECTION: Validation reads
7. Align validation reads to genome and validate alignment quality with Qualimap.
 
Qualimap will produce a pdf formatted report. Use this to get statistics on
number of reads
mapped reads
unmapped reads
average coverage
standard deviation of coverage
mean mapping quality

These statistics can be used to assess genome quality. Average coverage should ~= read coverage (to calculate see below), and the proportion and quality of mapping should be high.