Ejemplo n.º 1
0
static struct extFile* extFileGet(struct extFileTbl* extFileTbl, char *acc, int extFileId)
/* get the extFile for an accession given it's id.  Return NULL if id is not
 * valid */
{
struct extFile* extFile = extFileTblFindById(extFileTbl, extFileId);
if (extFile == NULL)
    gbVerbMsg(3, "%s: gbExtFile id %d not in gbExtFile table", acc, extFileId);
return extFile;
}
static struct extFile* getExtFile(char *acc, struct extFileTbl* extFileTbl,
                                  HGID seqExtFile)
/* get the extFile by id, reporting if not in table */
{
struct extFile* extFile = extFileTblFindById(extFileTbl, seqExtFile);

/* check if in ext file table */
if (extFile == NULL)
    {
    /* only reported the first time */
    char seqExtStr[32];
    safef(seqExtStr, sizeof(seqExtStr), "%d", seqExtFile);
    if (!alreadyReported(missingExtFileIds, seqExtStr))
        {
        gbError("%s: gbSeq.gbExtFile (%d) not in gbExtFile table", acc,
                seqExtFile);
        flagReported(missingExtFileIds, seqExtStr);
        }
    }
return extFile;
}