Presentation is loading. Please wait.

Presentation is loading. Please wait.

Assembly Kristoffer H. Ring INF-BIO5121. Task 1.2 – Velvet assembly Was planning to use VelvetOptimiser to determine the optimal kmer size, however, this.

Similar presentations


Presentation on theme: "Assembly Kristoffer H. Ring INF-BIO5121. Task 1.2 – Velvet assembly Was planning to use VelvetOptimiser to determine the optimal kmer size, however, this."— Presentation transcript:

1 Assembly Kristoffer H. Ring INF-BIO5121

2 Task 1.2 – Velvet assembly Was planning to use VelvetOptimiser to determine the optimal kmer size, however, this was not available on the course server. Therefore, I took advantage of the multiprocessing capability on abel: #Building hash tables using 39 different hash lengths, k=21-99: bash-4.1$ velveth auto 21,99,2 -fastq -shortPaired -separate../Sample280_1.fastq../Sample280_2.fastq #Submitting the velvetg-jobs to Abel (building the graphs)./run_velvet.sh

3 Submit.sh

4 #Greping N50-values from the auto_X/log-files and plotting the results using Python: -bash-4.1$ python plot.py auto_*

5 -bash-4.1$ python plot.py auto_* Best k = 75 Best n50 = 119377 However, k=65 and 69 might be good candidates as well.

6 -bash-4.1$ velveth asm1 75 -fastq -shortPaired -separate \../Sample280_1.fastq../Sample280_2.fastq \ -bash-4.1$ velvetg asm1 -exp_cov auto -cov_cutoff auto K=75 might be a good kmer size. The following commands were used to create assembly asm1: Ran assemblathon_stat.pl on the asm1 to judge the assembly: bash-4.1$ assemblathon_stat.pl -s 5.4 contigs.fa > metrics_asm1.txt Most relevant metrics:

7 Task 1.3 – Velvet assembly with mate pair reads Used the same approach as for the pair end reads (task 1.2) #Building the hash indices using velveth for k=21-99: bash-4.1$ velveth asm 21,99,2 -fastq -shortPaired -separate \../Sample280_1.fastq../Sample280_2.fastq \ -shortPaired2 -separate -fastq \../TY2482_6kb_1_50x_RC.fq../TY2482_6kb_2_50x_RC.fq #Submitting the velvetg-jobs to Abel:./run_velvet.sh

8 Submit.sh

9 K=45, N50=2,876,052

10 1.3-bash-4.1$ velveth asm2 45 -fastq -shortPaired -separate \../Sample280_1.fastq../Sample280_2.fastq \ -shortPaired2 -separate -fastq \../TY2482_6kb_1_50x_RC.fq../TY2482_6kb_2_50x_RC.fq 1.3-bash-4.1$ velvetg asm2 -exp_cov auto -cov_cutoff auto -shortMatePaired2 yes The following commands were used to create assembly asm2: Ran assemblathon_stat.pl on the asm2 to judge the assembly: bash-4.1$ assemblathon_stat.pl -s 5.4 contigs.fa > metrics_asm2.txt bash-4.1$ less metrics_asm2.txt K=45 stands out as the best kmer size.

11 Most relevant Assemblathon metrics for asm2:

12 The output from velvetg showed: [276.666654] Paired-end library 1 has length: 444, sample standard deviation: 33 [276.850824] Paired-end library 2 has length: 6199, sample standard deviation: 777 Compared to the lecture data set, these numbers were (298, 19) and (3177, 2132) for the two libraries respectively. Insert size and standard deviation Maybe the exam assembly is better because it has a smaller standard deviation for the mate pairs..

