-
Notifications
You must be signed in to change notification settings - Fork 115
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
bedgraph loading is very slow #13
Comments
Honestly, it takes less time to convert the bedgraph to bigwig than to wait each time you want to plot something. We use UCSCTools wigToBigWig or bedGraphToBigWig and they are fast. Pandas has super optimized parsers that can read tables very fast. But besides reading the file, pyGenomeTracks needs to create an interval tree of the bedgraph file to be able to index it and this also adds some further time. Other solution, besides the bigwig idea, is to split your bedgraph per chromosome. In the case of a mammalian size genome, that should reduce the loading time by about 20 times (e.g. 1 min vs. 20). |
@Phlya I added support for tabix files for the bedGraph Track. If you convert to bedgraph file to tabix, then the loading is quite fast. To convert to tabix you need to have samtools installed and do: $ sort -k1,1 -k2,2n bedgraph_file | bgzip > bedgraph_file_sorted.bg.bgz
$ tabix -p bed bedgraph_file_sorted.bg.bgz |
Awesome, thanks! |
Hi, I recently discovered pyGenomeTracks and I’m very pleased to start using. The tabix support for bedgraph indeed allows to speed-up the loading of the data. Is this a normal behavior? Am I missing something obvious?
|
Hi, Thanks |
Hi,
Out of curiosity: I thought that one could use the Thanks for this very nice piece of work |
The |
Hi, I understand that bigWigs should be preferred to bedgraphs for high resolution data, and they should be much faster than bedgraphs, but currently it seems that loading bedgraphs is unreasonably slow... A ~360Mb file takes a few seconds to load with pandas, but I have been waiting a few minutes for it to load as a
BedGraphTrack
and just had to interrupt it because I got bored. Is it something that might get improved? Thanks!The text was updated successfully, but these errors were encountered: