TITLE: Plant contig clustering based assembly (PLCL) pipeline: an efficient long-read assembly tool for plant chloroplast and mitochondrial genomes
AUTHORS: Kanae  Nishii

[DESCRIPTION]
Third generation NGS long-read sequences become popular for draft genome assembly. Here, we developed an efficient plant chloroplast assembly tool for whole genome assemblies from long-read datasets. This pipeline could be used also for mitochondrial genome assembly if the coverage is sufficiently high. The PLCL pipeline works on an assembled draft genome.

Summary of the PLCL pipeline

Step 1: Creating a blastn database of the draft genome assembly and search for target sequences
            (chloroplast or mitochondria) as the queries.
Step 2: Checking the coverage (mean depth) of each contig in the draft genome using minimap2 and samtools.
Step 3: Combining the results from step 1 (“blast_out.tsv”) and step 2 (“coverage.tsv”).
Step 4: Optional: k-means analyses for clustering the draft genome contigs with the Perl Algorithm::KMeans package.
Step 5: Optional: Visualizing blastn bitscore and samtoolscoverage data by R ggplot2.
Step 6: Selecting chloroplast contigs from the results of blastn, samtools coverage, and output of k-means analyses.
Step 7: Extracting the chloroplast / mitochondrial reads from the bam file created in step 2.
Step 8: Assembling reads into chloroplast / mitochondrial genomes.




[GUIDELINES]
This pipeline worked for Streptocarpus rexiichloroplast and mitochondrial genome assembly with Oxford Nanopore Technologies (ONT) long-read sequencing datasets. The pipeline was also tested with Arabidopsis thaliana and Orysa sativa long-read sequencing datasets, and the chloroplast genomes of these model plants were successfully assembled.

This protocol shows the details of the PLCL chloroplast genome assembly using Arabidopsis thaliana “KBS-Mac-74” ONT reads (ERR2173373; Michael et al. 2018).

