本文整理汇总了C++中AllocArray函数的典型用法代码示例。如果您正苦于以下问题:C++ AllocArray函数的具体用法?C++ AllocArray怎么用?C++ AllocArray使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了AllocArray函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AllocVar
struct sample *groupByPosition(int grouping , struct sample *sampList)
{
struct sample *groupedList = NULL, *samp = NULL, *currSamp = NULL, *sampNext=NULL;
int count = 0;
for(samp = sampList; samp != NULL; samp = sampNext)
{
sampNext = samp->next;
AllocVar(currSamp);
currSamp->chrom = cloneString(samp->chrom);
currSamp->chromStart = samp->chromStart;
currSamp->name = cloneString(samp->name);
snprintf(currSamp->strand, sizeof(currSamp->strand), "%s", samp->strand);
AllocArray(currSamp->samplePosition, grouping);
AllocArray(currSamp->sampleHeight, grouping);
count = 0;
while(samp != NULL && count < grouping && sameString(samp->chrom,currSamp->chrom))
{
addSampleToCurrent(currSamp, samp, grouping);
count += samp->sampleCount;
samp = sampNext = samp->next;
}
if(count != 0)
currSamp->score = currSamp->score / count;
currSamp->chromEnd = currSamp->chromStart + currSamp->samplePosition[count -1];
slAddHead(&groupedList, currSamp);
}
slReverse(&groupedList);
return groupedList;
}
示例2: AllocVar
struct cdsEvidence *createCds(struct dnaSeq *seq, int start, int end,
int *upAtgCount, int *upKozakCount, int lastIntronPos,
struct orthoCdsArray *orthoList, double orthoWeightPer)
/* Return new cdsEvidence on given sequence at given position. */
{
struct cdsEvidence *orf;
AllocVar(orf);
int size = end - start;
size -= size % 3;
end = start + size;
orf->name = cloneString(seq->name);
orf->start = start;
orf->end = end;
orf->source = cloneString("txCdsPredict");
orf->accession = cloneString(".");
orf->score = orfScore(orf, seq, upAtgCount, upKozakCount, lastIntronPos,
orthoList, orthoWeightPer);
orf->startComplete = startsWith("atg", seq->dna + start);
orf->endComplete = isStopCodon(seq->dna + end - 3);
orf->cdsCount = 1;
AllocArray(orf->cdsStarts, 1);
orf->cdsStarts[0] = start;
AllocArray(orf->cdsSizes, 1);
orf->cdsSizes[0] = size;
return orf;
}
示例3: initTitleHelper
void initTitleHelper(struct titleHelper *th, char *track, int startIx, int centerIx, int endIx,
int nRecords, struct vcfFile *vcff)
/* Set up info including arrays of ref & alt alleles for cluster mouseover. */
{
th->track = track;
th->startIx = startIx;
th->centerIx = centerIx;
th->endIx = endIx;
th->nRecords = nRecords;
int len = endIx - startIx;
AllocArray(th->refs, len);
AllocArray(th->alts, len);
struct vcfRecord *rec;
int i;
for (rec = vcff->records, i = 0; rec != NULL && i < endIx; rec = rec->next, i++)
{
if (i < startIx)
continue;
char refAl[16];
abbrevAndHandleRC(refAl, sizeof(refAl), rec->alleles[0]);
th->refs[i-startIx] = vcfFilePooledStr(vcff, refAl);
char altAl1[16];
abbrevAndHandleRC(altAl1, sizeof(altAl1), rec->alleles[1]);
tolowers(altAl1);
th->alts[i-startIx] = vcfFilePooledStr(vcff, altAl1);
}
}
示例4: contigFromAffyPairName
struct sample *sampFromAffyPair(struct affyPairs *ap, struct hash *liftHash)
/* Use the data in the affy pair and the offset info in the hash to make a
sample data type. */
{
struct sample *samp = NULL;
struct liftSpec *lf = NULL;
char *name = contigFromAffyPairName(ap->probeSet);
float score = 0;
if(name != NULL)
{
lf = hashFindVal(liftHash, name);
freez(&name);
}
if(lf != NULL)
{
AllocVar(samp);
samp->chrom = cloneString(lf->newName);
samp->chromStart = samp->chromEnd = ap->pos + lf->offset;
samp->name = cloneString("a");
score = (ap->pm) - (ap->mm);
if(score < 1)
score = 1;
samp->score = (int)score;
sprintf(samp->strand, "+");
samp->sampleCount = 1;
AllocArray(samp->samplePosition, samp->sampleCount);
samp->samplePosition[0] = 0;
AllocArray(samp->sampleHeight, samp->sampleCount);
samp->sampleHeight[0] = samp->score;
}
return samp;
}
示例5: AllocVar
struct sample *avgSamples(struct sample *s1,
struct sample *s2,
struct sample *s3,
int expIndex, int index)
{
struct sample *ret = NULL; //, *s1, *s2, *s3;
int i;
/* s1 = (struct sample *)slElementFromIx(sList1, index); */
/* s2 = (struct sample *)slElementFromIx(sList2, index); */
/* s3 = (struct sample *)slElementFromIx(sList3, index); */
AllocVar(ret);
ret->chrom = cloneString(s1->chrom);
ret->chromStart = s1->chromStart;
ret->chromEnd = s1->chromEnd;
ret->name = getNameForExp(expIndex);
snprintf(ret->strand, sizeof(ret->strand), "%s", s1->strand);
ret->sampleCount = s1->sampleCount;
AllocArray(ret->samplePosition, ret->sampleCount);
AllocArray(ret->sampleHeight, ret->sampleCount);
ret->score = (s1->score + s2->score + s3->score)/3;
for(i=0;i<ret->sampleCount; i++)
{
ret->samplePosition[i] = s1->samplePosition[i];
if(!((s1->samplePosition[i] == s2->samplePosition[i]) && (s2->samplePosition[i] == s3->samplePosition[i])))
errAbort("avgTranscriptomeExps::avgSamples() - for probe %s:%d-%d positions at index %i don't agree. %d, %d, %d",
ret->chrom, ret->chromStart, ret->chromEnd, i, s1->samplePosition[i], s2->samplePosition[i], s3->samplePosition[i]);
ret->sampleHeight[i] = (s1->sampleHeight[i] + s2->sampleHeight[i] + s3->sampleHeight[i])/3;
}
return ret;
}
示例6: AllocVar
struct snp125CodingCoordless *snp125CodingCoordlessCommaIn(char **pS, struct snp125CodingCoordless *ret)
/* Create a snp125CodingCoordless out of a comma separated string.
* This will fill in ret if non-null, otherwise will
* return a new snp125CodingCoordless */
{
char *s = *pS;
if (ret == NULL)
AllocVar(ret);
ret->name = sqlStringComma(&s);
ret->transcript = sqlStringComma(&s);
ret->frame = sqlEnumComma(&s, values_frame, &valhash_frame);
ret->alleleCount = sqlSignedComma(&s);
{
int i;
s = sqlEatChar(s, '{');
AllocArray(ret->funcCodes, ret->alleleCount);
for (i=0; i<ret->alleleCount; ++i)
{
ret->funcCodes[i] = sqlUnsignedComma(&s);
}
s = sqlEatChar(s, '}');
s = sqlEatChar(s, ',');
}
{
int i;
s = sqlEatChar(s, '{');
AllocArray(ret->alleles, ret->alleleCount);
for (i=0; i<ret->alleleCount; ++i)
{
ret->alleles[i] = sqlStringComma(&s);
}
s = sqlEatChar(s, '}');
s = sqlEatChar(s, ',');
}
{
int i;
s = sqlEatChar(s, '{');
AllocArray(ret->codons, ret->alleleCount);
for (i=0; i<ret->alleleCount; ++i)
{
ret->codons[i] = sqlStringComma(&s);
}
s = sqlEatChar(s, '}');
s = sqlEatChar(s, ',');
}
{
int i;
s = sqlEatChar(s, '{');
AllocArray(ret->peptides, ret->alleleCount);
for (i=0; i<ret->alleleCount; ++i)
{
ret->peptides[i] = sqlStringComma(&s);
}
s = sqlEatChar(s, '}');
s = sqlEatChar(s, ',');
}
*pS = s;
return ret;
}
示例7: AllocVar
struct bed *bedForIv(struct intronEv *iv)
/** Make a bed to represent a intronEv structure. */
{
struct bed *bed = NULL;
AllocVar(bed);
bed->chrom = cloneString(iv->chrom);
bed->chromStart = bed->thickStart = iv->e1S;
bed->chromEnd = bed->thickEnd = iv->e2E;
bed->name = cloneString(iv->ev->orthoBed->name);
if(iv->orientation == 1)
safef(bed->strand, sizeof(bed->strand), "+");
else if(iv->orientation == -1)
safef(bed->strand, sizeof(bed->strand), "-");
else
safef(bed->strand, sizeof(bed->strand), "%s", iv->ev->orthoBed->strand);
bed->blockCount = 2;
AllocArray(bed->chromStarts, 2);
bed->chromStarts[0] = iv->e1S - bed->chromStart;
bed->chromStarts[1] = iv->e2S - bed->chromStart;
AllocArray(bed->blockSizes, 2);
bed->blockSizes[0] = iv->e1E - iv->e1S;
bed->blockSizes[1] = iv->e2E - iv->e2S;
bed->score = scoreForIntronEv(iv);
return bed;
}
示例8: bitmapToMaskArray
void bitmapToMaskArray(struct hash *bitmapHash, struct hash *tbHash)
/* Translate each bitmap in bitmapHash into an array of mask coordinates
* in the corresponding twoBit in tbHash. Assume tbHash's mask array is
* empty at the start -- we allocate it here. Free bitmap when done. */
{
struct hashCookie cookie = hashFirst(tbHash);
struct hashEl *hel = NULL;
while ((hel = hashNext(&cookie)) != NULL)
{
char *seqName = hel->name;
struct twoBit *tb = (struct twoBit *)(hel->val);
struct hashEl *bHel = hashLookup(bitmapHash, seqName);
Bits *bits;
unsigned start=0, end=0;
assert(tb != NULL);
assert(tb->maskBlockCount == 0);
if (bHel == NULL)
errAbort("Missing bitmap for seq \"%s\"", seqName);
bits = (Bits *)bHel->val;
if (bits != NULL)
{
struct lm *lm = lmInit(0);
struct unsignedRange *rangeList = NULL, *range = NULL;
int i;
for (;;)
{
start = bitFindSet(bits, end, tb->size);
if (start >= tb->size)
break;
end = bitFindClear(bits, start, tb->size);
if (end > start)
{
lmAllocVar(lm, range);
range->start = start;
range->size = (end - start);
slAddHead(&rangeList, range);
}
}
slReverse(&rangeList);
tb->maskBlockCount = slCount(rangeList);
if (tb->maskBlockCount > 0)
{
AllocArray(tb->maskStarts, tb->maskBlockCount);
AllocArray(tb->maskSizes, tb->maskBlockCount);
for (i = 0, range = rangeList; range != NULL;
i++, range = range->next)
{
tb->maskStarts[i] = range->start;
tb->maskSizes[i] = range->size;
}
}
lmCleanup(&lm);
bitFree(&bits);
bHel->val = NULL;
}
}
}
示例9: dbFindFieldsWith
void dbFindFieldsWith(char *database, char *regExp, char *output)
/* dbFindFieldsWith - Look through database and find fields that have elements matching a certain pattern in the first N rows.. */
{
regex_t re;
int err = regcomp(&re, regExp, REG_NOSUB|REG_EXTENDED);
if (err < 0)
errAbort("regcomp failed code %d", err);
struct sqlConnection *conn = sqlConnect(database);
struct slName *table, *tableList = sqlQuickList(conn, "NOSQLINJ show tables");
FILE *f = mustOpen(output, "w");
for (table = tableList; table != NULL; table = table->next)
{
char query[256];
sqlSafef(query, sizeof(query), "select * from %s limit %d", table->name, maxRows);
verbose(2, "%s.%s\n", database, table->name);
struct sqlResult *sr = sqlGetResult(conn, query);
if (sr != NULL)
{
int colCount = sqlCountColumns(sr);
/* Get labels for columns */
char **labels;
AllocArray(labels, colCount);
int i;
for (i=0; i<colCount; ++i)
labels[i] = sqlFieldName(sr);
/* Get flags that say which fields we've reported. */
bool *flags;
AllocArray(flags, colCount);
char **row;
while ((row = sqlNextRow(sr)) != NULL)
{
int i;
for (i=0; i<colCount; ++i)
{
char *field = row[i];
if (field != NULL && field[0] != 0)
{
if (regexec(&re, row[i], 0, NULL, 0) == 0)
{
if (!flags[i])
{
flags[i] = TRUE;
fprintf(f, "%s\t%s\t%s\n", table->name, labels[i], row[i]);
}
}
}
}
}
sqlFreeResult(&sr);
freez(&flags);
freez(&labels);
}
}
carefulClose(&f);
}
示例10: AllocVar
struct cutter *cutterCommaIn(char **pS, struct cutter *ret)
/* Create a cutter out of a comma separated string.
* This will fill in ret if non-null, otherwise will
* return a new cutter */
{
char *s = *pS;
if (ret == NULL)
AllocVar(ret);
ret->name = sqlStringComma(&s);
ret->size = sqlUnsignedComma(&s);
ret->matchSize = sqlUnsignedComma(&s);
ret->seq = sqlStringComma(&s);
ret->cut = sqlUnsignedComma(&s);
ret->overhang = sqlSignedComma(&s);
ret->palindromic = sqlUnsignedComma(&s);
ret->semicolon = sqlUnsignedComma(&s);
ret->numSciz = sqlUnsignedComma(&s);
{
int i;
s = sqlEatChar(s, '{');
AllocArray(ret->scizs, ret->numSciz);
for (i=0; i<ret->numSciz; ++i)
{
ret->scizs[i] = sqlStringComma(&s);
}
s = sqlEatChar(s, '}');
s = sqlEatChar(s, ',');
}
ret->numCompanies = sqlUnsignedComma(&s);
{
int i;
s = sqlEatChar(s, '{');
AllocArray(ret->companies, ret->numCompanies);
for (i=0; i<ret->numCompanies; ++i)
{
ret->companies[i] = sqlCharComma(&s);
}
s = sqlEatChar(s, '}');
s = sqlEatChar(s, ',');
}
ret->numRefs = sqlUnsignedComma(&s);
{
int i;
s = sqlEatChar(s, '{');
AllocArray(ret->refs, ret->numRefs);
for (i=0; i<ret->numRefs; ++i)
{
ret->refs[i] = sqlUnsignedComma(&s);
}
s = sqlEatChar(s, '}');
s = sqlEatChar(s, ',');
}
*pS = s;
return ret;
}
示例11: avgTranscriptomeExps
void avgTranscriptomeExps()
{
struct sample *s = NULL;
struct sample *s1,*s2,*s3;
struct sample *sList1, *sList2, *sList3 = NULL;
struct sample **sArray1, **sArray2, **sArray3 = NULL;
int i,j,k;
FILE *out = NULL;
for(i=1; i<12; i++)
{
for(j='a'; j<'d'; j++)
{
char buff[2048];
int count;
struct sample *avgList = NULL, *avg;
if((i != 6 || j != 'a') || doAll)
{
snprintf(buff, sizeof(buff), "%d.%c.1.%s", i,j,suffix);
printf("Averaging %s\n", buff);
sList1 = sampleLoadAll(buff);
snprintf(buff, sizeof(buff), "%d.%c.2.%s", i,j,suffix);
sList2 = sampleLoadAll(buff);
snprintf(buff, sizeof(buff), "%d.%c.3.%s", i,j,suffix);
sList3 = sampleLoadAll(buff);
count = slCount(sList1);
AllocArray(sArray1,count);
AllocArray(sArray2,count);
AllocArray(sArray3,count);
for(k=0, s1=sList1, s2=sList2, s3=sList3; k<count; s1=s1->next,s2=s2->next,s3=s3->next, k++)
{
sArray1[k] = s1;
sArray2[k] = s2;
sArray3[k] = s3;
}
for(k=0;k<count; k++)
{
avg = avgSamples(sArray1[k], sArray2[k], sArray3[k], i, k);
slAddHead(&avgList, avg);
}
slReverse(&avgList);
snprintf(buff, sizeof(buff), "%d.%c.1.%s.avg", i,j,suffix);
out = mustOpen(buff, "w");
for(s = avgList; s != NULL; s = s->next)
sampleTabOut(s, out);
carefulClose(&out);
freez(&sArray1);
freez(&sArray2);
freez(&sArray3);
sampleFreeList(&avgList);
sampleFreeList(&sList1);
sampleFreeList(&sList2);
sampleFreeList(&sList3);
}
}
}
}
示例12: AllocVar
struct hgTranscript *hgTranscriptCommaIn(char **pS)
/* Create a hgTranscript out of a comma separated string. */
{
struct hgTranscript *ret;
char *s = *pS;
int i;
AllocVar(ret);
ret->id = sqlUnsignedComma(&s);
ret->name = sqlStringComma(&s);
ret->hgGene = sqlUnsignedComma(&s);
ret->startBac = sqlUnsignedComma(&s);
ret->startPos = sqlUnsignedComma(&s);
ret->endBac = sqlUnsignedComma(&s);
ret->endPos = sqlUnsignedComma(&s);
ret->cdsStartBac = sqlUnsignedComma(&s);
ret->cdsStartPos = sqlUnsignedComma(&s);
ret->cdsEndBac = sqlUnsignedComma(&s);
ret->cdsEndPos = sqlUnsignedComma(&s);
ret->orientation = sqlSignedComma(&s);
ret->exonCount = sqlUnsignedComma(&s);
s = sqlEatChar(s, '{');
AllocArray(ret->exonStartBacs, ret->exonCount);
for (i=0; i<ret->exonCount; ++i)
{
ret->exonStartBacs[i] = sqlUnsignedComma(&s);
}
s = sqlEatChar(s, '}');
s = sqlEatChar(s, ',');
s = sqlEatChar(s, '{');
AllocArray(ret->exonStartPos, ret->exonCount);
for (i=0; i<ret->exonCount; ++i)
{
ret->exonStartPos[i] = sqlUnsignedComma(&s);
}
s = sqlEatChar(s, '}');
s = sqlEatChar(s, ',');
s = sqlEatChar(s, '{');
AllocArray(ret->exonEndBacs, ret->exonCount);
for (i=0; i<ret->exonCount; ++i)
{
ret->exonEndBacs[i] = sqlUnsignedComma(&s);
}
s = sqlEatChar(s, '}');
s = sqlEatChar(s, ',');
s = sqlEatChar(s, '{');
AllocArray(ret->exonEndPos, ret->exonCount);
for (i=0; i<ret->exonCount; ++i)
{
ret->exonEndPos[i] = sqlUnsignedComma(&s);
}
s = sqlEatChar(s, '}');
s = sqlEatChar(s, ',');
*pS = s;
return ret;
}
示例13: AllocVar
struct pslWQueryID *pslWQueryIDCommaIn(char **pS, struct pslWQueryID *ret)
/* Create a pslWQueryID out of a comma separated string.
* This will fill in ret if non-null, otherwise will
* return a new pslWQueryID */
{
char *s = *pS;
int i;
if (ret == NULL)
AllocVar(ret);
ret->matches = sqlUnsignedComma(&s);
ret->misMatches = sqlUnsignedComma(&s);
ret->repMatches = sqlUnsignedComma(&s);
ret->nCount = sqlUnsignedComma(&s);
ret->qNumInsert = sqlUnsignedComma(&s);
ret->qBaseInsert = sqlUnsignedComma(&s);
ret->tNumInsert = sqlUnsignedComma(&s);
ret->tBaseInsert = sqlUnsignedComma(&s);
sqlFixedStringComma(&s, ret->strand, sizeof(ret->strand));
ret->qName = sqlStringComma(&s);
ret->qSize = sqlUnsignedComma(&s);
ret->qStart = sqlUnsignedComma(&s);
ret->qEnd = sqlUnsignedComma(&s);
ret->tName = sqlStringComma(&s);
ret->tSize = sqlUnsignedComma(&s);
ret->tStart = sqlUnsignedComma(&s);
ret->tEnd = sqlUnsignedComma(&s);
ret->blockCount = sqlUnsignedComma(&s);
s = sqlEatChar(s, '{');
AllocArray(ret->blockSizes, ret->blockCount);
for (i=0; i<ret->blockCount; ++i)
{
ret->blockSizes[i] = sqlUnsignedComma(&s);
}
s = sqlEatChar(s, '}');
s = sqlEatChar(s, ',');
s = sqlEatChar(s, '{');
AllocArray(ret->qStarts, ret->blockCount);
for (i=0; i<ret->blockCount; ++i)
{
ret->qStarts[i] = sqlUnsignedComma(&s);
}
s = sqlEatChar(s, '}');
s = sqlEatChar(s, ',');
s = sqlEatChar(s, '{');
AllocArray(ret->tStarts, ret->blockCount);
for (i=0; i<ret->blockCount; ++i)
{
ret->tStarts[i] = sqlUnsignedComma(&s);
}
s = sqlEatChar(s, '}');
s = sqlEatChar(s, ',');
ret->queryID = sqlStringComma(&s);
*pS = s;
return ret;
}
示例14: AllocVar
struct altProbe *altProbeCommaIn(char **pS, struct altProbe *ret)
/* Create a altProbe out of a comma separated string.
* This will fill in ret if non-null, otherwise will
* return a new altProbe */
{
char *s = *pS;
int i;
if (ret == NULL)
AllocVar(ret);
ret->chrom = sqlStringComma(&s);
ret->chromStart = sqlSignedComma(&s);
ret->chromEnd = sqlSignedComma(&s);
ret->type = sqlSignedComma(&s);
sqlFixedStringComma(&s, ret->strand, sizeof(ret->strand));
ret->name = sqlStringComma(&s);
ret->maxCounts = sqlSignedComma(&s);
ret->contProbeCount = sqlSignedComma(&s);
s = sqlEatChar(s, '{');
AllocArray(ret->contProbeSets, ret->contProbeCount);
for (i=0; i<ret->contProbeCount; ++i)
{
ret->contProbeSets[i] = sqlStringComma(&s);
}
s = sqlEatChar(s, '}');
s = sqlEatChar(s, ',');
ret->alt1ProbeCount = sqlSignedComma(&s);
s = sqlEatChar(s, '{');
AllocArray(ret->alt1ProbeSets, ret->alt1ProbeCount);
for (i=0; i<ret->alt1ProbeCount; ++i)
{
ret->alt1ProbeSets[i] = sqlStringComma(&s);
}
s = sqlEatChar(s, '}');
s = sqlEatChar(s, ',');
ret->alt2ProbeCount = sqlSignedComma(&s);
s = sqlEatChar(s, '{');
AllocArray(ret->alt2ProbeSets, ret->alt2ProbeCount);
for (i=0; i<ret->alt2ProbeCount; ++i)
{
ret->alt2ProbeSets[i] = sqlStringComma(&s);
}
s = sqlEatChar(s, '}');
s = sqlEatChar(s, ',');
ret->transcriptCount = sqlSignedComma(&s);
s = sqlEatChar(s, '{');
AllocArray(ret->transcriptNames, ret->transcriptCount);
for (i=0; i<ret->transcriptCount; ++i)
{
ret->transcriptNames[i] = sqlStringComma(&s);
}
s = sqlEatChar(s, '}');
s = sqlEatChar(s, ',');
*pS = s;
return ret;
}
示例15: fillInGene
void fillInGene(struct chain *chain, struct genePred *gene, struct genePred **pGene)
/** Fill in syntenic gene structure with initial information for gene. */
{
FILE *cdsErrorFp;
struct genePred *synGene = NULL;
int qs, qe;
struct chain *subChain=NULL, *toFree=NULL;
AllocVar(synGene);
chainSubSetForRegion(chain, gene->txStart, gene->txEnd , &subChain, &toFree);
if(subChain == NULL)
{
*pGene= NULL;
return;
}
qChainRangePlusStrand(subChain, &qs, &qe);
synGene->chrom = cloneString(subChain->qName);
synGene->name = cloneString(gene->name);
synGene->txStart = qs;
synGene->txEnd = qe;
AllocArray(synGene->exonStarts, gene->exonCount);
AllocArray(synGene->exonEnds, gene->exonCount);
if(chain->qStrand == '+')
strncpy(synGene->strand, gene->strand, sizeof(synGene->strand));
else
{
if(gene->strand[0] == '+')
strncpy(synGene->strand, "-", sizeof(synGene->strand));
else if(gene->strand[0] == '-')
strncpy(synGene->strand, "+", sizeof(synGene->strand));
else
errAbort("Don't recognize strand %s from gene %s", gene->strand, gene->name);
}
chainFree(&toFree);
chainSubSetForRegion(chain, gene->cdsStart, gene->cdsEnd , &subChain, &toFree);
if(subChain == NULL )
{
if(optionExists("cdsErrorFile"))
{
cdsErrorFp = fopen( optionVal("cdsErrorFile",NULL), "a" );
fprintf( cdsErrorFp, "%s\t%s\t%u\t%u\t%u\t%u\t%s\t%d\n", gene->name, gene->chrom, gene->txStart,
gene->txEnd, gene->cdsStart, gene->cdsEnd, gene->strand, gene->exonCount );
fclose(cdsErrorFp);
}
*pGene = NULL;
genePredFree(&synGene);
return;
}
qChainRangePlusStrand(subChain, &qs, &qe);
synGene->cdsStart = qs;
synGene->cdsEnd = qe;
chainFree(&toFree);
*pGene = synGene;
}