importGInteractions {trackViewer} | R Documentation

## Reading data from a ginteractions, hic, cool, or validPairs file

### Description

Read a `track` object from a ginteractions, hic, mcool, or validPairs file

### Usage

    importGInteractions(
      file,
      format = c("ginteractions", "hic", "cool", "validPairs"),
      ranges = GRanges(),
      ignore.strand = TRUE,
      out = c("track", "GInteractions"),
      resolution = 1e+05,
      unit = c("BP", "FRAG"),
      normalization = c("NONE", "VC", "VC_SORT", "KR", "balanced"),
      ...
    )

### Arguments

`file` | The path to the file to read.
`format` | The format of import file. Could be ginteractions, hic, cool or validPairs
`ranges` | An object of `GRanges` to indicate the range to be imported
`ignore.strand` | ignore the strand or not when do filter. default TRUE
`out` | output format. Default is track. Possible values: track, GInteractions.
`resolution` | Resolutions for the interaction data.
`unit` | BP (base pair) or FRAG (fragment) (.hic file only).
`normalization` | Type of normalization, NONE, VC, VC_SORT or KR for .hic and NONE, balanced for .cool.
`...` | NOT used.

### Value

a `track` object

### See Also

See Also as `importBam`, `track`, `viewTracks`

### Examples

    #import a ginteractions file
    #gi <- system.file("extdata", "test.ginteractions.tsv", package="trackViewer",
    #                       mustWork=TRUE)
    #dat <- importGInteractions(file=gi, format="ginteractions",
    #                   ranges=GRanges("chr7", IRanges(127471197, 127474697)))

    ##import a hic file
    hic <- system.file("extdata", "test_chr22.hic", package = "trackViewer",
                           mustWork=TRUE)
    dat <- importGInteractions(file=hic, format="hic",
                               ranges=GRanges("22", IRanges(1500000, 100000000)))

    ##import a cool file
    cool <- system.file("extdata", "test.mcool", package = "trackViewer",
                         mustWork=TRUE)
    dat <- importGInteractions(file=cool, format="cool",
                               resolution = 2,
                               ranges=GRanges("chr1", IRanges(10, 28)))

    ##import a validPairs file
    #validPairs <- system.file("extdata", "test.validPairs", package = "trackViewer",
    #                       mustWork=TRUE)
    #dat <- importGInteractions(file=validPairs, format="validPairs")

[Package trackViewer version 1.30.0 Index]