AnalysisStatistics: Count Statistics for ChIA-PET.

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

View source: R/AnalysisStatistics.R

Description

AnalysisStatistics prints and saves count statistics for the current inputs of the peak-calling analysis.

Usage

1
2
AnalysisStatistics(x.self, x.intra = NULL, x.inter = NULL,
  file.out = NULL, threshold = 1e-05, savedir = NULL)

Arguments

x.self

An object of class PSelf or PSFit.

x.intra

An object of class PIntra (optional).

x.inter

An object of class PInter (optional).

file.out

A string with the name of the output to be saved to savedir. If NULL the function will only print the output.

threshold

A numeric indicating the FDR cut-off, used when class(x.self)=PSFit. If NULL, no threshold is applied.

savedir

A string with the directory to save the ouput file. If NULL then the function will only print the output.

Value

Based on the inputs, AnalysisStatistics prints the total Self-ligated, Intra- and Inter-chromosomal PETs, as well as the total regions, total candidate peaks and total significant peaks (if threshold!=NULL and class(x.self)=PSFit). If file.out and savedir are not NULL then it also saves the output to a csv file in savedir.

Author(s)

Ioannis Vardaxis, ioannis.vardaxis@ntnu.no

References

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

See Also

PSelf, PSFit,PIntra, PInter

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#Create a temporary test forder, or anywhere you want:
savedir=file.path(tempdir(),'MACPETtest')
dir.create(savedir)#where you will save the results

#load Inter-chromosomal data:
load(system.file('extdata', 'MACPET_pinterData.rda', package = 'MACPET'))
class(MACPET_pinterData)

#load Intra-chromosomal data:
load(system.file('extdata', 'MACPET_pintraData.rda', package = 'MACPET'))
class(MACPET_pintraData)

#load Self-ligated data: (class=PSelf)
load(system.file('extdata', 'MACPET_pselfData.rda', package = 'MACPET'))
class(MACPET_pselfData)

#Print analysis:
AnalysisStatistics(x.self=MACPET_pselfData,
                   x.intra=MACPET_pintraData,
                   x.inter=MACPET_pinterData,
                   file.out='AnalysisStats',
                   savedir=savedir)

#################################################################
#load Self-ligated data: (class=PSFit)
load(system.file('extdata', 'MACPET_psfitData.rda', package = 'MACPET'))
class(MACPET_psfitData)

#Print analysis:
AnalysisStatistics(x.self=MACPET_psfitData,
                   x.intra=MACPET_pintraData,
                   x.inter=MACPET_pinterData,
                   file.out='AnalysisStats',
                   savedir=savedir,
                   threshold=1e-5)

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

MACPET documentation built on Nov. 8, 2020, 5:47 p.m.