Closed maxdudek closed 1 year ago
Hi Max!
Good suggestion and I'll modify the function so the user can provide the path.
Regarding the error. Could you also send me your HepG2.optimal.bed file? (You can email me or via some secured way) My guess is that the function stores the bias in the form of a region-by-position bias. For example if you have 200k regions and each one is 1kb then it's stored as a 200k-by-1000 matrix. This means that we require all regions are resized to the same width. But I guess it would be easier to troubleshoot if I have the file and see whether I can reproduce the error.
Thank you!
Yan
Thanks for the quick reply!
That must be it, my regions are definitely not the same width. But now I'm confused about why that is a requirement. I thought that "regions" represented regions of open chromatin, which can have variable length? HepG2.optimal.bed
is a file of ATAC-seq peaks called from my data, so how would you recommend I convert this to a list of regions with equal width? Should I just resize each peak to be 1 kb around the midpoint?
Thanks again for your help!
Yes! What we usually do is resizing the ATAC-seq peak ranges to a fixed size such as 1kb around the midpiont. This is mainly for convenience of storing the precomputed bias (so that we can store them as a peak-by-position matrix). I think theoretically we could have also stored things in a list but a matrix makes things easier when you want to slice by row and column indices.
Thank you, I did that and it works now!
Hi,
I have a couple issues with the
getPrecomputedBias()
function.First, it's a bit confusing that the path to the h5 bias file is hard-coded, I had to edit getBias.R to make it work for my file structure. I would prefer if the path to the bias file could be provided as an argument to the function.
Second, I get an error when I run the function. I see the progress bar, and it goes up normally until it reaches 100% when it spits out this:
For reference, here is my code:
Any insights into this error? Thanks! Max