Previous topic

Next topic


This Page

reads_from_sam(sam_file, reference)[source]

Parse aligned reads from SAM/BAM file.

Parameters :

sam_file : pysam.SamFile

The SAM/BAM file object.

reference : Bio.Seq

The reference sequence used for alignment.

Returns :

align_start, align_stop, reads, ref : (int, int, list, Bio.Seq)

The alignment start, alignment stop, list of reads (str, int), and extended reference. Each (str, int) pair represents the read and its starting position.