Skip to content

Commit

Permalink
Merge pull request #5 from dpryan79/fix_jbrowse
Browse files Browse the repository at this point in the history
Change the order of the sections, putting the summary info before the…
  • Loading branch information
dpryan79 committed Feb 5, 2016
2 parents 80dd9cc + 4616405 commit f0db980
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bigWig.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
/*!
* The library version number
*/
#define LIBBIGWIG_VERSION 0.1.3
#define LIBBIGWIG_VERSION 0.1.4

/*!
* The magic number of a bigWig file.
Expand Down
10 changes: 5 additions & 5 deletions bwWrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,16 @@ int bwWriteHdr(bigWigFile_t *bw) {
}
}

//Write the chromosome list as a stupid freaking tree (because let's TREE ALL THE THINGS!!!)
bw->hdr->ctOffset = ftell(fp);
if(writeChromList(fp, bw->cl)) return 7;
if(writeAtPos(&(bw->hdr->ctOffset), sizeof(uint64_t), 1, 0x8, fp)) return 8;

//Update summaryOffset and write an empty summary block
bw->hdr->summaryOffset = ftell(fp);
if(fwrite(p, sizeof(uint8_t), 40, fp) != 40) return 10;
if(writeAtPos(&(bw->hdr->summaryOffset), sizeof(uint64_t), 1, 0x2c, fp)) return 11;

//Write the chromosome list as a stupid freaking tree (because let's TREE ALL THE THINGS!!!)
bw->hdr->ctOffset = ftell(fp);
if(writeChromList(fp, bw->cl)) return 7;
if(writeAtPos(&(bw->hdr->ctOffset), sizeof(uint64_t), 1, 0x8, fp)) return 8;

//Update the dataOffset
bw->hdr->dataOffset = ftell(fp);
if(writeAtPos(&bw->hdr->dataOffset, sizeof(uint64_t), 1, 0x10, fp)) return 12;
Expand Down

0 comments on commit f0db980

Please sign in to comment.