1.rna seq part1 workingtothegoal

Upload: parisha-singh

Post on 19-Oct-2015

28 views

Category:

Documents


0 download

DESCRIPTION

rna

TRANSCRIPT

  • Defining the goal of RNA-seq analysis for differential expressionJoachim Jacob20 and 27 January 2014

    This presentation is available under the Creative Commons Attribution-ShareAlike 3.0 Unported License. Please refer to http://www.bits.vib.be/ if you use this presentation or parts hereof.

  • Great power comes with great responsibility

    RNA-seq enables one to

    1) get an idea which are all active genes

    2) quantify expression of each transcript

    3) quantify alternative splicing

    (use your imagination)

    Principles of transcriptome analysis and gene expression quantification: an RNA-seq tutorial. http://onlinelibrary.wiley.com/doi/10.1111/1755-0998.12109/abstract

  • Great power comes with great responsibility

    You can't do all

    RNA-seq is powerful, we have to aim for a certain goal.

    Our goal is to detect differential expression

    on the gene level.

  • Differential expression: useful?

    What are we looking for? Explanations of observed phenotypes

    yeast

    GDA

    Yeast mutant

    GDA + vit C

    why?

  • The central dogma

    yeast

    GDA

    Yeast mutant

    GDA + vit C

    ?

    causes the phenotypic differences

  • The central dogma

    yeast

    GDA

    Yeast mutant

    GDA + vit C

    ?

    Difference in protein activitycauses the phenotypic differences

  • The central dogma

    yeast

    GDA

    Yeast mutant

    GDA + vit C

    ?

    Presence/concentration of proteins in a cellcauses the phenotypic differences

  • The central dogma

    yeast

    GDA

    Yeast mutant

    GDA + vit C

    ?

    Level of protein productioncauses the phenotypic differences

  • The central dogma

    yeast

    GDA

    Yeast mutant

    GDA + vit C

    ?

    Level of templates for protein productioncauses the phenotypic differences

  • The central dogma

    yeast

    GDA

    Yeast mutant

    GDA + vit C

    ?

    Level of mRNA copiescauses the phenotypic differences

  • Does it hold?

    Difference in protein activity

    Level of mRNA copies

    Level of templates for protein production

    Level of protein production

    Presence/concentration of proteins in a cell

    Phenotype

  • Problem reduction

    We can measure mRNA levels (much easier than protein levels). So we measure mRNA.The level of mRNA is a proxy of the level of protein activity causing the aberrant phenotype.

  • How to measure mRNA

    1. Q-PCR (real-time)

    2. Microarray

    3. RNA-seq

    A lot of work to measure few genes, in a relatively wide array of tissues. Very accurate.

    Easier way to measure many predefined genes in a relatively wide array of tissues. Robust.

  • RNA-seq protocol in a nut shell

    Get your sample Lyse the cells and extract RNA Convert the RNA to cDNA The cDNA pool get sequenced

    The result is sequence information from scratch. No prior information is needed.

    Yeast sample

    Comprehensive comparative analysis of strand-specific RNA sequencing methods http://www.nature.com/nmeth/journal/v7/n9/full/nmeth.1491.html

    Comparative analysis of RNA sequencing methods for degraded or low-input sampleshttp://www.nature.com/nmeth/journal/v10/n7/full/nmeth.2483.html

  • The predecessors of RNA-seq

    ESTs: expressed sequence tags, ideal for discovery of new genes.

    SAGE: serial analysis of gene expression, measurement of number of copies of mRNA

    http://www.montana.edu/observatory/people/mcdermottlab.html

  • The predecessors of RNA-seq

    ESTs: expressed sequence tags, ideal for discovery of new genes.

    SAGE: serial analysis of gene expression, measurement of number of copies of mRNA

    http://www.sagenet.org/findings/index.html

  • The predecessors of RNA-seq

    ESTs: expressed sequence tags SAGE: serial analysis of gene expression

    Low throughput: long sequence information, but for only ~thousands of genes.

  • Concept of measuring with RNA-seq

    Extract mRNAand turn into cDNA

    Fragment, ligateadaptor, amplify.

    Put a fraction of the pool on sequencer to read fragments.

    One template of protein production

    Figure: All things must pass: contrasts and commonalities in eukaryotic and bacterial mRNA decay, Nature Reviews Molecular Cell Biology 11, 467478

    GeneA GeneB GeneC

  • RNA-seq protocol in a nut shell

    Yeast sample

  • So many steps must fail our assumption

    Phenotype

    Proteins

    mRNA levels

    cDNA pool

    RNA-seq reads

    Represent the cDNA pool we've created

    Represent the RNA pool we've extracted

    Are a proxy for protein activity

    Define the phenotype

  • So many steps must fail our assumption

    Phenotype

    Proteins

    mRNA levels

    cDNA pool

    RNA-seq reads

    Protein activity is regulated:Fosforylation, ubiquitination,...

    mRNA templates havedifferent speeds of protein pro-Duction: availability of tRNAs, rate of mRNA degration, Alternative splicing events,...

    Loss on RNA extraction, 90% of RNA in cell is rRNA, ligation

    of adapters, conversion to cDNAnot 100%

    Fail to map reads to correctgene, lane-specific biases onreading cDNA fragments,...

  • Consequence: focus on comparison

    Phenotype A

    Proteins

    mRNA levels

    cDNA pool

    RNA-seq reads

    Phenotype B

    Proteins

    mRNA levels

    cDNA pool

    RNA-seq reads

    Possibly dueto differences in

    expression

  • Consequence: focus on comparison

    Phenotype A

    Proteins

    mRNA levels

    cDNA pool

    RNA-seq reads

    Phenotype B

    Proteins

    mRNA levels

    cDNA pool

    RNA-seq reads

    DESIGN OFEXPERIMENT

  • Comparing number of reads to genes

    GeneA GeneB GeneC

    sample

    RNA-seq

    Obviously, the number of reads is dependent on:1. the expression level of the gene2. the total number of reads generated3. the length of the transcript

    OUR QUESTION

    Normalisation is needed!Normalisation is needed!Normalisation is needed!

  • Experimental design

    Our focus: which genes are differentially expressed between different conditions?

    Obviously, the number of reads is dependent on:1. the expression level of the gene2. the total number of reads generated3. the length of the transcript

    Which normalisation is needed?

    How many reads to sequence?

  • Experimental design

    Our focus: which genes are differentially expressed between different conditions?

    How can we detect genes for which the counts of reads change between conditions more systematically than as expected by chance

    We must design an experiment in which we can test this deviance from chance.

    Oshlack et al. 2010. From RNA-seq reads to differential expression results. Genome Biology 2010, 11:220 http://genomebiology.com/2010/11/12/220

  • How many reads to sequence?

    In other words: how deep to sequence? What is the required 'depth of sequencing'?

    GeneA GeneB GeneC

    sample

    RNA-seq

    RNA-seq

    GeneA GeneB GeneC

    The final test will look at ratios:6 5 35 6 4

    1,2 0,83 0,75

    sample

  • How many reads to sequence?

    The difference between the lowest gene count and the highest gene count is typically 105. This is called the dynamic range.

    Linear scale is useless. The logarithmic scale is better.

    Wait! Something's not correct here!

  • Zero remains zero!

    We are working with counts. A count is >=1. A gene with zero counts can be not yet sequenced (not deep enough) or is not expressed in that condition.

    It is not a full logarithmic scale. It starts at zero.

    0

  • So keep all counts above zero?

    Assuming equal sequencing depth in the samples, and these counts. Do all these genes differ in expression? sample sample

    GeneA 5 10 2

    GeneB 15 30 2

    GeneC 40 80 2

    GeneD 100 200 2

    GeneE 1000 2000 2

    GeneZ 1 2 2

    RATIO

  • So keep everything above zero?

    sample sample

    GeneA 11 10 0,91

    GeneB 11 30 2,72

    GeneC 60 80 1,33

    GeneD 79 200 2,53

    GeneE 1150 2000 1,74

    GeneZ 5 1 0,20

    RATIO

    2?

    Is there a trend in howthese numbers change?

    Sequencing the result of the same steps again is called a technical replicate.

  • Technical replicates

    sample

    GeneA 11 5 4 4

    GeneB 11 16 14 8

    GeneC 60 45 32 38

    GeneD 79 102 95 110

    GeneE 1150 1023 987 1005

    GeneZ 3 0 0 1

    sample sample sample

    We take the same cDNA pool and sequence it several times: technical replicates.

  • The poisson distribution

    The counts of technical replicates follow a poisson distribution (Marioni et al 2008). The Poisson distribution can be applied to systems with a large number of possible events, each of which is rare.

    From Wikipedia. Can be 3 different genes, each with their own poisson distribution. Lambda is the mean of the gene's distribution, with a certain number of reads.

    Y=axis: chance to pick that number of reads.

  • The poisson distributionSo when we have 4 technical replicates sequenced up to a big depth (say 10 M reads). We can get by chance, these numbers for 3 different genes.

    GeneA 0, 0, 1, 3

    GeneB 2, 3, 4, 7

    GeneC 8, 9, 11, 14

  • Working the intuition

    How many blue balls?How many red balls?

    Draw 10Draw 10 moreDraw 10 more

    Estimate how large the fraction is in the set?

  • The intuition with the balls

    Color 10 draws 20 draws 30 draws 40 draws

    Blue

    Red

    No color

  • Conclusion of the experiment

    How bigger the fraction in the pool, how quicker (i.e. with less sequencing depth) we are certain about the estimate of that fraction.

    For lower counts, the variance is relatively bigger than the variance for higher counts.

    CV (cofficient of variation) = sqrt(count)/count

    Genes with lower expression need much deeper sequencing than genes with higher expression levels.

    estimate=count; variance=count

  • Comparing counts

    Here we show the overlap of Poisson distributions of single measurements at different read counts. Because relative Poisson uncertainty is high at low read counts, a count of 1 versus 2 has very little power to discriminate a true 2X fold change, though at higher counts a 2X fold change becomes significant.

    In an actual experiment, the width of the distribution would be greater due to additional biological and technical uncertainty, but the uncertainty to the mean expression would narrow with each additional replicate.

    Scotty: a web tool for designing RNA-Seq experiments to measure differential gene expression. Bioinformatics (2013) doi: 10.1093/bioinformatics/btt015

  • Comparing technical replicates

    Risso et al. GC-Content Normalization for RNA-Seq DataBMC Bioinformatics 2011, 12:480

    http://www.biomedcentral.com/1471-2105/12/480 - EDASeq package (R)

    Correlation between meanand variance

    according to Poisson

    Lowess fit throughthe data

    (Log2 of the counts)

    (Log

    2 of

    the

    coun

    ts)

  • But poisson does not seem to fit

    Extending the samples to real biological samples, this mean variance relationship does not hold...

    Plotted using EDASeqPackage in R.

  • But poisson does not seem to fit

    Extending the samples to real biological samples, this mean variance relationship does not hold!

    Plotted using EDASeqPackage in R.

    Reasonable fit

    Something is going on!

  • An extra source of variation

    The Poisson distribution has an 'overdispersed' variance: the variance is bigger than expected for higher counts between biological replicates.

    Plotted using EDASeqPackage in R.

    Something is going on!

  • An extra source of variation

    Where Poisson: CV = std dev / mean => CV = 1/If an additional distribution is involved (also dependent on , the fraction of the gene in the cDNA pool), we have amixture of distributions:

    CV = 1/ + Low counts! dispersion

    Generalization of Poisson with this extra parameter: the Negative Binomial Model fits better!

  • The negative binomial model

    The NB model fits observed expression data of RNA-seq better. It is a generalization of Poisson, and 2 parameters need to be estimated ( and )

    Counts (gene g in sample j) has a Mean =

    gj

    Variance = gj +

    g

    gj

    Biological CV = g

    => Biological CV = g

    Methods differ in estimating this dispersion per gene:Can only be measured with true biological replicates

  • Variation summary, intuitively

    Total CV = Technical CV + Biological CV

    For low counts, the Poisson (technical) variation or the measurement error is dominant.

    For higher counts, the Poisson variation gets smaller, and another source of variation becomes dominant, the dispersion or the biological variation. Biological variation does not get smaller with higher counts.

  • Beyond the NB model

    It appears from analysis of many biological replicates (#=69) that not every gene can be modeled as NB: the Poisson-Tweedie model provides a further generalisation and a better fit for many genes (with an additional shape parameter).

    Left figure: raw data shows that about 26% of the genes fit a NB model. Depending on the estimated shape parameter, other distributions fit better.

    Esnaola et al. BMC Bioinformatics 2013, 14:254http://www.biomedcentral.com/1471-2105/14/254

  • Consequence for our design For low counts: the uncertainty is big due to Poisson

    For high counts: the uncertainty is big due to biological variation. (highly expressed genes differ in their natural variation (regulated by cellular processes) more than lowly expressed genes).

    If we focus on the ratios between the conditions: is it reasonable to set a restriction of fold change? Highly expressed genes can have a smaller and be significant. Lowly expressed genes can exceed 2.

  • Consequence on fold change

    The readily applied cut-off in micro-array analysis is in RNA-seq not of use.

    Blue and red: known DE genes

    Volcanoplot

    These cut-offs oftenapplied can prohibitdetecting DE genes

  • Long story to say...

    We need to estimate the model behind the count.

    Never work without biological replicates.

    Never work with 2 biological replicates.

    Try avoiding working with 3 biological replicates.

    Go for at least 4 biological replicates.

  • Break?

  • Overview

    GeneA GeneB GeneC

    Sample 1RNA-seq

    GeneA GeneB GeneC

    Sample 2RNA-seq

    GeneA GeneB GeneC

    Sample 3RNA-seq

    GeneA GeneB GeneC

    Sample 4RNA-seq

    GeneA GeneB GeneC

    Sample 5RNA-seq

    GeneA GeneB GeneC

    Sample 6RNA-seq

    Condition X

    Condition Y

  • Summary

    Obviously, the number of reads is dependent on:1. chance

    Define the count model (NB) from replicates2. the expression level of the gene

    Compare the ratios with a test2. the total number of reads generated3. the length of the transcript

  • The total number of reads generated

    GeneA GeneB GeneC

    sample

    RNA-seq

    The number of reads is dependent on the total number of reads generated. If one library is sequenced to 20M reads, and another one to 40M, most genes will ~double their counts.

    GeneA GeneB GeneC

    sample

    More RNA-seq

  • Normalization for library size

    Naive approach: divide by total library size. Is not applied anymore!

    Why not? Composition matters!

    2 things to remember:- zero sum system (or we cannot count what we can't sequence)- 5 orders of magnitude

  • Normalization for library size

    2 things to remember:- zero sum system- 5 orders of magnitude

    In every sample, a lot of reads are spend on few extremely highly expressed genes. Which genes? That differ between libraries, but affects negatively the nave size normalization if we include those genes.

  • Normalization for library size

    Schematically: when normalized on library size (square represent number of reads).

    Rest of the genesRest of the genes

    Few genes with enormous counts: there is NO SATURATION of these counts

    All counts for library A All counts for library B

  • Normalization for library size

    Better normalization would be as shown below. DESeq2 and EdgeR apply such an approach (see later).

    Rest of the genesRest of the genes

    100%

    100%

  • Gene length influence the count

    Longer transcripts generate more reads

    True! But the transcript length does not differ between samples. Since we are concerned with relative differences between samples, this needs no normalization (this story changes in case of absolute quantification).

    Sample A Sample B

    Gene A

    Gene B

    Gene A

    Gene B

  • Between sample variation

    Properties of libraries/samples can effect the counts, and lead to variation. This is called between-lane variation. Obvious ones: library size (how many reads are sampled), library composition.

    Different libraries/samples can exhibit increased variation by differing in how gene properties relate to gene counts. This is called within-lane variation.

  • GC-content of genes can influence counts

    GC-content differs between genes. But it does not change between samples, so there should be no problem for relative expression comparison.

    We can visualize the relationship between counts and GC very easily (see right). There is some trend, and it is equal for all samples.

    EDAseq (R)

  • GC-content of genes can influence counts

    Sometimes, samples show different relationships between GC-content of the genes and the counts.

    This within-lane variation (or intra-sample) variation needs to be corrected for, so that in one sample not all differentially expressed genes are also the GC-riched ones.

    Length can have also this effect.

  • What we need to know for our set-up

    We want to detect differentially expressed genes between 2 or more conditions.

    For this, we need to apply the conditions in a controlled environment (randomisation,...).

    For good testing, we need to have some biological replicates per condition.

    For cost effectiveness, we determine how deep we will sequence from each sample.

    We analyse the reads, get raw counts and do the test!

  • Library preparation and lane loading

    HiSeq2000: 24 single-index barcodes available. 1 lane gives 150-180 M reads. One lane of 50 bp SE approx 1.500.

  • Bioinformatics analysis will take most of your time

    Quality control (QC) of raw reads

    Preprocessing: filtering of reads and read parts, to help our goal of differential detection.

    QC of preprocessing Mapping to a reference genome(alternative: to a transcriptome)

    QC of the mapping

    Count table extraction

    QC of the count table

    DE test

    Biological insight

  • Bioinformatics analysis will take most of your time

    Quality control (QC) of raw reads

    Preprocessing: filtering of reads and read parts, to help our goal of differential detection.

    QC of preprocessing Mapping to a reference genome(alternative: to a transcriptome)

    QC of the mapping

    Count table extraction

    QC of the count table

    DE test

    Biological insight

  • Bioinformatics analysis will take most of your time

    Quality control (QC) of raw reads

    Preprocessing: filtering of reads and read parts, to help our goal of differential detection.

    QC of preprocessing Mapping to a reference genome(alternative: to a transcriptome)

    QC of the mapping

    Count table extraction

    QC of the count table

    DE test

    Biological insight

    1

    2

    3

    4

    5

    6

  • Overview

    http://www.nature.com/nprot/journal/v8/n9/full/nprot.2013.099.html

  • The numbers get reduced with every step

    20M

    25M

    15M

  • Deeper, or more replicates?

    Variance will be lower with more reads: but sequencing another biological replicate is preferred over sequencing deeper, or technical reps.

    Doi: 10.1093/bioinformatics/btt015

  • There is tool to help you set up

  • Scotty power analysis

    Power: the probability to reject the null hypothesis if the alternative is true.

    'How many samples and how deep in order to minimize false negatives'.

    (a null hypothesis is always a scenario in which there is no difference, hence no differential expression).

    Alternative tools:

    http://wiki.bits.vib.be/index.php/RNAseq_toolbox

  • Help with design

    http://wiki.bits.vib.be/index.php/RNAseq_toolbox http://rnaseq.uoregon.edu/exp_design.html

  • How many samples to sequence?

    Scotty exercise

  • KeywordsA read count of a gene is dependent on:

    1. chance

    2. expression level

    3. transcript length

    4. depth of sequencing

    5. GC-content

    Poisson distribution

    Negative binomial distribution

    Condition

    Sample

    Normalization

    Write in your own words what the terms mean

  • Reads

    All my references available at:https://www.zotero.org/groups/dernaseq/items

    Slide 1Slide 2Slide 3Slide 4Slide 5Slide 6Slide 7Slide 8Slide 9Slide 10Slide 11Slide 12Slide 13Slide 14Slide 15Slide 16Slide 17Slide 18Slide 19Slide 20Slide 21Slide 22Slide 23Slide 24Slide 25Slide 26Slide 27Slide 28Slide 29Slide 30Slide 31Slide 32Slide 33Slide 34Slide 35Slide 36Slide 37Slide 38Slide 39Slide 40Slide 41Slide 42Slide 43Slide 44Slide 45Slide 46Slide 47Slide 48Slide 49Slide 50Slide 51Slide 52Slide 53Slide 54Slide 55Slide 56Slide 57Slide 58Slide 59Slide 60Slide 61Slide 62Slide 63Slide 64Slide 65Slide 66Slide 67Slide 68Slide 69Slide 70Slide 71Slide 72Slide 73Slide 74Slide 75