Documentation
¶
Overview ¶
Package sam decodes and encodes SAM files.
This package uses the format described in: https://en.wikipedia.org/wiki/SAM_(file_format)
Index ¶
Constants ¶
View Source
const ( FlagMultiple = 1 << iota // Template having multiple segments in sequencing FlagEach // Each segment properly aligned according to the aligner FlagUnmapped // Segment unmapped FlagUnmapped2 // Next segment in the template unmapped FlagReverseComplement // SEQ being reverse complemented FlagReverseComplement2 // SEQ of the next segment in the template being reverse complemented FlagFirst // The first segment in the template FlagLast // The last segment in the template FlagSecondary // Secondary alignment FlagNotPassing // Not passing filters, such as platform/vendor quality controls FlagDuplicate // PCR or optical duplicate FlagSupplementary // Supplementary alignment )
Bit values of the flag field.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
A Reader reads and parses SAM lines.
func (*Reader) NextHeader ¶
NextHeader returns the next header line as a raw string, including the '@'. Returns EOF when out of header lines, then Next can be called for the data lines.
type SAM ¶
type SAM struct { Qname string // Query name Flag int // Bitwise flag Rname string // Reference sequence name Pos int // Mapping position (1-based) Mapq int // Mapping quality Cigar string // CIGAR string Rnext string // Ref. name of the mate/next read Pnext int // Position of the mate/next read Tlen int // Observed template length Seq string // Sequence Qual string // Phred qualities (ASCII) Tags map[string]interface{} // Typed optional tags. }
SAM is a single line (alignment) in a SAM file.
func (*SAM) MarshalText ¶ added in v0.1.17
MarshalText returns the textual representation of s in SAM format. Includes a trailing new line.
Click to show internal directories.
Click to hide internal directories.