Lines Matching refs:regn
150 regn_t *regn; in parse_regn() local
180 if( NULL == (regn = (regn_t *)malloc(sizeof(regn_t)))) { in parse_regn()
185 regn->coord = (NULL == coord ? 'B' : *coord ); in parse_regn()
187 regn->region_names = strdup(name); in parse_regn()
189 cp1 = strtok (regn->region_names,";"); in parse_regn()
197 regn->name[nregions] = cp1; in parse_regn()
198 regn->code[nregions] = *cp2; in parse_regn()
203 regn->nregions = nregions; in parse_regn()
213 if( regn->code[iregion] == 'E' ){ in parse_regn()
215 … regn->start[iregion] = (iregion ? (regn->start[iregion-1] + regn->length[iregion-1]) : 0); in parse_regn()
216 regn->length[iregion] = 0; in parse_regn()
222 … regn->start[iregion] = (iregion ? (regn->start[iregion-1] + regn->length[iregion-1]) : 0); in parse_regn()
223 … regn->length[iregion] = (ibndy == nbndy ? -1 : (be_int4(bndy[ibndy])-regn->start[iregion])); in parse_regn()
224 regn->index[iregion] = index; in parse_regn()
230 regn->count = 1; in parse_regn()
232 hd.p = regn; in parse_regn()
234 free(regn->region_names); in parse_regn()
235 free(regn); in parse_regn()
239 regn = (regn_t *)(hi->data.p); in parse_regn()
240 regn->count++; in parse_regn()
257 regn_t *regn = NULL; in ztr2fastq() local
275 regn = (regn_t *)(hi->data.p); in ztr2fastq()
276 if( regn->count == 1 ){ in ztr2fastq()
278 for (iregion=0; iregion<regn->nregions; iregion++) { in ztr2fastq()
279 if( regn->code[iregion] == 'E' ) { in ztr2fastq()
281 regn->file[iregion] = NULL; in ztr2fastq()
287 regn->index[iregion]); in ztr2fastq()
290 regn->name[iregion]); in ztr2fastq()
294 regn->file[iregion] = files[ifile]; in ztr2fastq()
315 regn->file[iregion] = fp; in ztr2fastq()
318 regn->file[iregion] = stdout; in ztr2fastq()
375 iregion<regn->nregions && iregion<MAX_REGIONS; in ztr2fastq()
380 if( regn->code[iregion] == 'E' ) { in ztr2fastq()
389 length = (regn->length[iregion] == -1 in ztr2fastq()
390 ? (seq_len-regn->start[iregion]) in ztr2fastq()
391 : regn->length[iregion]); in ztr2fastq()
398 int n = sprintf(seq,"/%d", regn->index[iregion]); in ztr2fastq()
410 if( explicit && iregion && regn->code[iregion-1] == 'E' ) { in ztr2fastq()
415 qual += strlen(regn->name[iregion-1]); in ztr2fastq()
422 if( explicit && iregion && regn->code[iregion-1] == 'E' ){ in ztr2fastq()
435 strcpy(seq, regn->name[iregion-1]); in ztr2fastq()
436 seq += strlen(regn->name[iregion-1]); in ztr2fastq()
437 memset(qual, '!', strlen(regn->name[iregion-1])); in ztr2fastq()
438 qual += strlen(regn->name[iregion-1]); in ztr2fastq()
458 fwrite(buf, 1, qual - buf, regn->file[iregion]); in ztr2fastq()
470 for (iregion=0; iregion<regn->nregions; iregion++) { in ztr2fastq()
471 if( regn->code[iregion] == 'E' ) { in ztr2fastq()
476 qual += strlen(regn->name[iregion]); in ztr2fastq()
487 for (iregion=0; iregion<regn->nregions; iregion++) { in ztr2fastq()
489 if( regn->code[iregion] == 'E' ){ in ztr2fastq()
500 strcpy(seq, regn->name[iregion]); in ztr2fastq()
501 seq += strlen(regn->name[iregion]); in ztr2fastq()
502 memset(qual, '!', strlen(regn->name[iregion])); in ztr2fastq()
503 qual += strlen(regn->name[iregion]); in ztr2fastq()
505 length = (regn->length[iregion] == -1 in ztr2fastq()
506 ? (seq_len-regn->start[iregion]) in ztr2fastq()
507 : regn->length[iregion]); in ztr2fastq()