7bd3ab2b92d48520bf463fd43eeda13318dbe7cb braney Wed Aug 3 12:13:27 2016 -0700 make the doc and AS file for bigPsl a little more explicit about the file contents diff --git src/hg/lib/bigPsl.c src/hg/lib/bigPsl.c index 21df363..f244a1f 100644 --- src/hg/lib/bigPsl.c +++ src/hg/lib/bigPsl.c @@ -1,29 +1,29 @@ /* bigPsl.c was originally generated by the autoSql program, which also * generated bigPsl.h and bigPsl.sql. This module links the database and * the RAM representation of objects. */ #include "common.h" #include "linefile.h" #include "dystring.h" #include "jksql.h" #include "bigPsl.h" #include "psl.h" -char *bigPslCommaSepFieldNames = "chrom,chromStart,chromEnd,name,score,strand,thickStart,thickEnd,reserved,blockCount,blockSizes,chromStarts,oChromStart,oChromEnd,oStrand,oChromSize,oChromStarts,oSequence,oCDS,oBlock,match,misMatch,repMatch,nCount"; +char *bigPslCommaSepFieldNames = "chrom,chromStart,chromEnd,name,score,strand,thickStart,thickEnd,reserved,blockCount,blockSizes,chromStarts,oChromStart,oChromEnd,oStrand,oChromSize,oChromStarts,oSequence,oCDS,chromSize,match,misMatch,repMatch,nCount"; struct bigPsl *bigPslLoad(char **row) /* Load a bigPsl from row fetched with select * from bigPsl * from database. Dispose of this with bigPslFree(). */ { struct bigPsl *ret; AllocVar(ret); ret->blockCount = sqlSigned(row[9]); ret->chrom = cloneString(row[0]); ret->chromStart = sqlUnsigned(row[1]); ret->chromEnd = sqlUnsigned(row[2]); ret->name = cloneString(row[3]); ret->score = sqlUnsigned(row[4]); safecpy(ret->strand, sizeof(ret->strand), row[5]); @@ -134,31 +134,31 @@ ret->chromStarts[i] = sqlSignedComma(&s); } s = sqlEatChar(s, '}'); s = sqlEatChar(s, ','); } ret->oChromStart = sqlUnsignedComma(&s); ret->oChromEnd = sqlUnsignedComma(&s); sqlFixedStringComma(&s, ret->oStrand, sizeof(ret->oStrand)); ret->oChromSize = sqlUnsignedComma(&s); { int i; s = sqlEatChar(s, '{'); AllocArray(ret->oChromStarts, ret->blockCount); for (i=0; i<ret->blockCount; ++i) { - ret->oChromStarts[i] = sqlUnsignedComma(&s); + ret->oChromStarts[i] = sqlSignedComma(&s); } s = sqlEatChar(s, '}'); s = sqlEatChar(s, ','); } ret->oSequence = sqlStringComma(&s); ret->oCDS = sqlStringComma(&s); ret->chromSize = sqlUnsignedComma(&s); ret->match = sqlUnsignedComma(&s); ret->misMatch = sqlUnsignedComma(&s); ret->repMatch = sqlUnsignedComma(&s); ret->nCount = sqlUnsignedComma(&s); *pS = s; return ret; } @@ -246,31 +246,31 @@ fprintf(f, "%u", el->oChromStart); fputc(sep,f); fprintf(f, "%u", el->oChromEnd); fputc(sep,f); if (sep == ',') fputc('"',f); fprintf(f, "%s", el->oStrand); if (sep == ',') fputc('"',f); fputc(sep,f); fprintf(f, "%u", el->oChromSize); fputc(sep,f); { int i; if (sep == ',') fputc('{',f); for (i=0; i<el->blockCount; ++i) { - fprintf(f, "%u", el->oChromStarts[i]); + fprintf(f, "%d", el->oChromStarts[i]); fputc(',', f); } if (sep == ',') fputc('}',f); } fputc(sep,f); if (sep == ',') fputc('"',f); fprintf(f, "%s", el->oSequence); if (sep == ',') fputc('"',f); fputc(sep,f); if (sep == ',') fputc('"',f); fprintf(f, "%s", el->oCDS); if (sep == ',') fputc('"',f); fputc(sep,f); fprintf(f, "%u", el->chromSize); fputc(sep,f);