GithubHelp home page GithubHelp logo

creating a bw file about pybigwig HOT 5 CLOSED

deeptools avatar deeptools commented on June 25, 2024
creating a bw file

from pybigwig.

Comments (5)

dpryan79 avatar dpryan79 commented on June 25, 2024

While you can make pyBigWig accept input like that, the resulting file will largely be useless. For a bigWig file to have normal functionality, all entries for each chromosome must be together. This is true regardless of the program used.

Sent from my iPhone

On 21 May 2016, at 14:37, PanosFirmpas [email protected] wrote:

hello,

I'm writing a script that goes from a bam input to a bw output (it's in my github page if you feel like checking it out, input would be very welcome!).

Right now, my script outputs wiggle "strings" in a subprocess pipe to wigToBigWig(the ucsc utility). This is very convenient since wigtobigwig seems to accept the input with no concerns that the chromosomes are out of order, as long as the input per chromosome is in order

for example:

chromosome 2 start:100 step 1:
1
2
1
chromosome 1 start:100 step 1:
1
2
1
chromosome 2 start:200 step 1:
1
2
1
chromosome 1 start:200 step 1:
1
2
1

works fine because the input for each chromosome is in proper order.

does that work with pyBigWig?

If it does i think it should provide a nice speed boost for my script !


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

from pybigwig.

PanosFirmpas avatar PanosFirmpas commented on June 25, 2024

Could you please elaborate a bit on the file being useless? the output i get seems like what you'd expect it to be (on the browser, around genomic locations we're familiar with), am I getting noise and haven't noticed?

from pybigwig.

dpryan79 avatar dpryan79 commented on June 25, 2024

Presumably the program you're feeding interleaved regions to sorts them before actually writing them to a file. bigWig files themselves actually require that intervals from a given chromosome be next to each other and in a sorted order in order for the indexing to work. Since pyBigWig doesn't sort the regions for you it'll produce the file with regions in the order provided...which will produce a bigWig file with a broken index.

Anyway, unless validate=False is used, pyBigWig will also prevent creation of a file with a broken index.

from pybigwig.

dpryan79 avatar dpryan79 commented on June 25, 2024

As an aside, your bamToBigWig program sounds like our bamCoverage program from deepTools.

from pybigwig.

PanosFirmpas avatar PanosFirmpas commented on June 25, 2024

It does look very similar indeed, I'm sorry i didn't know about your tool, but well this was a nice learning experience for me !

Thank you for the comments on bigwigs, it looks like i need to do some testing!!

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.