Parse chromatin interactions from Tang et al. 2015 as GInteractions. — parseLoopsTang (original) (raw)

Reads pairwise ChIA-PET interaction from an input file.

parseLoopsTang(inFile, ...)

Arguments

inFile input file with loops
... additional arguments, that will be passed toGRanges functions.

Value

An GInteractions with loops from input file.

Details

It reads files with the following tab-delimited format:

chr12 48160351 48161634 chr12 48230665 48232848 27
chr7 77284664 77285815 chr7 77388242 77388928 7
chr4 128459961 128460166 chr4 128508304 128509082 4
chr12 48160351 48161634 chr12 48230665 48232848

This file format was used for ChIA-PET interaction data by Tang et al. 2015http://dx.doi.org/10.1016/j.cell.2015.11.024. The last column of input file is added as annotation column with colname "score".

Examples

exampleLoopTang2015File <- system.file("extdata", "ChIA-PET_GM12878_Tang2015.chr22_1-30000000.clusters.txt", package = "sevenC")

gi <- parseLoopsTang(exampleLoopTang2015File)

#> INFO: Parse ChiA-PET interactions from file: /home/ibnsalem/project/sevenC/inst/extdata/ChIA-PET_GM12878_Tang2015.chr22_1-30000000.clusters.txt

#> Parsed with column specification: #> cols( #> X1 = col_character(), #> X2 = col_integer(), #> X3 = col_integer(), #> X4 = col_character(), #> X5 = col_integer(), #> X6 = col_integer(), #> X7 = col_integer() #> )

read loops with custom seqinfo object:

customSeqInfo <- Seqinfo(seqnames = c("chr1", "chr22"), seqlengths = c(10^8, 10^8), isCircular = c(FALSE, FALSE), genome = "custom") gi <- parseLoopsTang(exampleLoopTang2015File, seqinfo = customSeqInfo)

#> INFO: Parse ChiA-PET interactions from file: /home/ibnsalem/project/sevenC/inst/extdata/ChIA-PET_GM12878_Tang2015.chr22_1-30000000.clusters.txt

#> Parsed with column specification: #> cols( #> X1 = col_character(), #> X2 = col_integer(), #> X3 = col_integer(), #> X4 = col_character(), #> X5 = col_integer(), #> X6 = col_integer(), #> X7 = col_integer() #> )