Download presentation
Presentation is loading. Please wait.
1
Pre-assembly analyses
Facility manager, SciLifeLab Bioinformatics Long-term Support (a.k.a WABI) Credits to Doug Scofield, Nat Street, Francesco Vezzi, Amaryllis Vidali, Andrea Zuccolo and others!
2
Two types of assemblies
Case 1 : Flycatcher (1.2 Gbp) Herring (800 Mbp) Malassezia (7 Mbp)
3
Two types of assemblies
Case 1 : Flycatcher (1.2 Gbp) Herring (800 Mbp) Malassezia (7 Mbp) Case 2 : Spruce (20 Gbp) Barnacle (1.4 Gbp) Wolbachia (4 Mbp)
4
Just a word on N50… N50 typically refers to a contig (or scaffold) length But… The original definition is the number of contigs needed to reach half of the genome size (L50 is the length) Many programs use the total assembly size as a proxy for the genome size; this is sometimes completely misleading: Use NG50! PI:s don’t understand N50 anyway; use something more intuitive : - contigs larger than 1 kbp sum to 93% of the genome size - contigs larger than 10 kbp sum to 48% of the genome size - contigs larger than 100 kbp sum to 19% of the genome size N50 NG50 Assembly size Genome size Genome Assembly 3 contigs 100 kbp 5 contigs 30 kbp
5
Why is it hard?
6
The devil is in the repeats
Mathematically best result: C R A B
7
Repeat errors Collapsed repeats Overlapping non-identical reads
and chimeras Overlapping non-identical reads Wrong contig order Inversions
8
It’s getting worse A: ATCGGGTATATAG-CCTA ||||||| || || |||| B:
ATCGGGTGTACAGCCCTA A ? A & B B
9
…and humans are easy. Bacteria, archaea, fungi, some plants Most animals, some plants Many plants Also: Heterozygozity is generally very low in mammals; most other species are much harder
10
Pre assembly Quality trimming (Error correction) Kmer analysis
De novo repeat library
11
Quality trimming DeBruijn-graph assemblers are in principle sensitive to errors since they do not take base quality values into account Trim adapters (e.g. Cutadapt) Filter on quality, both 5’ and 3’ end! (e.g. Trimmomatic) Consider hard-trimming of 5’ end Error correction (e.g. Quake) Inspect (e.g. FastQC) Plots by Olof Karlberg
12
Reads vs kmers …….. 1 read: 100 bp Kmers: k=21bp N= (L – k + 1)
(100bp – 21 bp + 1) 80 …….. Base coverage * (L-k+1) = Kmer coverage L Ex: 50X * ( ) = 40X (i.e. kmer coverage is 80% of base coverage) 100
13
Kmer analyses Compute the frequency of each kmer in the dataset
(e.g. Jellyfish --both-strands) Note: RAM-intense!
14
Digging into the kmers Genome size Remove low-copy kmers
Identify the coverage peak Divide total nb of kmers by peak “Cpeak 20 million distinct kmers occure 55 times in all reads combined” Genome size = Ktot/Cpeak Here: 1.4 Gbp = 80 G / 55 Note: Ktot = Nb reads * (L-k+1) Base coverage = Cpeak (L-k+1)/L Here: 69X = (100 – 21 +1)/100
15
Repeats: first shot The nb of distinct kmers in the single-copy peak corresponds roughly to the single-copy genome size Single-copy Example Beetle: 0.75 Gbp is single-copy, so almost 40% of the 1.2 Gbp genome is repeated (kmer=27) Repeats
16
Heterozygocity Double peak in the kmer histogram; clear indication of heterozygocity Not entirely easy to quantify (although attempts have been made)
17
A word on quality filtering…
Light QC filter Hard QC filter
18
Repeat library and repeat quantification
Create a de novo repeat library Run a low-coverage (e.g. 0.1X) assembly (e.g. RepeatExplorer or Trinity) Filter contaminants and mito/chloro [ Make non-redundant (e.g. Cdhit) ] Quantify the (high) repeat content by an independent subset of reads - Mapping (e.g. bwa), or - Mask with RepeatMasker
19
Repeat library from low coverage data
Sparse seq data Overlaps?
20
Repeat library from low coverage data
Sparse seq data Overlaps? Assembled contigs
21
Repeat library from low coverage data
Sparse seq data Overlaps? Assembled contigs Warning! Beware of contaminations, plastids etc
22
Quantify your repeat seqs
Independent set of sparse data Screen reads with repeat seqs 33% of all bases in the reads are covered by repeat seqs 33% of the genome is “repeated” Warning! The quantification depends heavily on the size of the original read set
23
Classifying repeats LTR Gypsy/Copia LINE/SINE Getting tricky…
DNA elements … Getting tricky… Classifying the repeat library directly RepeatMasker Repeat protein domain serach ( Problems No close homologs in databases Rapid evolution of repeats (like transposable elements) Non-autonomous TE:s do not contain proteins Solutions Fetch intact ORF:s from hits in assembly Extend assembly matches and get more complete elements Check match alignment profiles in assembly (LINES conserved at 3’ end but not at 5’..) => Often slow, manual, species-specific solutions
24
Take home Genome assembly is sometimes reasonably easy, if you are lucky and not too picky. There are tools to indicate which one you are up against. Adapters and quality trimming is a pain in the neck. But you should probably do it. Unless you use ALLPATHS-LG Genome size and repeat content can (often better!) be estimated without an assembly
25
Thanks
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.