PeaksToNarrowPeak: Convert Peaks to narrowPeak (BED) object.

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/PeaksToNarrowPeak-methods.R

Description

PeaksToNarrowPeak converts peaks of an object of PSFit class to narrowPeak object. The object is saved in a user specified directory and can be used in the MANGO or MICC algorithms for interaction analysis. Alternatively, the user can run stage 4 at MACPETUlt.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
PeaksToNarrowPeak(object, ...)

## Default S3 method:
PeaksToNarrowPeak(object, ...)

## S3 method for class 'PSFit'
PeaksToNarrowPeak(object, threshold = NULL, savedir,
  file.out, ...)

## S4 method for signature 'PSFit'
PeaksToNarrowPeak(object, threshold = NULL, savedir,
  file.out, ...)

Arguments

object

An object of class PSFit.

...

Further arguments to be passed to PeaksToNarrowPeak (not used).

threshold

A numeric with the FDR cut-off threshold used to take a subset of significant peaks. If threshold=NULL then all the peaks are returned.

savedir

A string with the directory to save the ouput file.

file.out

A string with the name of the output to be saved to savedir.

Details

Each Peak in the narrowPeak object is represented by an interval starting from the 'CIQ.Up.start' estimated variable to its 'CIQ.Down.end' (see PSFit). Close Peaks in genomic distance are NOT merged by the PeaksToNarrowPeak function. However the user can specify a distance window for merging in the MANGO or MICC algorithms. Note also that MANGO and MICC find a self-ligated cut-off by itself which is usually very different than that found by MACPET. We suggest that the user overwrites MANGOS's or MICC's cut-off with that of MACPET.

Value

A narrowPeak object named after the value of file.out and saved in the savedir.

Author(s)

Ioannis Vardaxis, ioannis.vardaxis@ntnu.no

References

Vardaxis I, Drabløs F, Rye M and Lindqvist BH (2018). MACPET: Model-based Analysis for ChIA-PET. To be published.

See Also

PSFit

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#Create a temporary forder, or anywhere you want:
savedir=file.path(tempdir(),'MACPETtest')
dir.create(savedir)#where you will save the results
file.out='MACPET_peaks.narrowPeak'

#load Self-ligated data: (class=PSFit)
load(system.file('extdata', 'MACPET_psfitData.rda', package = 'MACPET'))
class(MACPET_psfitData)
PeaksToNarrowPeak(object=MACPET_psfitData,threshold=1e-5,file.out=file.out,savedir=savedir)

#-----delete test directory:
unlink(savedir,recursive=TRUE)

IoannisVardaxis/MACPET documentation built on Aug. 9, 2019, 12:11 p.m.