For learning purposes, could you (or anyone) write a simple code to print each full row (or read) as a string using htslib? Thank you!
Hi all! As I understood samtools use htslib package for other operations. I am interested in bam_cigar2qlen that for I can see in inside bam.c of the htslib files. I have installed htslib but I do not know how to use the htslib packages for my bam from samtools (or from whatever) I just do not know how htslib functions can be used and in the samtools manual the information is missing or I am not able to decipher. If anyone could help, It would be great. Thanks in advance
2 answers
Can you code in C? htslib is a C library for manipulating BAM/CRAM etc files. If you are not proficient in C then there is little chance to use it productively. What is your analysis goal, there are probably user-friendly tools that can do the job from the command line.
Htslib contains some tools like tabix . But it's primarily an API ( https://en.wikipedia.org/wiki/Application_programming_interface ) for the C programming language. htslib is mainly used by samtools, bcftools, etc....
If you want to use those function , you have to write and compile a C program which might be a difficult task if you don't know this language.
Log in to answer this question.
Thank you so much! I am not able to code in C so I will try to find something more human-friendly for my purpose Thank you :)