INNER CODE UNIT · C

seq_buf

lh3/seqtk · seqtk.c:733

					seq_buf = (char*)realloc(seq_buf, seq_max);
				}
				if (p->rev[i] < 0)
					for (j = end - 1; j >= beg; --j)
						seq_buf[end - 1 - j] = (uint8_t)seq->seq.s[j] >= 128? 'N' : comp_tab[(uint8_t)seq->seq.s[j]];
				else memcpy(seq_buf, &seq->seq.s[beg], end - beg);
				putchar('\n');
				fwrite(seq_buf, 1, end - beg, stdout);
				putchar('\n');
			} else {
				for (j = 0; j < end - beg; ++j) {
					if (is_tab == 0 && (j == 0 || (line > 0 && j % line == 0))) putchar('\n');
					putchar(seq->seq.s[j + beg]);
				}
				putchar('\n');
				if (seq->qual.l != seq->seq.l || is_tab) continue;
				printf("+");
				for (j = 0; j < end - beg; ++j) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…