void gbUpdateCountAligns(struct gbUpdate* update, struct gbAligned* aligned, unsigned numAligns) /* increment the count of the number of alignments */ { if (aligned->alignOrgCat == GB_NATIVE) update->numNativeAligns[gbTypeIdx(aligned->entry->type)] += numAligns; else update->numXenoAligns[gbTypeIdx(aligned->entry->type)] += numAligns; }
unsigned gbUpdateGetNumAligns(struct gbUpdate* update, unsigned type, unsigned orgCat) /* Get the number of alignments for a type and orgCat */ { switch (orgCat) { case GB_NATIVE: return update->numNativeAligns[gbTypeIdx(type)]; case GB_XENO: return update->numXenoAligns[gbTypeIdx(type)]; } assert(FALSE); return 0; }
void oiDataProcessUpdate(struct gbSelect* select) /* Get orientationInfo records for a partition and update. Partition * processed and aligned indexes should be loaded and selected versions * flaged. */ { assert(select->orgCats & GB_NATIVE); if (select->update->numNativeAligns[gbTypeIdx(select->type)] > 0) processOrgCatOi(select, GB_NATIVE); flagUnaligned(select, GB_NATIVE); }
boolean updateSelected(struct gbUpdate* update, struct gbSelect* select) /* check if an update is selected and has alignments based on selection * criteria */ { int typeIdx = gbTypeIdx(select->type); if (!update->selectAlign) return FALSE; /* not selected */ return ((select->orgCats & GB_NATIVE) && (update->numNativeAligns[typeIdx] > 0)) || ((select->orgCats & GB_XENO) && (update->numXenoAligns[typeIdx] > 0)); }