code: func NewReference(name, assemID, species string, length int, md5 []byte, uri *url.URL) (*Reference, error) {
  	if !validLen(length) {
  		return nil, errors.New("sam: length out of range")
  	}
  	if name == "" {
  		return nil, errors.New("sam: no name provided")
  	}
  	var h string
  	if md5 != nil {
  		if len(md5) != 16 {
  			return nil, errors.New("sam: invalid md5 sum length")
  		}
  		h = string(md5[:])
  	}
  	return &Reference{
  		id:      -1, // This is altered by a Header when added.
  		name:    name,
  		lRef:    int32(length),
  		md5:     h,
  		assemID: assemID,
  		species: species,
  		uri:     uri,
  	}, nil
  }
docs: // NewReference returns a new Reference based on the given parameters.
  // Only name and length are mandatory and length must be a valid reference
  // length according to the SAM specification, [1, 1<<31).