Ensembl/WiggleTools

error accesing remote bigWig

Closed this issue · 7 comments

I am attempting to access a ENCODE bigWig by URL

wiggletools overlaps promoter-region.bb https://encode-public.s3.amazonaws.com/2017/10/03/ad2c0f17-0824-4647-a749-74276daca7da/ENCFF278CUB.bigWig

I get the error:

[urlOpen] curl_easy_perform received an error: Failed writing received data to disk/application File https://encode-public.s3.amazonaws.com/2017/10/03/ad2c0f17-0824-4647-a749-74276daca7da/ENCFF278CUB.bigWig is not in BigWig format

If the bigWig is download locally, this works fine.

The bigBed containes one record:
chr19 6925784 6926845

thanks!

Hello @diekhans,

I suspect this has to do with the LibBigWig library that we use in WiggleTools.

I'll create a reproducible test then send it their way.

Cheers,

Daniel

Now discussed here: dpryan79/libBigWig#49

Hello @diekhans ,

Thanks to Devon's advice I now got it working on remote files. Naturally, this is much slower than on a local file, no miracle there.

HTH,

Daniel

Yes, it does pull the whole wig.

What exactly is you use case? Why do you want to use WiggleTools rather than bigWigToBedGraph?

  • If you want to do some fancy analysis downstream for a single region you could use the wiggletools seek function.
  • If you want to compute a statistic at multiple regions, you could use apply
  • If you convince me of a good alternate use case, then I could quite quickly implement a seek_regions function, that goes through a bed file like like the existing apply function, seeks those regions, then iterates through them.

Ahhh you should have said so:
wiggletools apply AUC regions.bed signal.wig

This does random access and allows you to check multiple regions.

apply_paste may also be of interest.