Programs involved
SRA Toolkit (https://trace.ncbi.nlm.nih.gov/Traces/sra)
NanoPlot (De Coster et al. 2018)
Quast (Gurevich et al. 2013)
Samtools (Li et al. 2009)
Minimap2 (Li 2018)
NCBI BLAST+ (https://blast.ncbi.nlm.nih.gov)
Perl Algorithm-KMeans-2.05 (https://metacpan.org/pod/Algorithm::KMeans)
R ggplot2 (Wickham 2016)
Wtdbg2 (Ruan and Li 2020)
Canu (Koren et al. 2017)

Relevant References
De Coster, W., D'Hert, S., Schultz, D.T., Cruts, M. and Van Broeckhoven, C. (2018) NanoPack: visualizing and processing long-read sequencing data. Bioinformatics, 34, 2666-2669. [NanoPlot]
Gurevich, A., Saveliev, V., Vyahhi, N. and Tesler, G.,(2013) QUAST: quality assessment tool for genome assemblies. Bioinformatics 29, 1072-1075. [quast]
Koren, S., Walenz, B.P., Berlin, K., Miller, J.R., Bergman, N.H. and Phillippy, A.M. (2017) Canu: scalable and accurate long-read assembly via adaptive k-mer weighting and repeat separation. Genome Res.27, 722-736. [canu]
Li, H. (2018) Minimap2: pairwise alignment for nucleotide sequences. Bioinformatics34, 3094-3100. [minimap2]
Li, H., Handsaker, B., Wysoker, A., Fennell, T., Ruan, J., Homer, N., Marth, G., Abecasis, G., Durbin, R. and 1000 Genome Project Data Processing Subgroup (2009) The Sequence Alignment/Map format and SAMtools. Bioinformatics25, 2078-2079. [samtools]
Michael, T.P., Jupe, F., Bemm, F., Motley, S.T., Sandoval, J.P., Lanz, C., Loudet, O., Weigel, D. and Ecker, J.R. (2018) High contiguity Arabidopsis thaliana genome assembly with a single nanopore flow cell. Nat. Commun.9, 541.
Ruan, J. and Li, H. (2020) Fast and accurate long-read assembly with wtdbg2. Nat. Methods17, 155-158. [wtdbg2]
Wickham H. (2016) ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York. ISBN 978-3-319-24277-4, https://ggplot2.tidyverse.org. [ggplot2]





[STEPS]
SECTION: Pre-starting PLCL pipeline
1. Download data for Arabidopsis thaliana from NCBI and check their read quality.
SECTION: Pre-starting PLCL pipeline
2. Quality checking ONT reads with NanoPlot and visualize read length distribution using R ggplot2
SECTION: Pre-starting PLCL pipeline
1.1. Download ONT reads

 


 


SECTION: Pre-starting PLCL pipeline
3. Assembling a draft genome for Arabidopsis thaliana from ONT reads using e.g. wtdbg2 or canu

This example script uses wtdbg2.
SECTION: Pre-starting PLCL pipeline
1.2. Download reference chloroplast sequence
 

Click “FASTA” on the browser
From the drop down menu “FASTA”, select “FASTA(text)”
Copy and paste the sequence to a text editor
Save as “AtChloRef.fasta”
SECTION: Pre-starting PLCL pipeline
2.1. Checking the long-read quality with NanoPlot

a: NanoPlot standard output and automatic visualization

 

SECTION: Pre-starting PLCL pipeline
2.2. Checking the long-read quality with NanoPlot
b: NanoPlot raw output and manual visualization with R ggplot2

b-1: Store the raw data from NanoPlot


 

b-2: R visualization of read length distribution as histogram


 

SECTION: Pre-starting PLCL pipeline
3.1. Creating a lay file from raw reads


 

SECTION: Pre-starting PLCL pipeline
3.2. Generation of a draft genome assembly fasta file from a lay file

 

SECTION: Pre-starting PLCL pipeline
4. Optional: Assessing the draft genome assembly using Quast


 

SECTION: PLCL pipeline: Step 1
5. Creating a blastn database of the draft genome assembly and search for target sequences (chloroplast or mitochondria) as the queries.
SECTION: PLCL pipeline: Step 1
5.1. Generating a blastn database of draft genome assembly


 

SECTION: PLCL pipeline: Step 1
5.2. Searching for chloroplast contigs using blastn


 

SECTION: PLCL pipeline: Step 2
6. Checking the coverage (mean depth) of each contig in the draft genome using minimap2 and samtools
SECTION: PLCL pipeline: Step 2
6.1. Aligning raw ONT reads to the draft genome assembly using minimap2


 

SECTION: PLCL pipeline: Step 2
6.2. Calculating coverage with samtools


 

SECTION: PLCL pipeline: Step 3
7. Combining the results from step 1 (“blast_out.tsv”) and step 2 (“coverage.tsv”)
SECTION: PLCL pipeline: Step 3
7.1. In console, locate the “coverage.tsv” and “blast_out.tsv” files, and the “PLCL1.pl” script in the same folder and run:


 

 

SECTION: PLCL pipeline: Step 4
8. Optional: k-means analyses for clustering the draft genome contigs with the Perl Algorithm::KMeans package
SECTION: PLCL pipeline: Step 4
8.1. Locate “hitcontig_cov.u.csv” and “PLCL2.auto.pl” in the same folder and run:

 

 

SECTION: PLCL pipeline: Step 4
8.2. Locate “hitcontig_cov.u.csv” and “PLCL2.manual.pl” in the same folder and run:

 

 

SECTION: PLCL pipeline: Step 4
8.3. Combine the results of k means analyses to the “hitcontig_cov.u.csv” and save as “chlo_u.km.csv”



  
 
SECTION: PLCL pipeline: Step 5 (optional)
9. Visualizing blastn bitscore and samtools coverage data by R ggplot2

Plot the data "chlo_u.km.csv" from step 4 in R.


 

SECTION: PLCL pipeline: Step 6
10. Select chloroplast contigs from the results of blastn, samtools coverage, and k-means analyses.

Create a txt file of the list of contig name ("list.txt")

  

SECTION: PLCL pipeline: Step 7
11. Extracting the chloroplast / mitochondrial reads from the bam file created in step 2

Locate "list.txt" in the working directory ($PWD) and run the commands "read_extract.sh".


 

SECTION: PLCL pipeline: Step 8
12. Assembling reads into chloroplast / mitochondrial genomes