## for example Reading ChIA-PET interaction results generated from ChIA-PET tool
## it should be formatted as follow:
## -------------------------------------------------------------------------------------------
## chromleft startleft endleft chromright startright endright counts pvalue qvalue
## chr1 872113 879175 chr1 933836 938416 12 1.84529e-30 6.90983e-28
## chr1 874165 879175 chr1 933340 938306 10 1.23139e-25 3.58932e-23
## chr1 889676 896594 chr1 933897 938982 13 4.91311e-36 2.33753e-33
## chr1 898753 907581 chr1 931133 939571 19 0.00000e+00 0.00000e+00
## chr1 910103 918775 chr1 930834 938627 15 2.20004e-43 1.32812e-40
## chr1 919314 922154 chr1 934212 937864 6 3.70292e-21 7.88551e-19
##---------------------------------------------------------------------------------------------
## The counts, pvalue and qvalue fields are not considered in our case
## it is up to the user to filter the interactions.
## The TFBS should be a BED file that contain the chromosome, start, end and the TF name
## Not run:
#
# ## load the different datasets
# petFile <- file.path(system.file("example",package="R3CPET"),"HepG2_interactions.txt")
# tfbsFile <- file.path(system.file("example",package="R3CPET"),"HepG2_TF.txt.gz")
#
# x <- ChiapetExperimentData(pet = petFile, tfbs= tfbsFile, IsBed = FALSE, ppiType="HPRD", filter= TRUE)
# ## build the diffrent indexes
# x <- createIndexes(x)
# x
#
# ## Pass objects instead of files.
# pet <- sample(pet(x),size = 20,replace = TRUE )
# tfbs <- sample(tfbs(x), size=300, replace=TRUE)
# ppi <- ppi(x)
# tst <- ChiapetExperimentData(pet = pet, tfbs= tfbs, ppi=ppi)
# tst <- createIndexes(tst)
# tst
# ## End(Not run)
Run the code above in your browser using DataLab