plot {MACPET} | R Documentation

## plot methods for MACPET classes

### Description

Different plot methods for the classes in the `MACPET` package.

### Usage

    ## S3 method for class 'PInter'
    plot(x, ...)

    ## S3 method for class 'PIntra'
    plot(x, ...)

    ## S3 method for class 'PSelf'
    plot(x, ...)

    ## S3 method for class 'PSFit'
    plot(x, kind, RegIndex = NULL, threshold = NULL, ...)

    ## S3 method for class 'GenomeMap'
    plot(x, Type, threshold = NULL, ...)

### Arguments

`x` | An object of correct class used to create different plots.
`...` | further arguments to be passed in the plot functions.
`kind` | A string with one of the following arguments. Note that if a region visualization is plotted, the vertical lines represent peak-summits. `PETcounts` For a bar-plot of the PET-counts in each chromosome. `RegionCounts` For a bar-plot for the region counts in each chromosome. `PeakCounts` For a bar-plot for the Peak-counts in each chromosome. `RegionPETs` For a ggplot for a visualization of the PETs in a region. `RegionTags` For a ggplot for a visualization of the tags in a region. The tags are classified by stream (upper/lower) `PeakPETs` For a ggplot for a visualization of the PETs in a region. The PETs are classified by the peak they belong to. `PeakTags` For a ggplot for a visualization of the tags in a region. The tags are classified by the peak they belong to. `SigPETCounts` For a bar-plot with the significant PET-counts in each chromosome. `SigRegionCounts` For a bar-plot with the significant region-counts in each chromosome. `SigPeakCounts` For a bar-plot with the significant peak-counts in each chromosome.
`RegIndex` | an integer indicating which region to plot (1 means the biggest in terms of total PETs.)
`threshold` | The FDR cut-off when plotting the total significant peaks/interactions for each chromosome in the data.
`Type` | A string with one of the following values: `'heatmap'`, `'network-random'`,`'network-circle'`,`'network-sphere'`. Each one shows the relations between the chromosomes based on their interactions.

### Value

For the `PInter` class: A network plot. Each node is a chromosome with size proportional to the total PETs of the corresponding chromosome. Edges connect chromosomes which have common PETs, where the thickness of an edge is proportional on the total number of PETs connecting the two chromosomes.

For the `PIntra` class: A bar-plot. Each bar represents the total number of Intra-chromosomal PETs for each chromosome in the data.

For the `PSelf` class: A bar-plot. Each bar represents the total number of Self-ligated PETs for each chromosome in the data.

For the `PSFit` class: Different plots depenting on the `kind` argument.

For the `GenomeMap` class: A heatmap plot or different kinds of network plots showing the relations between different chromosomes based on the interactions between them.

### 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.

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

### See Also

`PSelf`, `PSFit` `PInter`, `PIntra`, `GenomeMap`

### Examples

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

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

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

    #load Self-ligated data:
    load(system.file('extdata', 'MACPET_psfitData.rda', package = 'MACPET'))
    class(MACPET_psfitData)
    requireNamespace('ggplot2')
    plot(MACPET_psfitData,kind='PETcounts')
    plot(MACPET_psfitData,kind='PeakCounts')
    plot(MACPET_psfitData,kind='PeakPETs',RegIndex=1)
    plot(MACPET_psfitData,kind='PeakTags',RegIndex=1)

    #load Interactions data:
    load(system.file('extdata', 'MACPET_GenomeMapData.rda', package = 'MACPET'))
    class(MACPET_GenomeMapData)
    requireNamespace('igraph')
     requireNamespace('reshape2')
    plot(MACPET_GenomeMapData,Type='network-circle')

[Package MACPET version 1.12.0 Index]