Project 1: SARS-CoV-2 genome assembly from Illumina reads
Project 1: SARS-CoV-2 genome assembly from Illumina reads Course: SARS-2 Bioinform tics & D t Science Abhin v Mishr 29th September 2023 a a a a a
Background
Background (perspective is import nt !) a
What’s it good for ?
What’s it good for ? Solutions Import nce • Lineage assignment • Genomic pro ling • Surveillance • Outbreak & Cluster • MSA & Phylogeny • Incidence estimation • Tracking the spread & evolution of the virus • Transmission patterns & outbreak detection • Identifying new variants & mutations • Monitoring the e ectiveness of vaccines • Development of targeted interventions a ff fi Source: Pg. 5, Martin Hölzer (Establishing SARS-CoV-2 Genomic Surveillance at the National Level)
Data
Data & Not tions Sample A Using 3 methods 6 Paired-end sequencing (PE) les e.g. date_internalid_sample_*R{1,2}*.fastq.gz reads 200408_20-04246_A_S1_L000_R1_001.fastq.gz fi a
Files : BED ✓ fastQ ✓
readme: ile description (2 iles per row) Date Sample MF2ID Method A 20-04246 CleanPlex SARS-CoV-2 IQ A Nextera Flex IQ A Nextera_XT NX Files : BED ✓ fastQ ✓ IQ = Illumina Iseq NX = Illumina NextSeq f f Sequencer
Goal
Goal Quality control Mapping Consensus sequence Lineage annotation Consensus QC
Methods
Methods (pipelines go cl nk !) a
Preliminary
Preliminary Step 1 • Installing environment manager: mamba=1.4.2 and conda=23.3.1 • Adding channels: conda con g - -add • Creating environment with tools : multiqc, fastqc, fastp, minimap2, samtools, bcftools, igv, pangolin, president, bamclipper, freebayes, vcftools, vc ib, ma t, bedtools, iqtree, jalview : mamba create -y -p • Activate & download data, unzip into PE: wget, tar -xvf • Download reference genome: esearch -db | efetch -format fasta > *.fasta ff fl fi
fastQC - quality control
fastQC - quality control Step 2 For each PE-group Basic Statistics: length, %GC ..etc. Per Base Sequence Quality: box plots Per Sequence Quality Scores Per Base Sequence Content Per Base + Sequence GC content Per Base N content Sequence length distribution Duplication level Overrepresented Sequences Adapter content fastqc -t 8 *…R1*.fastq.gz *…R2*.fastq.gz
fastp - preprocessing
fastp - preprocessing Step 3 fastp / --detect_adapter_for_pe / --overrepresentation_analysis / --correction --qualified_quality_phred 20 / overlap correction - base quality, >Q20 --cut_right --thread 8 / 5’->3’ : meanQ <20 (drop bases-stop) --html pair{1,2,3}.fastp.html / --json pair1.fastp.json -i *…R1*.fastq.gz *…R2*.fastq.gz / -o pair{1,2,3}.R1.clean.fastq.gz / -O pair{1,2,3}.R2.clean.fastq.gz / Run fastqc again compare reports (multiqc) + improvements
minimap2 - Mapping & igv - Visualisation
minimap2 - Mapping & igv - Visualisation Step 4 • aligning Illumina PE-reads with reference • sequence alignment program that aligns DNA • create .sam les alignment score ≥ 80 + 20,000 ≥ bandwidth ≥ 500 -o pair{1,2,3}/minimap2-illumina.sam / minimap2 -x sr -t 8 -a reference.fasta / pair{1,2,3}.R1.clean.fastq.gz / pair{1,2,3}.R2.clean.fastq.gz fi
bamclipper - Primer clipping
bamclipper - Primer clipping Step 5
bamclipper - Primer clipping
bamclipper - Primer clipping Step 5 1st Try ×
bamclipper - Primer clipping
bamclipper - Primer clipping Step 5 1st Try × Mapping from original les - converting .sam to .bam ≠ PE-reads .bed le fi fi
bamclipper - Primer clipping
bamclipper - Primer clipping Step 5 1st Try × Mapping from original les - converting .sam to .bam ≠ PE-reads .bed le 2nd Try × fi fi
bamclipper - Primer clipping
bamclipper - Primer clipping Step 5 1st Try × Mapping from original les - converting .sam to .bam ≠ PE-reads .bed le 2nd Try × Converting .bed le to .bam (bedtools bedtobam -g reference.fasta -i *.bed > *.bam) fi fi fi
bamclipper - Primer clipping
bamclipper - Primer clipping Step 5 1st Try × Mapping from original les - converting .sam to .bam ≠ PE-reads .bed le 2nd Try × Converting .bed le to .bam (bedtools bedtobam -g reference.fasta -i *.bed > *.bam) Converting .bam to .bedpe (bedtools bamtobed -bedpe -mate1 -i *bam > *.bedpe) fi fi fi
bamclipper - Primer clipping
bamclipper - Primer clipping Step 5 1st Try × Mapping from original les - converting .sam to .bam ≠ PE-reads .bed le 2nd Try × Converting .bed le to .bam (bedtools bedtobam -g reference.fasta -i *.bed > *.bam) Converting .bam to .bedpe (bedtools bamtobed -bedpe -mate1 -i *bam > *.bedpe) ≠ PE-reads .bam le from minimap2 fi fi fi fi
bamclipper - Primer clipping
bamclipper - Primer clipping Step 5 1st Try × Mapping from original les - converting .sam to .bam ≠ PE-reads .bed le 2nd Try × Converting .bed le to .bam (bedtools bedtobam -g reference.fasta -i *.bed > *.bam) Converting .bam to .bedpe (bedtools bamtobed -bedpe -mate1 -i *bam > *.bedpe) ≠ PE-reads .bam le from minimap2 fi fi fi fi
bamclipper - Primer clipping
bamclipper - Primer clipping Step 5
bamclipper - Primer clipping
bamclipper - Primer clipping Step 5 3rd Try ✓ Using cleanplex.amplicons.bedpe (Day 2 - hands-on), and checking di erence of locations bedtools pairtobed -a cleanplex.amplicons.bedpe -b *.bed -type neither FASTA header and ID match Perform primer clipping ff bamclipper.sh -b pair{1,2,3}/minimap2-illumina.sorted.bam -p SARSCoV2.amplicons.bedpe -n
freebayes - Variant calling
freebayes - Variant calling Step 6 • bayesian genetic variant detector - SNPs, indels, MNPs, complex events Input primerclipped.bam, reference.fasta Output .vcf le Parameters min-alternate-count (N reads in a sample support an allele) min-alternate-fraction (N fraction of observations in supporting an allele) min-coverage, pooled-continuous (number of samples in the pool) haplotype-length (short reads issue - avoid base quality recalibration ) fi
freebayes - Variant calling
freebayes - Variant calling Step 6 Bottlenecks Primer clipped sorted PE3-reads didn't had any variants so a quorum e ort was done that gave a lot of unknown detections ~ 245 after using report-monomorphic and pooledcontinuous parameters only. Interpret Iterate Naive variant calling i.e. simply annotate observation counts of SNPs and indels freebayes - - help : more insightful troubleshooting ff
freebayes - Variant calling
freebayes - Variant calling Step 6 Bottlenecks Primer clipped sorted PE3-reads didn't had any variants so a quorum e ort was done that gave a lot of unknown detections ~ 245 after using report-monomorphic and pooledcontinuous parameters only. Interpret Iterate Naive variant calling i.e. simply annotate observation counts of SNPs and indels freebayes - - help : more insightful troubleshooting ff
freebayes - Variant calling
freebayes - Variant calling Step 6 Bottlenecks Primer clipped sorted PE3-reads didn't had any variants so a quorum e ort was done that gave a lot of unknown detections ~ 245 after using report-monomorphic and pooledcontinuous parameters only. Interpret Iterate Naive variant calling loci which appear to be i.e. simply annotate observation counts of SNPs and indels monomorphic, and alleles, even those not present freebayes - - help : more insightful troubleshooting in called genotypes. ff
R/vcfR - masking & iltering
R/vcfR - masking & iltering Step 7 - understand and explore data with visualisation, quality control, and writing out the masked .vcf les *../pair{1,2,3}/freebayes-illumina.vcf *../pair{1,2,3}/masked-strict.vcf - annotation for each PE data for analysis and composite plots (variants, reads, bases) fi f fi - masking low-coverage region based on quality and depth (low con dence)
pangolin - Lineage Annotation
pangolin - Lineage Annotation Step 9 - dynamic nomenclature of SARS-CoV-2 lineages a.k.a. pangloin nomenclature, assigns most likely lineage (Pango lineage) to query sequences Source: https://cov-lineages.org/lineage_list.html
pangolin - Lineage Annotation
pangolin - Lineage Annotation Step 9 - dynamic nomenclature of SARS-CoV-2 lineages a.k.a. pangloin nomenclature, assigns most likely lineage (Pango lineage) to query sequences - updated routinely Source: https://cov-lineages.org/lineage_list.html
pangolin - Lineage Annotation
pangolin - Lineage Annotation Step 9 - dynamic nomenclature of SARS-CoV-2 lineages a.k.a. pangloin nomenclature, assigns most likely lineage (Pango lineage) to query sequences - updated routinely - always run update before using the tool Source: https://cov-lineages.org/lineage_list.html
president - Consensus QC
president - Consensus QC Step 10 - calculate pairwise nucleotide identity and reports ambiguous ’N’ Put all three consensus sequences in .fasta le. 2. Run with default setting on the multiple query FASTA sequences. 3. Output the valid + invalid .fasta, and report with PSL alignment columns. Aftermath 4. Create and visualise the progressive alignment using ma Create and visualise phylogenetic tree using iqtree and IROKI. fft fi and jalview.
Results
Results (to the point !)
FastQC: Sequence Counts Aligned Reads Aligned Reads - raw (%) - clean (%) Sample PE1.R1 PE1.R2 PE2.R1 PE2.R2 PE3.R1 PE3.
FastQC: Sequence Counts PE1.R1 Aligned Reads Aligned Reads - raw (%) - clean (%) Sample PE1.R2 PE2.R1 PE1.R1 PE1.R2 PE2.R1 PE2.R2 PE3.R1 PE3.R2 PE1.R1.clean PE1.R2.clean PE2.R2 PE3.R1 PE2.R2.clean PE3.R2 PE3.R1.clean PE2.R1.clean PE1.R2.clean 500k 1000k 1500k 2000k 2500k 3000k 3500k Number of reads Unique Reads Duplicate Reads Created with MultiQC
Raw reads Clean reads
Raw reads Low baseline => improved Clean reads
Raw reads Clean reads
Raw reads Low baseline => improved Clean reads
Raw reads Clean reads
Raw reads Low baseline => improved Clean reads
Raw reads Clean reads
Raw reads Clean reads QUAL > 20
Raw reads Clean reads QUAL > 20
Raw reads Clean reads QUAL > 20 Low baseline => improved
.vcf PE1 PE2 PE3
.vcf PE1 PE2 PE3
.vcf PE1 PE2 PE3 Supercontigs extremes
mask.vcf PE1 PE2 PE3
mask.vcf PE1 PE2 PE3
mask.vcf PE1 PE2 PE1 quality => normalised PE3
Read quality of PE1, PE2 and PE3: average quality per cycle of forward and reverse reads, and quality distributions
PE1 PE2 PE3
PE1 PE2 PE3
PE1 PE2 Remember the variant call ? PE3
PE1 PE2 PE3
PE1 PE2 PE3 Remember the variant call ? Unknown ? Monomorphic ? (hail mary attempt !!!)
PE1 PE2 PE3
PE1 PE2 PE3 Remember the variant call ? Unknown ? Monomorphic ? (hail mary attempt !!!) vcfR ✓
Variant plots for Illumina-PE2 along the genome: read depth, mapping quality, Phred-scaled quality, variants per site and nucleotide content
.g ile + annotated INFO for vcf
.g ile + annotated INFO for vcf f ff
lineage B.1 0.02 % ambiguous content (2 in 100 base pairs !)
lineage B.1 0.02 % ambiguous content (2 in 100 base pairs !) Consensus-Illumina-PE1 NC_045512.2 Consensus-Illumina-PE3 Consensus-Illumina-PE2 Cladogram (IROKI) query_name ConsensusIllumina-PE1 ConsensusIllumina-PE2 ConsensusIllumina-PE3 ACGT Nucleotide identity ACGT Nucleotide identity (ignoring Ns) ACGT Nucleotide identity (ignoring non-ACGTNs) qc_all_valid TRUE TRUE TRUE qc_post_align_pass_threshold TRUE TRUE TRUE qc_post_aligned TRUE TRUE TRUE qc_post_aligned_all_valid TRUE TRUE TRUE qc_valid_length TRUE TRUE TRUE qc_valid_nucleotides TRUE TRUE TRUE qc_valid_pass_nthreshold TRUE TRUE TRUE acgt_bases iupac_bases non_iupac_bases N_bases length_query length_reference LongestNGap Matches Mismatches PSL_Mismatches PSL_Ns
lineage B.1 0.02 % ambiguous content (2 in 100 base pairs !)
lineage B.1 0.02 % ambiguous content (2 in 100 base pairs !) Outgroup Taxon Consensus-Illumina-PE1 NC_045512.2 Consensus-Illumina-PE3 Consensus-Illumina-PE2 Cladogram (IROKI) query_name ConsensusIllumina-PE1 ConsensusIllumina-PE2 ConsensusIllumina-PE3 ACGT Nucleotide identity ACGT Nucleotide identity (ignoring Ns) ACGT Nucleotide identity (ignoring non-ACGTNs) qc_all_valid TRUE TRUE TRUE qc_post_align_pass_threshold TRUE TRUE TRUE qc_post_aligned TRUE TRUE TRUE qc_post_aligned_all_valid TRUE TRUE TRUE qc_valid_length TRUE TRUE TRUE qc_valid_nucleotides TRUE TRUE TRUE qc_valid_pass_nthreshold TRUE TRUE TRUE acgt_bases iupac_bases non_iupac_bases N_bases length_query length_reference LongestNGap Matches Mismatches PSL_Mismatches PSL_Ns
Interpretation
Interpretation Summ ry B.1 is a large European lineage the origin of which roughly corresponds to the Northern Italian outbreak early in 2020. (Earliest date: 2020-01-01) 2. United States of America 46.0%, Turkey 11.0%, United Kingdom 6.0%, Canada 4.0%, France 3.0% a Source: https://cov-lineages.org/lineage_list.html
Conclusion
Conclusion Which data set achieved the best consensus sequence ? Based on the coverage, aligned reads, quality, depth plots along with quality control of consensus sequences (PE1) Paired End read les for fi 200408,A,20-04246,CleanPlex SARS-CoV-2,IQ
Fun project! Thanks !
Fun project! Thanks ! (~ 64 hours *_*)
References
References 1. bamstats.pl script, 2012-2014 Genome Research Ltd (Author: Petr Danecek <pd3@sanger.ac.uk>) 2. Anon, 2020. Anaconda Software Distribution, Anaconda Inc. Available at: https://docs.anaconda.com/. 3. Philip Ewels, Måns Magnusson, Sverker Lundin, Max Käller, MultiQC: summarize analysis results for multiple tools and samples in a single report, Bioinformatics, Volume 32, Issue 19, October 2016, Pages 3047–3048, https://doi.org/10.1093/bioinformatics/btw354 4. Andrews, S. (2010). FastQC: A Quality Control Tool for High Throughput Sequence Data [Online]. 5. Shifu Chen, Yanqing Zhou, Yaru Chen, Jia Gu, fastp: an ultra-fast all-in-one FASTQ preprocessor, Bioinformatics, Volume 34, Issue 17, September 2018, Pages i884–i890, https://doi.org/10.1093/ bioinformatics/bty560
16. Petr Danecek, Adam Auton, Goncalo Abecasis, Cornelis A. Albers, Eric Banks, Mark A. DePristo, Robert E. Handsaker, G
16. Petr Danecek, Adam Auton, Goncalo Abecasis, Cornelis A. Albers, Eric Banks, Mark A. DePristo, Robert E. Handsaker, Gerton Lunter, Gabor T. Marth, Stephen T. Sherry, Gilean McVean, Richard Durbin, 1000 Genomes Project Analysis Group, The variant call format and VCFtools, Bioinformatics, Volume 27, Issue 15, August 2011, Pages 2156–2158, https:// doi.org/10.1093/bioinformatics/btr330 17. Waterhouse, A.M., Procter, J.B., Martin, D.M.A, Clamp, M., Barton, G.J (2009), "Jalview version 2: A Multiple Sequence Alignment and Analysis Workbench,” Bioinformatics 25 (9) 1189-1191 doi: 10.1093/bioinformatics/btp033 18. Nguyen, L. T., Schmidt, H. A., von Haeseler, A., & Minh, B. Q. (2015). IQ-TREE: a fast and effective stochastic algorithm for estimating maximum-likelihood phylogenies. Molecular biology and evolution, 32(1), 268–274. https://doi.org/10.1093/ molbev/msu300 f 19. Bui Quang Minh, Heiko A Schmidt, Olga Chernomor, Dominik Schrempf, Michael D Woodhams, Arndt von Haeseler, Robert Lanfear, IQ-TREE 2: New Models and Ef icient Methods for Phylogenetic Inference in the Genomic Era, Molecular Biology and Evolution, Volume 37, Issue 5, May 2020, Pages 1530–1534, https://doi.org/10.1093/molbev/msaa015
Credits
Credits The used Pg. 8 template for work low is from slidesgo 2. This presentation was made on Keynote version 13.2 3. The data iles were provided by instructors 4. The project is available on google drive here. It will be there until formatted into a repo on GitHub. f f 5. Available: https://github.com/bibymaths/SARSCoV2
Device Info
Device Info Post An lysis OS Fedora Linux 38 Kernel Linux 6.4.15-200.fc38.x86_64 Processor Intel i5-8250U (8 slots), with CUDA support Graphics UHD 620 (KBL GT2) Memory 8 GB I uploaded the whole project folder to google drive, for transferring data to Mac and used Google Takeout to download the folder in .tgz format. While making the zipped le, google adds the information about les, and directories, so we need to delete them. Also, using the QualMap tool, it creates meta-data and replicated les so we need to delete them as well. fi fi fi a