13 Task 2.1 – Spades Assembly Ran Spades to create assembly asm3: -bash-4.1$ module load spades -bash-4.1$ spades.py -t 2 -k 21,29,37,43 --careful \ --pe1-1../Sample280_1.fastq \ --pe1-2../Sample280_2.fastq \ --mp1-1../TY2482_6kb_1_50x_RC.fq \ --mp1-2../TY2482_6kb_2_50x_RC.fq \ --mp1-fr -o asm3 Ran assemblathon_stat.pl on the asm2 to judge the assembly: bash-4.1$ assemblathon_stat.pl -s 5.4 scaffolds.fasta > metrics_spades.txt bash-4.1$ less metrics_spades.txt

14 Most relevant Assemblathon metrics for Spades assembly, asm3:

15 Task 3.1 – Mapping Indexing the asm2 (Velvet) assembly using bwa: -bash-4.1$ cd asm2 -bash-4.1$ module load bwa -bash-4.1$ bwa index -a bwtsw contigs.fa ### Mapping paired end reads for asm2: bwa mem -t 2../contigs.fa \../../../Sample280_1.fastq \../../../Sample280_2.fastq \ | samtools view -buS - | samtools sort - map_pe.sorted ## Mapping mate pairs for asm2: bwa mem -t 2../contigs.fa \../../../TY2482_6kb_1_50x_RC.fq \../../../TY2482_6kb_2_50x_RC.fq \ | samtools view -buS - | samtools sort - map_mp.sorted

16 Task 3.1 – Mapping Indexing the asm3 (Spades) assembly: -bash-4.1$ cd asm3 -bash-4.1$ bwa index -a bwtsw contigs.fasta -bash-4.1$ cd bwa ### Mapping paired end reads to asm3: -bash-4.1$ bwa mem -t 2../scaffolds.fasta \../../../Sample280_1.fastq \../../../Sample280_2.fastq \ | samtools view -buS - | samtools sort - map_pe.sorted -bash-4.1$ samtools index map_pe.sorted.bam ## Mapping mate pairs for to asm3: -bash-4.1$ bwa mem -t 2../scaffolds.fasta \../../../TY2482_6kb_1_50x_RC.fq \../../../TY2482_6kb_2_50x_RC.fq \ | samtools view -buS - | samtools sort - map_mp.sorted -bash-4.1$ samtools index map_mp.sorted.bam

17 IPython notebook plots of the insert size distribution for the asm3 assembly

18 Task 3.2 REAPR analysis for the asm2 and asm3 assemblies REAPR analysis asm2 (Velvet) -bash-4.1$ cd asm2 -bash-4.1$module load reapr -bash-4.1$ reapr pipeline contigs.fa bwa/map_mp.sorted.bam reapr_out > reapr.out #Replacing all spaces with in 03.score.errors.gff.gz ‘_’: -bash-4.1$ zcat reapr_out/03.score.errors.gff.gz |sed 's/ /_/g' > 03.score.errors_nospaces.gff ##REAPR analysis asm3 (Spades) -bash-4.1$ cd asm3 -bash-4.1$ reapr pipeline scaffolds.fasta bwa/map_mp.sorted.bam reapr_out > reapr.out #Replacing all spaces with in 03.score.errors.gff.gz ‘_’: -bash-4.1$ zcat reapr_out/03.score.errors.gff.gz |sed 's/ /_/g' > 03.score.errors_nospaces.gff

19 From 05.summary.report.txt for asm2 From 05.summary.report.txt for asm3 REAPER results REAPR made 9 breaks in asm2 and 2 in asm3

20 Fragment Coverage Distribution (FCD) failure over gap in asm2

21

22 Fragment Coverage Distribution (FCD) failure over gap in asm3

23 Conclution The Spades assembly (asm3) might be better: Fewer and larger scaffolds and contigs Total scaffold length in agreement with known genome size (100.3%) REAPR identified less FCD failures over gaps (breaks). Asseblathon stats:


Download ppt "Assembly Kristoffer H. Ring INF-BIO5121. Task 1.2 – Velvet assembly Was planning to use VelvetOptimiser to determine the optimal kmer size, however, this."

Similar presentations


Ads by Google