Presentation is loading. Please wait.

Presentation is loading. Please wait.

Variant Calling Workshop Chris Fields Variant Calling Workshop v2 | Chris Fields1 Powerpoint by Casey Hanson.

Similar presentations


Presentation on theme: "Variant Calling Workshop Chris Fields Variant Calling Workshop v2 | Chris Fields1 Powerpoint by Casey Hanson."— Presentation transcript:

1 Variant Calling Workshop Chris Fields Variant Calling Workshop v2 | Chris Fields1 Powerpoint by Casey Hanson

2 Introduction In this lab, we will do the following: 1.Perform variant calling analysis on the IGB biocluster. 2.Visualize our results on the desktop using the Integrative Genomics Viewer (IGV) tool. Variant Calling Workshop v2 | Chris Fields2

3 Step 0A: Accessing the IGB Biocluster Open Putty.exe In the hostname textbox type: biocluster.igb.Illinois.edu Click Open If popup appears, Click Yes Enter login credentials assigned to you; example, user class45. Variant Calling Workshop v2 | Chris Fields3 Now you are all set!

4 Step 0B: Lab Setup The lab is located in the following directory: ~/mayo/fields This directory contains the finished version of the lab (i.e. the version of the lab after the tutorial). Consult it if you unsure about your runs. You don’t have write permissions to the lab directory. Create a working directory of this lab in your home directory for your output to be stored. Note ~ is a symbol in Unix paths referring to your home directory. Copy the necessary shell files (.sh) files from ~/mayo/fields to your working directory. Note: in this lab, we will NOT login to a node on the biocluster. Instead, we will submit jobs to the biocluster. Variant Calling Workshop v2 | Chris Fields4

5 Step 0C: Lab Setup Variant Calling Workshop v2 | Chris Fields5 $ mkdir ~/fields # Make working directory in your home directory $ cp ~/mayo/fields/*.sh ~/fields # Copy shell files to your working directory. Create a working directory called ~/fields in your home directory. Copy all shell files (.sh) from ~/mayo/fields to your working directory. Copied Files annotate_snpeff.sh call_variants_ug.sh hard_filtering.sh post_annotate.sh

6 Step 0D: Shared Desktop Directory For viewing and manipulating files on the classroom computers, we provide a shared directory in the following folder on the desktop: classes/mayo In today’s lab, we will be using the following folder in the shared directory: classes/mayo/fields Variant Calling Workshop v2 | Chris Fields6

7 Variant Calling Setup In this exercise, we will use data from the 1000 Genomes project (WGS, 60x coverage) to call variants, in particular single nucleotide polymorphisms. The initial part of the GATK pipeline (alignment, local realignment, base quality score recalibration) has been done, and the BAM file has been reduced for a portion of human chromosome 20. This is the data we will be working with in this exercise. Variant Calling Workshop v2 | Chris Fields7

8 Step 1A: Running a Variant Calling Job In this step, we will start a variant calling job using the qsub command. Additionally, we will gather statistics about our job using the qstat command. Variant Calling Workshop v2 | Chris Fields8 $ cd ~/fields # Change directory to your working directory. $ qsub -q classroom –l ncpus=4 call_variants_ug.sh # This will execute call_variants_ug.sh on the biocluster. $ qstat –u # Get statistics on your submitted job

9 Step 1B: Output of Variant Calling Job Periodically, call qstat to see if your job has finished. You should have 4 files when it has completed. Discussion What did we just do? We ran the GATK UnifiedGenotyper to call variants. Look at file structure. Variant Calling Workshop v2 | Chris Fields9 Files raw_indels.sh raw_indels.vcf.idx raw_snps.vcf raw_snps.vcf.idx

10 Step 1C: SNP and Indel Counting In this step, we will count the # of SNPS and Indels identified in the raw_snps.vcf and raw_indels.vcf files. We will use the program grep, which is a text matching program. Variant Calling Workshop v2 | Chris Fields10 $ grep –c –v ‘^#’ raw_snps.vcf # Get the number of SNPs. # -v Tells grep to show all lines not beginning with # in raw_snps.vcf. # -c Tells grep to return the total number of returned lines. # Output should be 13612. $ grep –c –v ‘^#’ raw_indels.vcf # Get the number of indels. # Output should be 1070.

11 Step 1D: SNP and Indel Counting in dbSNP In this step, we will count the number of SNPs and Indels in dbSNP. dbSNP SNPs and Indels have the rs# identifier where # is a number. Example: rs1000 Variant Calling Workshop v2 | Chris Fields11 $ grep –c ‘rs[0-9]*’ raw_snps.vcf # Get the number of dbSNP SNPs. # Return all lines in raw_snps.vcf containing rs followed by a number. # -c Tells grep to return the total number of returned lines. # Output should be 12248. $ grep –c ‘rs[0-9]*’ raw_indels.vcf # Get the number of dbSNP indels. # Output should be 1019.

12 Step 2A: Hard Filtering Variant Calls We need to filter these variant calls in some way. In general, we would filter on quality scores. However, since we have a very small set of variants, we will use hard filtering. Variant Calling Workshop v2 | Chris Fields12 $ qsub -q classroom –l ncpus=4 hard_filtering.sh # This will execute hard_filtering.sh on the biocluster. $ qstat –u Output Files hard_filtered_snps.v cf hard_filtered_indels. vcf Periodically, call qstat to see if your job has finished.

