2013-06-28.kbase variation servicesschatz-lab.org/presentations/2013/2013-06-28.kbase... · 2013....

42
Michael Schatz, James Gurtowski Cold Spring Harbor Laboratory KBase Variation Services Overview and Demo

Upload: others

Post on 21-Sep-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Michael Schatz, James Gurtowski Cold Spring Harbor Laboratory

KBase Variation Services Overview and Demo

Page 2: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Agenda

1.  Introduction to KBase

2.  Resequencing and variation calling theory

3.  KBase services for variation calling

4.  Live Demo

5.  Additional Resources

Page 3: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Agenda

1.  Introduction to KBase

2.  Resequencing and variation calling theory

3.  KBase services for variation calling

4.  Live Demo

5.  Additional Resources

Page 4: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Overview

Knowledgebase!enabling!predic0ve!systems!biology.!!

•  Powerful!modeling!framework.!

•  Community7driven,!extensible!and!scalable!open7source!so9ware!and!applica;on!system.!

•  Infrastructure!for!integra;on!and!reconcilia;on!of!algorithms!and!data9sources.!•  Framework!for!standardiza;on,!search,!and!associa0on!of!data!•  Resources!to!enable!experimental9design!and!interpreta0on!of!results.!

Page 5: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

KBase : Plants

Model development Hypothesis testing

Knowledge Synthesis

Reference sequence

and Genome Annotation

Model Database

Molecular Phenotypes

Genotype- Phenotype

Relationship

Gene Expression

Aggregated Networks

GermplasmSNPs + Structral

Varattions

Phenotypes

Fuctional Annotation

KBaseGenotypes

PhenotypesGenes

Networks

Data Integration!

Single Nucleotide Polymorphisms

T T T T T

Copy Number Variations

A

Structural Variations Expression Analysis

Cloud Scale Workflows!

+- + Kbase.us

Small Big

Object size

Slow Fast

Delay Until Repeat

Search :

▶ Germplasm 1▶ Germplasm 2

▼ Phenotype X▼ Phenotype Y

▶ Germplasm 3Phenotype 3.1

▼ Phenotype 3.2▶ Phenotype 3.2.1

▶ Germplasm 4▶ Germplasm 5▶ Germplasm 6▶ Germplasm 7

Genome Pathways Help Phenotype

Geography ComparePathways

List of Pathways Associated with Phenotype through GWAS

Pathway 1Pathway 2Pathway 3Pathway 4

Data Visualization!

Page 6: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

KBase Infrastructure and Services

Page 7: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Powered!by!KBase!

Variation Services: Samples to Discoveries

Page 8: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Agenda

1.  Introduction to KBase

2.  Resequencing and variation calling theory

3.  KBase services for variation calling

4.  Live Demo

5.  Additional Resources

Page 9: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Resequencing & Variations

How does your sample compare to the reference?

Plant Height

Drought Resistance

Biomass production

Page 10: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Genotyping

!  Sequencing instruments make mistakes –  Quality of read decreases over the read length

!  A single read differing from the reference is probably just an error, but it becomes more likely to be real as we see it multiple times

–  Often framed as a Bayesian problem of more likely to be a real variant or chance occurrence of N errors

–  Accuracy improves with deeper coverage

Page 11: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Typical contig coverage

1 2 3 4 5 6 C

over

age

Contig

Reads

Imagine raindrops on a sidewalk

Coverage

Page 12: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

1x Sequencing

Page 13: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

2x Sequencing

Page 14: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

3x Sequencing

Page 15: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

4x Sequencing

Page 16: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

5x Sequencing

Page 17: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

6x Sequencing

Page 18: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

7x Sequencing

Page 19: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

8x Sequencing

Page 20: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Genome Coverage Distribution

Expect Poisson distribution on depth Standard Deviation = sqrt(cov)

This is the mathematically model => reality may be much worse

Double your coverage for diploid genomes

0 10 20 30 40 50

0.0

0.2

0.4

0.6

0.8

1.0

Depth

Exp

ecte

d Fr

actio

n of

gen

ome

>= d

epth

avg cov 10x20x30x40x

Page 21: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Bowtie2 Overview

3. Evaluate end-to-end match

2. Lookup each segment and prioritize

1. Split read into segments

Fast gapped-read alignment with Bowtie 2. Langmead B, Salzberg S. Nature Methods. 2012, 9:357-359.

Page 22: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

SNP calling Beware of (Systematic) Errors

Identification and correction of systematic error in high-throughput sequence data Meacham et al. (2011) BMC Bioinformatics. 12:451

A closer look at RNA editing. Lior Pachter (2012) Nature Biotechnology. 30:246-247

•  Distinguishing SNPs from sequencing error typically a likelihood test of the coverage –  Probability of seeing the data from a heterozygous SNP versus from sequencing error –  However, some sequencing errors are systematic!

Page 23: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

(A) Plot of sequencing depth across a one megabase region of A/J chromosome 17 clearly shows both a region of 3-fold increased copy number (30.6–31.1 Mb) and a region of decreased copy number (at 31.3 Mb).

Simpson J T et al. Bioinformatics 2010;26:565-567

