deeptools / pyBigWig

A python extension for quick access to bigWig and bigBed files
MIT License
216 stars 48 forks source link

Return location information when retrieve max value? #30

Closed AlicePsyche closed 7 years ago

AlicePsyche commented 7 years ago

Hi,

Sorry, I think it is a simple question but I could not find it in documentation. Is it possible that I could retrieve the corresponding position when try to identify the max value of a region?

bw.stats("chr1",72392,75996,type="max")

Thanks for your help!

dpryan79 commented 7 years ago

The only way to do that in a bigwig file is to request the intervals and then iterate over them. Bigwigs store the max value in their zoom levels, otherwise I would have made what you want an option :)

Sent from my iPhone

On 22 Mar 2017, at 05:20, AlicePsyche notifications@github.com wrote:

Hi,

Sorry, I think it is a simple question but I could not find it in documentation. Is it possible that I could retrieve the corresponding position when try to identify the max value of a region?

bw.stats("chr1",72392,75996,type="max") Thanks for your help!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

AlicePsyche commented 7 years ago

😫 😢 Thanks anyway.

It's a little embarrassing to ask here. Is it possible that you may recommend other tools can do this thing? Actually I want the summits location of called peaks from ChIP-seq data. Just to plot heatmap around the summits(the most enriched signals could be aligned straightly). I know I can do what you said(request the intervals and then iterate over them) but it sounds not elegant enough... I have the bam file and peaks bed file. Is there no way to quickly spot where the most enriched signals locate?

Thank you very much for your suggestions!

dpryan79 commented 7 years ago

Perhaps your peak caller notes where the summit is. Otherwise there's no way around iterating over something.

Sent from my iPhone

On 22 Mar 2017, at 08:49, AlicePsyche notifications@github.com wrote:

😫 😢 Thanks anyway.

It's a little embarrassing to ask here. Is it possible that you may recommend other tools can do this thing? Actually I want the summits location of called peaks from ChIP-seq data. Just to plot heatmap around the summits(the most enriched signals could be aligned straightly). I know I can do what you said(request the intervals and then iterate over them) but it sounds not elegant enough... I have the bam file and peaks bed file. Is there no way to quickly spot where the most enriched signals locate?

Thank you very much for your suggestions!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

AlicePsyche commented 7 years ago

Sorry for my ignorance... I intuitively thought there should be a easy way. Thanks for your help!