View source: R/importGInteractions.R
importGInteractions | R Documentation |
Read a track
object from a ginteractions, hic, mcool, or validPairs file
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_SQRT", "KR", "SCALE", "GW_KR", "GW_SCALE", "GW_VC",
"INTER_KR", "INTER_SCALE", "INTER_VC", "balanced"),
matrixType = c("observed", "oe", "expected"),
...
)
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 |
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. |
matrixType |
Type of matrix for .hic file. Available choices are "observed", "oe", and "expected". default is "observed". |
... |
NOT used. |
a track
object
See Also as listResolutions
, listChromosomes
,
readHicNormTypes
#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
if(.Platform$OS.type!="windows"){
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.