diffHic count data
1
0
Entering edit mode
@kamalfartiyal84-7976
Last seen 2.7 years ago
Cancer Research UK Cambridge Institute

I want to extract interaction data between specific region. Is it possible to do so with diffhic count function? I am doing this as part of pipeline where a few selected regions will be selected and interaction between them will be looked into more closely at varying resolutions. Hence, I don't want to re-run the analysis on complete data with different resolutions but focus on specific regions making it less time consuming.

I tried using the following commands. My regions of interest are "refgr". I used all the fragments matching this region to generate a new param object. I also restricted read extraction to specific chromosomes and also discarded all the other fragments. I tried various combinations of parameters but couldn't get the results and get same error as described below.

refgr <- GRanges(c("chr1","chr20"),IRanges(c(63997170,14499566),c(64500989,14999888)))
ov <- findOverlaps(refgr,hs.param$fragments) tokeep <- subjectHits(ov) new_frags <- hs.param$fragments[tokeep]
new.param <- reform(hs.param, fragments=new_frags)
data <- squareCounts("A006.h5", new.param, width=1e5, filter=1)

Error in .baseHiCParser(current[[anchor2]], files, anchor1, anchor2, chr.limits = frag.by.chr,  :

anchor1 index outside range of fragment object

diffhic • 616 views
0
Entering edit mode
Aaron Lun ★ 27k
@alun
Last seen 49 minutes ago
The city by the bay

You shouldn't modify fragments; this will break the code as diffHic assumes that the restriction fragment coordinates are the same as those used to construct the HDF5 file. Anyway, have a look at connectCounts, which allows you to get counts across (pairs of) regions of interest.