INNER CODE UNIT · C
plp
dpryan79/MethylDackel · MBias.c:105
plp = calloc(1, sizeof(bam_pileup1_t *)); //This will have to be modified for multiple input files
if(plp == NULL) {
fprintf(stderr, "Couldn't allocate space for the plp structure in extractCalls()!\n");
return NULL;
}
while(1) {
//Lock and unlock the mutex so we can get/update the tid/position
pthread_mutex_lock(&positionMutex);
localTid = globalTid;
localPos = globalPos;
localEnd = localPos + config->chunkSize;
if(localTid >= hdr->n_targets) {
pthread_mutex_unlock(&positionMutex);
break;
}
if(globalEnd && localEnd > globalEnd) localEnd = globalEnd;
adjustBounds(config, hdr, fai, &localTid, &localPos, &localEnd);