how to acces to htslib command
2
0
Entering edit mode
4.6 years ago
nmargu • 0

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

alignment • 2.0k views
ADD COMMENT
0
Entering edit mode

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 :)

ADD REPLY
0
Entering edit mode
4.6 years ago
ATpoint 86k

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.

ADD COMMENT
0
Entering edit mode
4.6 years ago

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.

ADD COMMENT
0
Entering edit mode

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!

ADD REPLY

Login before adding your answer.

Traffic: 1838 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6