Skip to content

Commit

Permalink
add slides 20 and 21
Browse files Browse the repository at this point in the history
  • Loading branch information
taliaferrojm committed Sep 18, 2024
1 parent b8dfe13 commit 266ac28
Show file tree
Hide file tree
Showing 15 changed files with 730 additions and 0 deletions.
21 changes: 21 additions & 0 deletions _freeze/slides/slides-20/execute-results/html.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"hash": "4d4cfb389078bae03eeb204885df38c1",
"result": {
"engine": "knitr",
"markdown": "---\ntitle: \"Factor-centric chromatin analysis\"\nauthor: \"Jay Hesselberth\"\n---\n\n\n\n# Where do transcription factors bind in the genome?\n\nToday we'll look at where two yeast transcription factors bind in the genome using CUT&RUN.\n\nTechniques like CUT&RUN require an affinity reagent (e.g., an antibody) that uniquely recognizes a transcription factor in the cell.\n\nThis antibody is added to permeabilized cells, and the antibody associates with the epitope. A separate reagent, a fusion of Protein A (which binds IgG) and micrococcal nuclease (MNase) then associates with the antibody. Addition of calcium activates MNase, and nearby DNA is digested. These DNA fragments are then isolated and sequenced to identify sites of TF association in the genome.\n\n![Fig 1a, Skene et al.](../img/block-dna/skene-fig-1a.png)\n\n## Data download and pre-processing\n\nCUT&RUN data were downloaded from the [NCBI GEO page](https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE84474) for Skene et al.\n\nI selected the 16 second time point for *S. cerevisiae* Abf1 and Reb1 (note the paper combined data from the 1-32 second time points).\n\nBED files containing mapped DNA fragments were separated by size and converted to bigWig with:\n\n``` bash\n# separate fragments by size\nawk '($3 - $2 <= 120)' Abf1.bed > CutRun_Abf1_lt120.bed\nawk '($3 - $2 => 150)' Abf1.bed > CutRun_Abf1_gt150.bed\n\n# for each file with the different sizes\nbedtools genomecov -i Abf1.bed -g sacCer3.chrom.sizes -bg > Abf1.bg\nbedGraphToBigWig Abf1.bg sacCer3.chrom.sizes Abf1.bw\n```\n\nThe bigWig files are available here in the `data/` directory.\n\n## Questions\n\n1. How do you ensure your antibody recognizes what you think it recognizes? What are important controls for ensuring it recognizes a specific epitope?\n\n2. What are some good controls for CUT&RUN experiments?\n\n# CUT&RUN analysis\n\n## Set up libraries\n\n\n\n::: {.cell}\n\n:::\n\n\n\n## Examine genome coverage\n\n\n\n::: {.cell}\n\n:::\n\n\n\nNow that we have tracks loaded, we can make a plot.\n\n\n\n::: {.cell}\n::: {.cell-output-display}\n![](slides-20_files/figure-revealjs/plot-tracks-1.png){width=960}\n:::\n:::\n\n\n\n## Questions\n\n1. What features stand out in the above tracks? What is different between Reb1 and Abf1? Between the short and long fragments?\n\n2. Where are the major signals with respect to genes?\n\n## Peak calling\n\nA conceptually simple approach to identification of regions containing \"peaks\" where a transcription factor was bound is available in the MACS software ([paper](), [github]()). There's also a nice [blog post](https://hbctraining.github.io/Intro-to-ChIPseq/lessons/05_peak_calling_macs.html) covering the main ideas.\n\n## Theory\n\nThe Poisson distribution is a discrete probability distribution of the form:\n\n$$ P_\\lambda (X=k) = \\frac{ \\lambda^k }{ k! * e^{-\\lambda} } $$\n\nwhere $\\lambda$ captures both the mean and variance of the distribution.\n\nThe R functions `dpois()`, `ppois()`, and `rpois()` provide access to the density, distribution, and random generation for the Poisson distribution. See `?dpois` for details.\n\n\n\n::: {.cell}\n::: {.cell-output-display}\n![](slides-20_files/figure-revealjs/plot-poisson-1.png){width=960}\n:::\n:::\n\n\n\n## Practice\n\nHere, we model read coverage using the Poisson distribution. Given some genome size $G$ and and a number of reads collected $N$, we can approximate $\\lambda$ from $N/G$.\n\nMACS uses this value (the \"genomewide\" lambda) and also calculates several \"local\" lambda values to account for variation among genomic regions. We'll just use the genomewide lambda, which provides a conservative threshold for peak calling.\n\nUsing the genomewide lambda, we can use the Poisson distribution to address the question: **How surprised should I be to see** $k$ reads at position X?\n\n\n\n::: {.cell}\n\n:::\n\n\n\n## P-values\n\nLet's take a look at a plot of the p-value across a chromosome. What do you notice about this plot, when compared to the coverage of the CUT&RUN coverage above?\n\n\n\n::: {.cell}\n::: {.cell-output-display}\n![](slides-20_files/figure-revealjs/unnamed-chunk-6-1.png){width=960}\n:::\n:::\n\n\n\n## Peaks\n\nHow many peaks are called in this region?\n\n\n\n::: {.cell}\n::: {.cell-output .cell-output-stdout}\n\n```\n# A tibble: 5 × 3\n chrom start end\n <chr> <int> <int>\n1 chrII 100248 100289\n2 chrII 101292 101393\n3 chrII 124916 124949\n4 chrII 136181 136264\n5 chrII 141070 141121\n```\n\n\n:::\n:::\n\n\n\n## Visualize\n\nLet's visualize these peaks in the context of genomic CUT&RUN signal. We need to define an `AnnotationTrack` with the peak intervals, which we can plot against the CUT&RUN coverage we defined above.\n\n\n\n::: {.cell}\n::: {.cell-output-display}\n![](slides-20_files/figure-revealjs/plot-peaks-1.png){width=960}\n:::\n:::\n\n\n\n## Questions\n\n1. How many peaks were called throughout the genome? How wide are the called peaks, on average?\n\n2. How else might we define a significance threshold for identifying peaks?\n\n3. What might the relative heights of the peaks indicate? What types of technical or biological variables might influence peak heights?\n\n\n## References\n\nGADEM: a genetic algorithm guided formation of spaced dyads coupled with an EM algorithm for motif discovery. J Comput Biol 2009 \\[[PMC free article](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2756050/)\\] \\[[PubMed](https://pubmed.ncbi.nlm.nih.gov/19193149)\\] \\[[Google Scholar](https://scholar.google.com/scholar_lookup?journal=J+Comput+Biol&title=GADEM:+a+genetic+algorithm+guided+formation+of+spaced+dyads+coupled+with+an+EM+algorithm+for+motif+discovery&author=L.+Li&volume=16&issue=2&publication_year=2009&pages=317-329&pmid=19193149&)\\]\n",
"supporting": [
"slides-20_files"
],
"filters": [
"rmarkdown/pagebreak.lua"
],
"includes": {
"include-after-body": [
"\n<script>\n // htmlwidgets need to know to resize themselves when slides are shown/hidden.\n // Fire the \"slideenter\" event (handled by htmlwidgets.js) when the current\n // slide changes (different for each slide format).\n (function () {\n // dispatch for htmlwidgets\n function fireSlideEnter() {\n const event = window.document.createEvent(\"Event\");\n event.initEvent(\"slideenter\", true, true);\n window.document.dispatchEvent(event);\n }\n\n function fireSlideChanged(previousSlide, currentSlide) {\n fireSlideEnter();\n\n // dispatch for shiny\n if (window.jQuery) {\n if (previousSlide) {\n window.jQuery(previousSlide).trigger(\"hidden\");\n }\n if (currentSlide) {\n window.jQuery(currentSlide).trigger(\"shown\");\n }\n }\n }\n\n // hookup for slidy\n if (window.w3c_slidy) {\n window.w3c_slidy.add_observer(function (slide_num) {\n // slide_num starts at position 1\n fireSlideChanged(null, w3c_slidy.slides[slide_num - 1]);\n });\n }\n\n })();\n</script>\n\n"
]
},
"engineDependencies": {},
"preserve": {},
"postProcess": true
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 266ac28

Please sign in to comment.