Question: How do I load a peak file in ChIPseeker?
0
gravatar for massimofaggiani
4 months ago by
massimofaggiani0 wrote:

I am new to ChIPseq data analysis and am wondering how is the syntax for loading a bed file in R package chipseeker; so far I just used sample data provided with the package. For example, if I write:

peak <- readPeakFile("file.bed")

An error occurs since it cannot open the connection and find such file.

chipseeker • 315 views
ADD COMMENTlink modified 3 months ago by mossysuffi0 • written 4 months ago by massimofaggiani0

https://www.bioconductor.org/packages/release/bioc/vignettes/ChIPseeker/inst/doc/ChIPseeker.html

ADD REPLYlink written 4 months ago by Sej Modha4.7k

Thank you, but I already found that page. It's not clear to me how the five files are found and loaded in R.

ADD REPLYlink written 4 months ago by massimofaggiani0

From the docs, if you look at the code

files <- getSampleFiles()
print(files)

files is a named list object with paths ti bed file. So you need to create such an object with your files.

ADD REPLYlink written 4 months ago by venu6.7k

How do I create such path to my bed files? I just replaced the example files with my bed file in GEO_sample_data folder.

ADD REPLYlink modified 4 months ago • written 4 months ago by massimofaggiani0
1

May be, by learning basics of R?

ADD REPLYlink written 4 months ago by venu6.7k

That is such a condescending and unnecessary response, if you're not going to help at all.

ADD REPLYlink written 3 months ago by mossysuffi0

Maybe consider not providing a reply if sarcasm is the best you can manage.

ADD REPLYlink written 7 weeks ago by rependo0
1

It may not be very helpful, but it's not sarcasm.

ADD REPLYlink written 7 weeks ago by igor11k
0
gravatar for mossysuffi
3 months ago by
mossysuffi0
mossysuffi0 wrote:

Here's why you're having trouble. The manual linked by venu is not a good write up at all. The author failed to mention that getSampleFiles is actually a command that comes with the ChIPSeeker package to load up sample files.

What you need to do is load up bed files of your called peaks (.narrowPeak output from MACS2 is a special type of BED), into R-compatible GRanges object.

Here's a thread where one answer recommends the use of the package rtracklayer for this purpose. Also read this blogpost for a more insight on how special types of BED files can be massaged to be rtracklayer-compatible.

Hope this helps.

ADD COMMENTlink written 3 months ago by mossysuffi0

The author failed to mention that getSampleFiles is actually a command that comes with the ChIPSeeker package to load up sample files

Based on that function name, what would you expect it to be?

If you look at that manual, you can see that the next step is readPeakFile to read a BED file.

ADD REPLYlink modified 3 months ago • written 3 months ago by igor11k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 878 users visited in the last hour