sam.5 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. '\" t
  2. .TH sam 5 "August 2013" "htslib" "Bioinformatics formats"
  3. .SH NAME
  4. sam \- Sequence Alignment/Map file format
  5. .SH DESCRIPTION
  6. Sequence Alignment/Map (SAM) format is TAB-delimited. Apart from the header lines, which are started
  7. with the `@' symbol, each alignment line consists of:
  8. .TS
  9. nlbl.
  10. 1 QNAME Query template/pair NAME
  11. 2 FLAG bitwise FLAG
  12. 3 RNAME Reference sequence NAME
  13. 4 POS 1-based leftmost POSition/coordinate of clipped sequence
  14. 5 MAPQ MAPping Quality (Phred-scaled)
  15. 6 CIGAR extended CIGAR string
  16. 7 MRNM Mate Reference sequence NaMe (`=' if same as RNAME)
  17. 8 MPOS 1-based Mate POSistion
  18. 9 TLEN inferred Template LENgth (insert size)
  19. 10 SEQ query SEQuence on the same strand as the reference
  20. 11 QUAL query QUALity (ASCII-33 gives the Phred base quality)
  21. 12+ OPT variable OPTional fields in the format TAG:VTYPE:VALUE
  22. .TE
  23. .PP
  24. Each bit in the FLAG field is defined as:
  25. .TS
  26. lcbl.
  27. 0x0001 p the read is paired in sequencing
  28. 0x0002 P the read is mapped in a proper pair
  29. 0x0004 u the query sequence itself is unmapped
  30. 0x0008 U the mate is unmapped
  31. 0x0010 r strand of the query (1 for reverse)
  32. 0x0020 R strand of the mate
  33. 0x0040 1 the read is the first read in a pair
  34. 0x0080 2 the read is the second read in a pair
  35. 0x0100 s the alignment is not primary
  36. 0x0200 f the read fails platform/vendor quality checks
  37. 0x0400 d the read is either a PCR or an optical duplicate
  38. 0x0800 S the alignment is supplementary
  39. .TE
  40. .P
  41. where the second column gives the string representation of the FLAG field.
  42. .SH SEE ALSO
  43. .TP
  44. https://github.com/samtools/hts-specs
  45. The full SAM/BAM file format specification