Closed indapa closed 7 years ago
@indapa Sorry I never replied to this, I didn't see it when you posted. In htslib, you can use bam_get_qname(b)
to get the read name.
In case anybody finds this and would like to get the read names, simply replace the line:
fprintf(of, "@%s:%"PRId32"\n", hdr->target_name[b->core.tid], pos);
with
fprintf(of, "@%s:%s:%"PRId32"\n", bam_get_qname(b), hdr->target_name[b->core.tid], pos);
Very useful program! Thank you making this public. I'm not very familiar to the htslib C library. How do you modify the code to print the name of the soft-clipped read?
fprintf(of, "@%s:%"PRId32"\n", hdr->target_name[b->core.tid], pos);