import.macs.peaks.file: import a peaks file produced by MACS

Description Usage Arguments Value Note Author(s) Examples

Description

2 of the most useful MACS result files are the _peaks.xls and _negative_peaks.xls. These files have slightly different formats, which will differ again if you have also run fix.macs.output to 'fix' these result files.

Usage

1

Arguments

peaks.file

The path to a single MACS peaks file. It can be either tab separated, a genuine XLS file, and can contain header lines, or not.

Value

a data.frame representation of the data rows within the MACS result file

Note

The differences in files are:
The _peaks.xls file has header lines, whereas _negative_peaks.xls does not. Despite having the extension .xls, they can be either .tsv, or real .xls files.
So there are 4 combinations of files: tsv or xls, and with or without header lines. This function imports any of the 4 types as a data.frame.

Speed
This function is slowest if the peaks file is both XLS and contains header rows.

Author(s)

Mark Cowley, 2012-02-01

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
# import native MACS peaks files (which despite the xls extension are just tsv files)
macs.peaks <- import.macs.peaks.file("./DATA_peaks.xls")
macs.peaks <- import.macs.peaks.file("./DATA_negative_peaks.xls")

# fix these MACS peaks files & then import
macs.peaks <- fix.macs.output(".")
macs.peaks <- import.macs.peaks.file("./DATA_peaks.xls")
macs.peaks <- import.macs.peaks.file("./DATA_negative_peaks.xls")

## End(Not run)

drmjc/macsR documentation built on May 15, 2019, 2:23 p.m.