func NewCollection(pathways map[string]Pathway) (Collection, error) {
	p := Collection{
		pathways: map[string]Pathway{},
	}
	for k, v := range pathways {
		v.Init(k)
		p.pathways[k] = v
		p.pathwayNames = append(p.pathwayNames, k)
	}
	sort.Strings(p.pathwayNames)
	return p, nil
}
NewCollection creates a new Collection with the given pathway map.
All pathways are initialised.
package pathway
import (
	"fmt"
	"sort"
	"github.com/pkg/errors"
)
type Collection struct {
	pathways map[string]Pathway
	pathwayNames []string
}
func (c Collection) GetPathway(pathwayName string) (*Pathway, error) {
	pathway, ok := c.pathways[pathwayName]
	if !ok {
		return nil, fmt.Errorf("pathwayName %s does not exist within Collection", pathwayName)
	}
	runnable, err := pathway.Runnable()
	if err != nil {
		return nil, errors.Wrapf(err, "pathway with name %s is not runnable", pathwayName)
	}
	return &runnable, nil
}
func (c Collection) PathwayNames() []string {
	return c.pathwayNames
}
func (c Collection) Pathways() map[string]Pathway {
	return c.pathways
}