func (b *fakeProvider) GenerateShards(opts GenerateShardsOpts) ([]gbam.Shard, error) {
	shards := []gbam.Shard{gbam.Shard{
		StartRef: b.header.Refs()[0],
		Start:    0,
		EndRef:   nil,
		End:      0,
		Padding:  opts.Padding,
	}}
	if !opts.IncludeUnmapped {
		return shards, nil
	}
	if opts.SplitUnmappedCoords {
		shards = append(shards,
			gbam.Shard{
				StartRef: nil,
				Start:    0,
				EndRef:   nil,
				End:      0,
				EndSeq:   2,
				ShardIdx: 1,
			},
			gbam.Shard{
				StartRef: nil,
				Start:    0,
				StartSeq: 2,
				EndRef:   nil,
				End:      math.MaxInt32,
				ShardIdx: 2,
			})
	} else {
		shards = append(shards,
			gbam.Shard{
				StartRef: nil,
				Start:    0,
				EndRef:   nil,
				End:      math.MaxInt32,
				ShardIdx: 1,
			})
	}
	return shards, nil
}
GenerateShards implements the Provider interface.
package bamprovider
import (
	"math"
	"github.com/grailbio/bio/biopb"
	gbam "github.com/grailbio/bio/encoding/bam"
	"github.com/grailbio/hts/sam"
)
type fakeProvider struct {
	header *sam.Header
	recs   []*sam.Record
}
type fakeIterator struct {
	recs []*sam.Record
	rec  *sam.Record
	shardRange    biopb.CoordRange
	addrGenerator gbam.CoordGenerator
}
func NewFakeProvider(header *sam.Header, recs []*sam.Record) Provider {
	return &fakeProvider{header, recs}
}
func (b *fakeProvider) FileInfo() (FileInfo, error) {
	return FileInfo{}, nil
}
func (b *fakeProvider) GetHeader() (*sam.Header, error) {
	return b.header, nil
}
func (b *fakeProvider) Close() error {
	return nil
}
func (b *fakeProvider) GetFileShards() ([]gbam.Shard, error) {
	return []gbam.Shard{gbam.UniversalShard(b.header)}, nil
}