func GetStrand(samr *sam.Record) StrandType {
	if samr.Ref != samr.MateRef {
		return StrandNone
	}
	flagStrand := samr.Flags & (sam.Reverse | sam.MateReverse | sam.Read1 | sam.Read2)
	if (flagStrand == (sam.MateReverse | sam.Read1)) || (flagStrand == (sam.Reverse | sam.Read2)) {
		return StrandFwd
	} else if (flagStrand == (sam.Reverse | sam.Read1)) || (flagStrand == (sam.MateReverse | sam.Read2)) {
		return StrandRev
	}
	if samr.Flags&sam.MateUnmapped == sam.MateUnmapped {
		flagStrand &= sam.Reverse | sam.MateReverse
		if flagStrand == 0 {
			return StrandFwd
		} else if flagStrand == (sam.Reverse | sam.MateReverse) {
			return StrandRev
		}
	}
	return StrandNone
}
GetStrand returns the strand the read-pair is aligned to.
package pileup
import (
	"context"
	"fmt"
	"strings"
	"github.com/grailbio/base/compress"
	"github.com/grailbio/base/file"
	"github.com/grailbio/base/log"
	"github.com/grailbio/bio/encoding/fasta"
	"github.com/grailbio/bio/interval"
	"github.com/grailbio/hts/sam"
)
type PosType = interval.PosType
const PosTypeMax = interval.PosTypeMax
const (
	BaseA byte = iota
	BaseC
	BaseG
	BaseT
	BaseX
)
const (
	NBase = 4
	NBaseEnum = 5
)
var Seq8ToEnumTable = [...]byte{BaseX, BaseA, BaseC, BaseX, BaseG, BaseX, BaseX, BaseX, BaseT, BaseX, BaseX, BaseX, BaseX, BaseX, BaseX, BaseX}
var EnumToASCIITable = [...]byte{'A', 'C', 'G', 'T', 'N'}
var Seq8ToASCIITable = [...]byte{'=', 'A', 'C', 'M', 'G', 'R', 'S', 'V', 'T', 'W', 'Y', 'H', 'K', 'D', 'B', 'N'}
type StrandType int
const (
	StrandNone StrandType = iota
	StrandFwd
	StrandRev
)
var StrandTypeToASCIITable = [...]byte{'.', '+', '-'}