GetShortestPath {MACPET} | R Documentation

## Find shortest path between pairs of peaks given a set of significant interactions.

### Description

`GetShortestPath` function subsets the significant interactions of a `GenomeMap` object given a user specified FDR cut-off. Based on the leftover interactions, it creates a network and finds the length of the shortest path between two user-specified peaks. Currently it only finds the shortest paths between intra-chromosomal peaks. Therefore, the peaks have to be on the same chromosome.

### Usage

    GetShortestPath(object, ...)

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

    ## S3 method for class 'GenomeMap'
    GetShortestPath(object, threshold = NULL, ChrFrom,
      ChrTo, SummitFrom, SummitTo, ...)

    ## S4 method for signature 'GenomeMap'
    GetShortestPath(object, threshold = NULL, ChrFrom,
      ChrTo, SummitFrom, SummitTo, ...)

### Arguments

`object` | An object of class `GenomeMap`.
`...` | Further arguments to be passed to `GetShortestPath` (not used).
`threshold` | A numeric with the FDR cut-off threshold used to take a subset of significant interactions If `threshold=NULL` then all the interactions will be used
`ChrFrom` | Character specifying the chromosome of the 'From' peak, for example 'chr1'.
`ChrTo` | Character specifying the chromosome of the 'To' peak.
`SummitFrom` | Numeric specifying the peak summit of the 'From' peak.
`SummitTo` | Numeric specifying the peak summit of the 'To' peak.

### Value

A two-element list with the first element named `LinearPathLength` for the linear length of the path between `SummitFrom` and `SummitTo`, and the second element named `ThreeDPathLength` for the 3D length of the shortest path between `SummitFrom` and `SummitTo`.

### Author(s)

Ioannis Vardaxis, ioannis.vardaxis@ntnu.no

### References

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

### See Also

`GenomeMap`

### Examples

    #load Interaction data: (class=GenomeMap)
    load(system.file('extdata', 'MACPET_GenomeMapData.rda', package = 'MACPET'))
    class(MACPET_GenomeMapData)
    GetShortestPath(object=MACPET_GenomeMapData,
                        threshold = NULL,
                        ChrFrom='chr1',
                        ChrTo='chr1',
                        SummitFrom=10000,
                        SummitTo=1000000)

[Package MACPET version 1.6.0 Index]