Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error plotting matrix #13

Open
rpetroll opened this issue Oct 25, 2024 · 1 comment
Open

Error plotting matrix #13

rpetroll opened this issue Oct 25, 2024 · 1 comment

Comments

@rpetroll
Copy link

Hi,

I am trying to plot a matrix heatmap including all chromosomes. I was able to import my .mcool file as an HiCExperiment object. But when trying to execute the plotMatrix argument, I am receiving the following error:

hic <- import(cf, format = "mcool")
hic

HiCExperiment object with 24,599,023 contacts over 1,195,338 regions
fileName: "spec1.final.mcool"
focus: "whole genome"
resolutions(10): 1000 5000 ... 1000000 2500000
active resolution: 1000
interactions: 13468294
scores(2): count balanced
topologicalFeatures: compartments(0) borders(0) loops(0) viewpoints(0)
pairsFile: N/A
metadata(0):

plotMatrix(hic, use.scores = 'balanced')

Error in if (fraction_ov > 0.9) { : missing value where TRUE/FALSE needed
In addition: Warning messages:
1: In all.as + all.ae : NAs produced by integer overflow
2: In all.as + all.ae : NAs produced by integer overflow
3: In GenomicRanges::width(bbOne) + GenomicRanges::width(bbTwo) :
NAs produced by integer overflow

Thanks a lot for your help!
Best,
Romy

@js2264
Copy link
Owner

js2264 commented Nov 4, 2024

Hi Romy,
This issue could arise from the fact that you matrix (seems) quite sparse, seeing you have ~1.2M regions and 13M interactions (pixels). Can you try plotting with plotMatrix(hic, use.scores = 'balanced', symmetrical = FALSE) ? This would skip the fraction_ov computation but should return only a triangular matrix.

Also, you are working with a pretty large genome (1.2M *1kb = 1.2Gb), and if you want to plot the genome-wide matrix, I would suggest importing the file with a lower resolution (eg 1000000) to try and plot it. I would guess the 1000 resolution is probably why you have this issue arising.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants