generate ContactMatrix from InteractionSet object
2
0
Entering edit mode
@kamalfartiyal84-7976
Last seen 5.8 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 • 1.1k views
ADD COMMENT
0
Entering edit mode
Aaron Lun ★ 28k
@alun
Last seen 2 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.

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

Thanks it worked.

ADD COMMENT

Login before adding your answer.

Traffic: 583 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6