13 Step 2B: Hard Filtering Variants Calls In this step, we will count the # of filtered SNPs and Indels. Variant Calling Workshop v2 | Chris Fields13 $ grep –c ‘PASS’ hard_filtered_snps.vcf # Count # of passes # Output 8270 $ grep –c ‘PASS’ hard_filtered_indels.vcf # Count # of PASSES # Output 1041 Discussion 1.Did we lose any variants? 2.How many PASSED the filter? 3.What is the difference in the filtered and raw input?

14 Step 3A: Annotating Variants With SnpEff Wit our filtered variants, we now need to annotate them with SnpEff. SnpEff adds information about where variants are in relation to specific genes. Variant Calling Workshop v2 | Chris Fields14 $ qsub -q classroom –l ncpus=4 annotate_snpeff.sh # This will execute snpeff.sh on the biocluster. $ qstat –u Output Files hard_filtered_snps_annotated.vcf hard_filtered_indels_annotate d.vcf Periodically, call qstat to see if your job has finished.

15 Step 3B: Annotating Variants With SnpEff The IDs for the human assembly version we us are from Ensemble. The Ensemble format is ENSGXXXXXXXXXXX. Example: FOXA2’s Ensemble ID is ENSG00000125798. In this step, we would like to see if there are any variants of FOXA2. Variant Calling Workshop v2 | Chris Fields15 $ grep –c ‘ENSG00000125798’ hard_filtered_snps_annotated.vcf # Get the number of SNPS in FOXA2, ENSG00000125798. # Output should be 3. $ grep –c ‘ENSG00000125798’ hard_filtered_indels_annotated.vcf # Get the number of Indels in FOXA2, ENSG00000125798. # Output should be 0.

16 Step 4: GATK Variant Annotator SnpEff adds a lot of information to the VCF. GATK Variant Annotator helps remove a lot of the extraneous information. Variant Calling Workshop v2 | Chris Fields16 $ qsub -q classroom –l ncpus=4 post_annotate.sh # This will execute post_annotate.sh on the biocluster. $ qstat –u Periodically, call qstat to see if your job has finished.

17 Step 5A: Visualization With IGV Variant Calling Workshop v2 | Chris Fields17 Switch the genome to Human (b37).

18 Step 5B: Viewing Results in IGV Load the VCF files marked ‘final’ and Click on the ‘20’ (chr 20). Variant Calling Workshop v2 | Chris Fields18

19 Step 5C: Viewing Results in IGV Click and drag from the ‘20 mb’ mark to roughly the centromeric region on the chromosome (~2.6 mb) Variant Calling Workshop v2 | Chris Fields19

20 Step 5D: Viewing Results in IGV The result should look similar to the screenshot below: Variant Calling Workshop v2 | Chris Fields20

21 Step 5E: Viewing Results in IGV Right click on the track to bring up a menu, and then select Set Feature Visibility Window. Set to ‘10000000’ (10 million, or 10 Mb) Variant Calling Workshop v2 | Chris Fields21

22 Step 5F: Viewing Results in IGV In the search box, enter in ‘FOXA2’. Variant Calling Workshop v2 | Chris Fields22

23 Checkpoint: Viewing Results in IGV 1.How many SNPs are here? 2.How many Indels are here? 3.How many SNPs are ‘hets’? Variant Calling Workshop v2 | Chris Fields23

24 Step 6A: Viewing Results in IGV Now we’ll load in a ‘small’ BAM file.This is the same BAM file you analyzed on the cluster Load the following BAM file in classes/mayo/fields: NA12878.HiSeq.WGS.bwa.cleaned.recal.b37.20_arm1.bam What is happening here? Variant Calling Workshop v2 | Chris Fields24

25 Step 6B: Viewing Results in IGV Right click on BAM track and select ‘Show coverage track’. Note colors in coverage track. Variant Calling Workshop v2 | Chris Fields25

26 Step 6C: Viewing Results in IGV Zoom in to regions with SNPs Mouse-over the SNP regions in the VCF tracks to get more information (including annotation from SnpEff and VariantAnnotator) Variant Calling Workshop v2 | Chris Fields26

27 Browse around… How are filtered SNPs are displayed? How about low-quality bases? Can you change the display to sort BAM reads by strand? Variant Calling Workshop v2 | Chris Fields27

28 Step 7: SnpEff Results SnpEff gives a nice summary HTML file that should have been downloaded with your result (one for SNP, one for indel results) Open those up in a browser. Variant Calling Workshop v2 | Chris Fields28

29 Step 8: Viewing Results in IGV This gives us raw reads, but we need to calculate coverage. Let’s use igvtools. Set command to ‘Count’, then select input file (BAM file). Hit ‘Run’ Variant Calling Workshop v2 | Chris Fields29


Download ppt "Variant Calling Workshop Chris Fields Variant Calling Workshop v2 | Chris Fields1 Powerpoint by Casey Hanson."

Similar presentations


Ads by Google