Hello Malcolm Cook, As you've noticed, when you're giving bigWigSummary coordinate input on the command line, it's expecting it in our bed format, which is zero based. This is the standard way the our utilities work, but it is strange in the context of converted wig files which used a one based system. We'll make a note of the need to use zero based coordinates in the bigWigSummary usage message.
Thanks for pointing this out to us. Brian On Fri, Feb 18, 2011 at 11:36 AM, Cook, Malcolm <[email protected]> wrote: > I find that querying a wig file using bigWigSummary requires the query start > and end to use 0-based half open coordinates even though wig files are > specified using 1-based close coordinates. > > Is this as designed? > > Below is my evidence of the issue (if indeed it is an issue). > > Thanks > Malcolm Cook > > > # Given the following as the contents of my wigfile >> cat t1.wig > fixedStep chrom=chrA start=1 step=1 span=1 > 0.1 > 0.2 > fixedStep chrom=chrA start=5 step=1 span=1 > 0.5 > 0.6 > fixedStep chrom=chrA start=8 step=1 span=1 > 0.8 > 0.987654321 > 1 > fixedStep chrom=chrA start=15 step=1 span=1 > 15 > 16 > 17 > 18 > 19 > 20 > 20 > 20 > 20 > 20 > 20 > > # and the following chromSize: >> cat t1.chromsSizes.tab > chrA 25 > > # I can produce a bigwig as >> wigToBigWig t1.wig t1.chromsSizes.tab t1.bigWig > > # and can "roundtrip" it perfectly back to wig format, since there is no > output from: > bigWigToWig t1.bigWig stdout | diff t1.wig - > > So far so good. > > # But, when I try to extract the first 5 scores using 1-based indexing, the > 1st value is returned incorrectly, viz: >> bigWigSummary t1.bigWig chrA 0 5 5 > 0.2 0.2 n/a n/a 0.5 > > However, using 0 based indexing returns what I expect: >> bigWigSummary t1.bigWig chrA 0 5 5 > 0.1 0.2 n/a n/a 0.5 > > > Malcolm Cook > Stowers Institute for Medical Research - Bioinformatics > Kansas City, Missouri USA > > > > _______________________________________________ > Genome maillist - [email protected] > https://lists.soe.ucsc.edu/mailman/listinfo/genome > _______________________________________________ Genome maillist - [email protected] https://lists.soe.ucsc.edu/mailman/listinfo/genome
