This is a test version of Biostars. For the public version, visit https://www.biostars.org.
error for toGRanges

I'd like to use ChIPpeakAnno to do downstream analysis after peak calling by macs2.

But I got some error for toGRanges to upload my results from macs2.

macs <- system.file("/Users/macs2", "/Users/macs2/cz3Rip_vs_cz1Inp_peaks.xls", package="ChIPpeakAnno")

macsOutput <- toGRanges(macs, format="MACS")

Error in read.table(data, header = header, ..., nrows = 5) : no lines available in input In addition: Warning message: In file(file, "rt") : file("") only supports open = "w+" and open = "w+b": using the former

I also tried broadPeak, but still got the error.

Any suggestions?

Thanks so much~~~

chip-seq

1 answer

You don't need system.file if you know the path. Try:

macs <- "/Users/macs2/cz3Rip_vs_cz1Inp_peaks.xls"

Also, give a broadPeak, not xls file.

Log in to answer this question.