785731775908bbc9d7f0449772ca0f42a1e669fa braney Fri Apr 17 07:48:25 2015 -0700 add a few new feature types to the processing of gff3ToGenePred (rRNA, ncRNA, primary-transcript) diff --git src/hg/lib/genePred.c src/hg/lib/genePred.c index 8abeefe..d77e58a 100644 --- src/hg/lib/genePred.c +++ src/hg/lib/genePred.c @@ -1539,30 +1539,34 @@ } if (!foundCdsStart) gpError(errFh, errorCnt, "%s: %s cdsStart %u not in an exon", desc, gp->name, gp->cdsStart); if (!foundCdsEnd) gpError(errFh, errorCnt, "%s: %s cdsEnd %u not in an exon", desc, gp->name, gp->cdsEnd); } int genePredCheck(char *desc, FILE* errFh, int chromSize, struct genePred* gp) /* Validate a genePred for consistency. desc is printed the error messages * to file errFh (open /dev/null to discard). chromSize should contain * size of chromosome, or 0 if chrom is not valid, or -1 to not check * chromosome bounds. Returns count of errors. */ { int iExon; int errorCnt = 0; + +if (gp->name == NULL) + gpError(errFh, &errorCnt, "%s: name is null", desc); + if (!(sameString(gp->strand, "+") || sameString(gp->strand, "-"))) gpError(errFh, &errorCnt, "%s: %s invalid strand: \"%s\"", desc, gp->name, gp->strand); /* check chrom */ if (chromSize == 0) gpError(errFh, &errorCnt, "%s: %s chrom not a valid chromosome: \"%s\"", desc, gp->name, gp->chrom); else if (chromSize > 0) { if (gp->txEnd > chromSize) gpError(errFh, &errorCnt, "%s: %s txEnd %u >= chromSize %u", desc, gp->name, gp->txEnd, chromSize); } /* check internal consistency */ if (gp->txStart >= gp->txEnd) gpError(errFh, &errorCnt, "%s: %s txStart %u >= txEnd %u", desc, gp->name, gp->txStart, gp->txEnd);