Hello, i'm new in bioinformatics. Actually i'm studying what are the functions implemented by the SAMtools on the BAM format. To do this i'm studying functions from http://www.htslib.org/doc/samtools.html My goal is to understand and be able to use all the functions with the relative options (view, sort, ...)
So I have two questions to ask you:
1 - you have some material with many examples or exercises concerning these SAMtools functions to be used on the BAM
2 - someone kindly could make me a list of the most important functions: for example I imagine that view is very important, like the sort function. So to make me a sort of list with the main functions used
1 answer
you have some material with many examples or exercises concerning these SAMtools functions to be used on the BAM
toy* files under https://github.com/samtools/samtools/tree/develop/examples
convert to bam, sort, index, etc...
most important functions
samtools view samtools sort samtools index samtools faidx
imho
Log in to answer this question.
Hi Pierre thanks to your answer.
I have another question what is the difference between sort and index?
http://www.htslib.org/doc/samtools.html
sort generates a bamfile that is either sorted by mapping coordinates (RNAME and POS, fields 3 and 4; default behaviour), by read name or by tags. index will then generate an index file, that contains information where in the bamfile you can find reads that map to a certain reference sequence. This is needed for random access, so that software like genome browsers can directly access specific regions without having to read through the whole bamfile. Index requires a bamfile to be sorted by coordinate.
edit: boo, too late...