If you have R and Bioconductor installed, you can try the following steps:
# Load required packages
pkgNames <- c("rtracklayer", "org.Hs.eg.db", "TxDb.Hsapiens.UCSC.hg19.knownGene")
libSetup <- lapply(pkgNames, library, character.only = TRUE)
# Import narrowPeak file
fileName <- "Replace this string with the name of your peak file"
narrowPeak <- c(signalValue = "numeric", pValue = "numeric", qValue = "numeric", peak = "integer")
peakRanges <- import(fileName, format = "BED", extraCols = narrowPeak)
# Extract promoter ranges
promRanges <- promoters(genes(TxDb.Hsapiens.UCSC.hg19.knownGene))
# Map gene symbol names
promRanges$symbol <- mapIds(org.Hs.eg.db, promRanges$gene_id, "SYMBOL", "ENTREZID")
# Find overlapping ranges
rangeOverlaps <- findOverlaps(peakRanges, promRanges)
peakRanges$symbol <- promRanges$symbol[subjectHits(rangeOverlaps)]
The peakRanges object will then have a column with the gene names of the promoters your peaks overlap. If you are not familiar with R or don't have them installed, you can go to the UCSC Table Browser and download a BED file of the promoter regions. Then use a tool such as Bedtools or Bedops to intersect your narrowPeak file with the BED file:
bedtools intersect -a Peaks.narrowPeak -b Promoters.bed
Can you tell us which genome assembly you aligned your NGS data to?
I used the human genome, hg19 version
I tried to load required packages but it doesn't work...
I have the following error message :"installation path not writeable, unable to update packages: MASS, survival" for the loading of bioclite() and then I have this "installation of package ‘TxDb.Hsapiens.UCSC.hg19.knownGene’ had non-zero exit status"
I would try to do this with R but I'm not very familiar with it...
Little help please ???
Thanks in advance ;-)
Follow these directions to set a local storage path (adjust file paths as needed for your local environment) for your R packages.
Note: Please use
ADD COMMENT/ADD REPLYwhen responding to existing posts to keep threads logically organized.Hi
I would like to do the exact same analysis with my ATAC-Seq data from zebrafish. I used DanRer10 for alignment. Can you help me with this?
Thanks
B
Please do not use the answer field for questions. What is unclear, there is an accepted answer?
My ATAC Seq libraries are aligned to danRer 10
Thanks
How about searching the BIoC packages: https://bioconductor.org/packages/3.9/data/annotation/ Sure you will find the one for for species.