GithubHelp home page GithubHelp logo

Comments (4)

dpryan79 avatar dpryan79 commented on September 26, 2024

The first base is at position 0 in a "zero-based half open" coordinate system. This is the same as for BED files and BAM files, for what it's worth. For example, the following specifies the first base in bed format:

chr1 0 1

I didn't come up with the format, this is just for consistency with it.

All bigWigs are always 0-based, the coordinates are never different. Fixed and variable-step files are also 0-based half open. This is different from the wiggle format, which always uses 1-based coordinates.

from libbigwig.

andrewyatz avatar andrewyatz commented on September 26, 2024

Don't worry I'm not placing the sole responsibility for the coordinate system at your door. Far from it. I'm part of the Ensembl project and am fully aware of the UCSC coordinate scheme however there are times it catches me out.

As to your last point I believe I got my info from this blog post by the UCSC genome browser team. http://genome.ucsc.edu/blog/the-ucsc-genome-browser-coordinate-counting-systems/. Specifically the last bit concerning wiggle files. They way they had structured this it looked to me that fixed and variable step are stored in a BigWig as 1-start fully closed.

However if they're not then I can stop worrying and assume everything is 0-based, half-open that makes everything a lot easier to understand.

Thanks

from libbigwig.

dpryan79 avatar dpryan79 commented on September 26, 2024

I think they're just inconsistent in the wiggle format...which is crazy. To my knowledge bigWigs are always consistent here, or at least any produced by this library are.

from libbigwig.

andrewyatz avatar andrewyatz commented on September 26, 2024

That's fantastic to hear!

from libbigwig.

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.