Skip to content

Commit

Permalink
Update 08_motif_analysis.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mistrm82 authored Dec 10, 2024
1 parent 1152cf2 commit 4d52204
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lessons/08_motif_analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ STREME will accept **BED files or sequence files as input**, which must be in FA
<details>
<summary><b>Click here if you are unable to locate <code>olaps_wt</code>code in your environment</b></summary>
<br>Run the code provided below to create the object <code>olaps_wt</code>:<br><br>

<pre>
sample_files <- list.files(path = "./data/macs2/narrowPeak/", full.names = T)

Expand All @@ -79,6 +79,17 @@ olaps_wt <- findOverlapsOfPeaks(WT_H3K27ac_ChIPseq_REP1,
<hr />
</details>

Open up an R script file and call it `motif_analysis_prep.R` and add in a header line and the necessary libraries to load.

```
## Preparing data for motif analysis
# Load libraries
library(tidyverse)
library(GRanges)
library(ChIPseeker)
```

Let's begin by extracting the peaks which overlap across the replicates. Stored in the object are `mergedPeaks`, this corresponds to
an object of GRanges consisting of all merged overlapping peaks. Another option is `peaksInMergedPeaks` which is a GRanges object consisting of all peaks in each of the samples involved in the overlapping peaks. Since MEME/STREME suggests **removing duplicate sequences**, we will go with `mergedPeaks`. The only issue here is that merging might create some fairly large sized regions. MEME/STREME recommends **the input sequence’s length should be ≤ 1,000 bp and as short as possible**. As a result, we will filter the regions.

Expand Down

0 comments on commit 4d52204

Please sign in to comment.