Function to convert a narrowPeak or broadPeak MACS2 file into a GRanges object
Function to convert a GRanges object to a dataframe
Function to convert a GRanges object to a SAF
peak2Granges(peakfile, broad = FALSE) Granges2df(gr, ignore.strand = FALSE) Granges2saf(gr)
| peakfile | Path to MACS2 peak file in narrowPeak or broadPeak format |
|---|---|
| broad | Logical specifying whether broad or narrowpeak |
| gr | GRanges object to convert |
| ignore.strand | Logical indicating whether strand information should be included |
GRanges object of peak regions
A dataframe created from the GRanges object
A SAF file created from the GRanges object
# NOT RUN { peaks <- peak2Granges("peaks/sample.narrowPeak") # }