Closed jemilianosf closed 4 years ago
Thanks, @jemilianosf , for noticing this. @jstansfield0, what are your thoughts?
I don't have any cooler files at hand on my computer so I can't check for sure, but I think that I started the sequence at one because it is assumed that the chromosome numbers will start at 1. And typically counting in R starts at 1. I guess with your file it starts at 0 for some reason. Not sure if this typical for cooler files now or not. But basically that line is just assigning an ID value for each chromosome in the dataset.
Closing due to inactivity.
Hi,
I noticed that in the cooler2bedpe function, in the part
ids <- data.frame(chr = dump$bins$chrom, start = dump$bins$start, end = dump$bins$end, id = seq(1, length(dump$bins$chrom), by = 1))
mat <- data.frame(bin1 = dump$pixels$bin1_id, bin2 = dump$pixels$bin2_id, IF = dump$pixels$count)
The ids start with 1, and in mat the ids start at 0.I think this might be an issue because I was trying to import a cool file and the sum of IF didn't match the cooler info size.
After changing
seq(1, length(dump$bins$chrom), by = 1))
to
seq(0, length(dump$bins$chrom)-1, by = 1))
the issue was solved.