guigolab / ggsashimi

Command-line tool for the visualization of splicing events across multiple samples
MIT License
122 stars 42 forks source link

Aggregation doesn't work with long genomic regions #14

Closed ramanktalwar closed 4 years ago

ramanktalwar commented 5 years ago

Hi, it seems that the mean and median aggregate functions throw an error if the genomic region is too large. I'm currently looking at a region 147,000 bases long and am getting this error when I try and use the mean or median aggregation

Error in j[4] = as.numeric(d[x == j[2] + 1, y]) : replacement has length zero Execution halted

It works just fine if I remove the aggregation or if I shrink the genomic region. What may be causing this?

emi80 commented 5 years ago

Hi @ramanktalwar,

sometimes introns crossing the boundaries of the genomic region might be problematic. So, one possibility is to try changing the region start and/or end coordinates.

If that does not help, could you please send a slice of that region from at least two bam files so that we can reproduce the issue?

dgarrimar commented 5 years ago

Hi @ramanktalwar, did you finally fix your issue? Can we help in something else?

ramanktalwar commented 5 years ago

Hi @dgarrimar, thanks for your response! I actually did not resolve this issue, mostly because I was able to visualize what I needed by simply making the image larger (that way there was less overlap).

MRMacArthur commented 5 years ago

Hello @emi80 @ramanktalwar thank you very much for the nice package, the plots are great but I am running into the same problem of aggregation.

I have made a toy example so I think if you clone this repository and run the command in the readme you should be able to reproduce the error. https://github.com/MRMacArthur/ggsashimi_toy

emi80 commented 4 years ago

Fixed via 4bc5982