Examples/Exercises on SAMtools operating on BAM format
1
0
Entering edit mode
6.2 years ago
roccostorace ▴ 50

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

bam samtools • 1.4k views
ADD COMMENT
0
Entering edit mode

Hi Pierre thanks to your answer.

I have another question what is the difference between sort and index?

ADD REPLY
0
Entering edit mode

http://www.htslib.org/doc/samtools.html

samtools sort : Sort alignments by leftmost coordinates, or by read name

samtools index: Index a coordinate-sorted BAM or CRAM file for fast random access. This index is needed when region arguments are used to limit samtools view and similar commands to particular regions of interest.

ADD REPLY
0
Entering edit mode

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...

ADD REPLY
1
Entering edit mode
6.2 years ago

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

ADD COMMENT

Login before adding your answer.

Traffic: 1332 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