Exemplo n.º 1
0
static char *getProtAccVerIf(struct sqlConnection *conn, char *mrnaAcc, char *protAcc, char *buf, int bufSize)
/* if protAcc is not empty, get acc.version, otherwise return empty */
{
if (isEmpty(protAcc))
    return "";
else
    {
    int protVer = refSeqVerInfoGetVersion(protAcc, conn);
    if (protVer == 0)
        errAbort("no protein version entry for %s associated with %s", protAcc, mrnaAcc);
    safef(buf, bufSize, "%s.%d", protAcc, protVer);
    return buf;
    }
}
Exemplo n.º 2
0
static enum refSeqVerInfoStatus versionGetCheck(struct refSeqVerInfo *rsvi, struct sqlConnection *conn)
/* get or validate the version from the file against the database */
{
int dbVer = refSeqVerInfoGetVersion(rsvi->acc, conn);
if (dbVer == 0)
    {
    fprintf(stderr, "Error: RefSeq %s not in database\n", rsvi->acc);
    return refSeqVerInfoError;
    }
if ((rsvi->requestVer != 0) && (dbVer != rsvi->requestVer))
    {
    fprintf(stderr, "Error: RefSeq %s.%d requested in accList, database contains %s.%d \n", rsvi->acc, rsvi->requestVer, rsvi->acc, dbVer);
    return refSeqVerInfoError;
    }
rsvi->ver = dbVer;
return refSeqVerInfoOk;
}