GithubHelp home page GithubHelp logo

BigBed interval problem about pybigwig HOT 7 OPEN

jtd032 avatar jtd032 commented on June 29, 2024
BigBed interval problem

from pybigwig.

Comments (7)

dpryan79 avatar dpryan79 commented on June 29, 2024

The maxVal is stored in the bigBed header. Could it be that it simply wasn't set for one of the files?

from pybigwig.

jtd032 avatar jtd032 commented on June 29, 2024

all files pull up a maxVal when tested
chr10 was successful but chr11 was not:
image
error msg:
image

from pybigwig.

dpryan79 avatar dpryan79 commented on June 29, 2024

Can you make the file available to me? I can have a look then.

from pybigwig.

YunfengLUMC avatar YunfengLUMC commented on June 29, 2024

Hi,
Currently, I'd like to know how to save the all entries into a file.
Here is my code:
bb=pyBigWig.open('./PBMCs_HistoneMarks_Blueprint/Males_UMCG00025_H3K4me1.peak_calls.bigBed' )
bb.entries('chrX', 16426, 156000962, withString=False)
So how can I output "bb.entries" object? By the way,for the bigBed object, how can I output all chromosomes intervals at one time, I found I need to specify start and end positions for each chromosome.
Again,if I use bigWig file, the intervals I extract is same as bigBed?Because I found start and end position is not necessary for bigWig file based on your description.
Many thx!

from pybigwig.

dpryan79 avatar dpryan79 commented on June 29, 2024

I don't know that I ever put in the logic in the .entries() function to have it fill in the chromosome bounds if nothing was supplied. I suppose that could be done, though since the python function is really just a thin wrapper over a C function and C is less flexible about such things.

For outputting the results of bb.entries(), it's just a list of tuples, so something like the following would work:

for res in bb.entries('chr1', 10000000, 10020000):
    o.write("chr1\t{}\t{}\t{}\n".format(res[0], res[1], res[2]))

from pybigwig.

YunfengLUMC avatar YunfengLUMC commented on June 29, 2024

I don't know that I ever put in the logic in the .entries() function to have it fill in the chromosome bounds if nothing was supplied. I suppose that could be done, though since the python function is really just a thin wrapper over a C function and C is less flexible about such things.

Thanks for your detailed reply.
Could I try this, I don't need strings:
for res in bb.entries('chr1', 10000000, 10020000, withString=False):
o.write("chr1".format(res[0], res[1], res[2]))
Best wishes!

from pybigwig.

dpryan79 avatar dpryan79 commented on June 29, 2024

o.write("chr1\t{}\t{}\n".format(res[0], res[1])) in that case as an example.

from pybigwig.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.