generate ContactMatrix from InteractionSet object
2
0
Entering edit mode
@kamalfartiyal84-7976
Last seen 2.7 years ago
Cancer Research UK Cambridge Institute

Hi,

How do I convert InteractionSet to ContactMatrix? I have generated a InteractionSet object for a single HiC sample and now I want to generate genome wide interaction heatmap. Hence, input for that would be a genome wide ContactMatrix. However, I am unable to come up with a easy way to convert my InteractionSet object into ContactMatrix for that sample.

Kamal

diffhic • 535 views
0
Entering edit mode
Aaron Lun ★ 27k
@alun
Last seen 4 hours ago
The city by the bay

I would have thought that the inflate method would do the job:

example(InteractionSet, echo=FALSE) # yields an InteractionSet named "iset"
all.regions <- seq_along(regions(iset)) # use all regions for rows/columns
inflate(iset, all.regions, all.regions) # yields a ContactMatrix

I guess I could facilitate this process by automatically using all regions for rows or columns if either were not specified or set to NULL in the inflate call. Maybe it's not worth it, though; the code above is fairly simple and explicit, and I don't want people to accidentally use up all the memory on their machine by forgetting an argument and trying to expand the full interaction space with small (e.g., 5 kbp) bins.

Edit: In version 1.1.6, supplying NULL to either rows or columns in inflate will use all regions for that dimension.

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

Thanks it worked.