•  Identify CNVs through increased depth of coverage & increased heterozygosity –  Segment coverage levels into discrete steps –  Be careful of GC biases and mapping biases of repeats

CNV calling Beware of (Systematic) Errors

Page 24: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Agenda

1.  Introduction to KBase

2.  Resequencing and variation calling theory

3.  KBase services for variation calling

4.  Live Demo

5.  Additional Resources

Page 25: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Sequence to Discovery

Illumina(HiSeq(2000(Sequencing)by)Synthesis!!

!

>60Gbp!/!day!

Assays(Read!QA/QC!

Mapping!Stats!

SNVs!/!Indels!

CNVs!/!SVs!

RNAOseq!

ChIPOseq!

DNaseOseq!

FAIREOseq!

MethylOseq!

ChIAOPET!

HiOC!

…!

Unaligned!

Reads!

(fq)!Filtered!

Reads!

(fq)!Aligned!

Reads!

(bam)! Sorted!

Aligned!

Reads!

(bam)!

FASTX!

Bow;e2!

Dedup!

Aligned!

Reads!

(bam)!

SAMTools!

Picard!

FASTQC!QA/QC!

SAMTools!

Genome!

(fa)!

Page 26: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Variation Services API 1.0

Job(API!!!  ClusterStatus:!return!basic!status!of!

cluster!(jobs!running,!nodes!available,!etc)!

!  JobStatus:!Given!a!JobID,!returns!current!status!

!  ListJobs:!List!JobID!running!with!a!given!username!

!  KillJob:!Kills!a!given!JobID!

Data(API!!  List:!List!files!in!a!directory(!  Fetch:!Fetch!files!from!HDFS!

!  Put:!Put!files!into!HDFS!!  RM:!Delete!files!on!HDFS!

!  FetchBAM:!OnOtheOfly!conversion!to!BAM!

!  PutFastq:!Put!reads!into!HDFS!with!conversion!

Notes:!

!  All!calls!are!authen;cated!with!KBase!username/password!

Genotyping(API!!!  BowFe:!Launch!alignment!task!with!Bow;e!

!  BWA:!Launch!alignment!task!with!BWA!

!  SNPCalling:!Launch!SNPcalling!task!with!SAMTools!

!  SortAlignments:!Launch!task!to!sort!by!chromosome!

BWA!

Page 27: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Reads to SNPs in Five Easy Steps

1.  Identify reference genome $ all_entities_Genome -f scientific_name | grep -i ’Populus’

2.  Upload Reads to KBase cloud $ jk_fs_put_pe populus.1.fq.gz populus.2.fq.gz populus

3.  Align Reads with Bowtie2 $ jk_compute_bowtie -in=populus.pe -org=populus -out=populus_align

4.  Call SNPs with SAMTools $ jk_compute_samtools_snp -in=populus_align -org=populus -out=populus_snps

5.  Merge and Download VCF files $ jk_compute_vcf_merge -in=populus_snps --alignments=populus_align -out=populus.vcf $ jk_fs_get populus.vcf

Page 28: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Identify a Reference Genome

Select!the!proper!KBase!ID!

Identify reference genome($ all_entities_Genome -f scientific_name | grep -i ’Populus’!

Page 29: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Upload Reads to KBase Cloud

Upload Reads to KBase cloud($ jk_fs_put_pe populus.1.fq.gz populus.2.fq.gz populus!

KBase!Cloud!

Page 30: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Align Reads with Bowtie2

Align Reads with Bowtie2($ jk_compute_bowtie -in=populus.pe -org=‘kb|g.3907’ -out=populus_align!

Bow;e2!Aligner!

Raw!Fastq!Reads!

Alignments!

Page 31: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Call SNPs with SAMTools

Call SNPs with SAMTools($ jk_compute_samtools_snp -in=populus_align –org=‘kb|g.3907’ -out=populus_snps!

SAMTools! SAMTools! SAMTools!

Alignments!

Samtools!Variant!!

Detec;on!

Called!Variants!

!!!!!!(VCF)!

Samtools!Variant!!

Detec;on!

Page 32: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Merge and Download VCF Files

Merge and Download $ jk_compute_vcf_merge -in=populus_snps –alignments=populus_align -out=populus.vcf!$ jk_fs_get populus.vcf!

Merge!VCF!Files!

Download!to!Local!Worksta;on!

Page 33: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Reads to SNPs in Five Easy Steps

1.  Identify reference genome $ all_entities_Genome -f scientific_name | grep -i ’Populus’

2.  Upload Reads to KBase cloud $ jk_fs_put_pe populus.1.fq.gz populus.2.fq.gz populus

3.  Align Reads with Bowtie2 $ jk_compute_bowtie -in=populus.pe -org=populus -out=populus_align

4.  Call SNPs with SAMTools $ jk_compute_samtools_snp -in=populus_align -org=populus -out=populus_snps

5.  Merge and Download VCF files $ jk_compute_vcf_merge -in=populus_snps --alignments=populus_align -out=populus.vcf $ jk_fs_get populus.vcf

Page 34: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

"  Rapid parallel execution of data-intensive analysis "  FASTX, BWA, Bowtie2, Novoalign, SAMTools, Hydra

"  Sorting, merging, filtering, selection, clustering, correlating "  Supports BAM, SAM, BED, fastq

Fastq!

BWA!

Filter!

Novo!

Hydra!

Serial Jnomics Fastq!

BWA!

Filter!

Novo!

Hydra!

BWA!BWA!

Filter! Filter!

Novo!Novo!

Answering the demands of digital genomics Titmus, MA, Gurtowski, J, Schatz, MC (2012) Concurrency & Computation

Jnomics: Cloud-scale genomics

Page 35: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Job!

Tracker!

!

Name!

Node!

2nd!Name!

Node!

…!

Slaves:!61!nodes!/!976!cores!!

HDFS:!488TB!

KBase!

CDM!

KBase!

Auth!

Service!

KBase!

ADM!

ORNL!!

Server!Bulk!transfer!

Jnomics!

Library!

KbaseAPI!

Jnomics!

Library!

CLI!

Jnomics!

Library!

IRIS!

Internet!

(&!JGI)!

Jnomics!

Compute!

Manager!

Jnomics!!

Data!!

Manager!

Squid!

FTP/HTTP!

Variation Services Architecture

submit!

monitor!

browse/upload!

stats/export!

Kbase!Network!

Page 36: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Maize Test Run

Align & call SNPs from 35M 80bp (14Gbp) reads with maize genome (zmb73v2) Identified 372k high confidence SNPs

*es;mated!;me!

Serial((

MulFtcore( KBase(Cloud(

Config! 1!core!

(1!node)!

44!core!

(1!node)!

118!cores!

(15!!nodes)!

Bow;e2! 45!h*! 1h!10m! 23!m!

Sort!

!

2!hr! 2!hr! N/A!

Samtools! 2!hr! 2!hr! 12!m!

EndOtoOEnd!!

Speedup!

50h*!

1x!

5h!10m!

9.6x!

35!m!

86x!

Page 37: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Maize Population Analysis

Align & call SNPs from 131 maize samples 1TB fastq / 408Gbp input data

*es;mated!;me!

Serial((

KBase(cloud((small)(

KBase(Cloud((large)(

Config! 1!core!

(1!node)!

210!cores!!

(15!nodes)!

854!cores!

(61!!nodes)!

Bow;e2! 1311!hr*! 19.5!hr! 5!hr!

Sort!

!

58!hr*! N/A! N/A!

Samtools! 58!hr*! 3.5!hr! 1.5!hr!

EndOtoOEnd!!

Speedup!

1427!hr*!

1x!

23!hr!

62x!

6.5!hr!

219x!

Page 38: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Agenda

1.  Introduction to KBase

2.  Resequencing and variation calling theory

3.  KBase services for variation calling

4.  Live Demo

5.  Additional Resources

Page 39: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Demo

Online!Demo!!

1.  Browse!to!KBase!website:!hmp://kbase.us/!

!

2.  Sign!up!for!KBase!account:!hmps://gologin.kbase.us/SignUp!

!

3.  Download!KBase!DMG:!hmp://kbase.us/forOusers/getOstarted/!

!Or!use!IRIS:!hmp://kbase.us/services/docs/invoca;on/Iris/!

!

4.  Varia;on!Services!Tutorial:!

!hmp://kbase.us/forOusers/tutorials/analyzingOdata/varia;onOservice/!

!

5.! !Summarize!muta;ons:!

!$!cat!yeast.vcf!!

!$!grep!Ov!'^#'!yeast.vcf!|!cut!Of1!|!sort!|!uniq!Oc!

!$!grep!Ov!'^#'!yeast.vcf!|!cut!Of!4,5!|!sort!|!uniq!Oc!|!sort!Onrk1!|!head!

!

Page 40: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Agenda

1.  Introduction to KBase

2.  Resequencing and variation calling theory

3.  KBase services for variation calling

4.  Live Demo

5.  Additional Resources

Page 41: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Additional Resources

Resource( URL(

KBase! hmp://kbase.us/!

Gesng!Started! hmp://kbase.us/forOusers/userOhome/!

Varia;on!Services! hmp://kbase.us/forOusers/tutorials/analyzingOdata/varia;onOservice/!

Bow;e2! hmp://bow;eObio.sourceforge.net/bow;e2/index.shtml!

BWA! hmp://bioObwa.sourceforge.net/!

SAMTools! hmp://samtools.sourceforge.net/!

VCF!Spec! hmp://www.1000genomes.org/wiki/Analysis/Variant%20Call

%20Format/vcfOvariantOcallOformatOversionO40!

SNPeff! hmp://snpeff.sourceforge.net/!

KBase!Contact! hmp://kbase.us/contactOus/!

***Survey***! hmps://www.surveymonkey.com/s/KBOuserOinfo!

Page 42: 2013-06-28.KBase Variation Servicesschatz-lab.org/presentations/2013/2013-06-28.KBase... · 2013. 6. 28. · Live Demo 5. Additional Resources . Agenda 1. Introduction to KBase 2

Questions?

Thank You! http://schatzlab.cshl.edu

@mike_schatz / @DOEKBase