December 2018

How to extract promoters positions

Introduction

In this post, I will show how easy it is to extract the genomic positions of every promoters of a specific genome build.

For this demo, you will need the TxDb.Hsapiens.UCSC.hg19.knownGene package:

require(TxDb.Hsapiens.UCSC.hg19.knownGene)
# To avoid have to type the whole package name every time, we use the variable name txdb
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene

TL;DR

promoters(genes(txdb), upstream = 1500, downstream = 500)...
Read more about How to extract promoters positions