
// sampleAnalyses provides sample Person and Couple analyses
// These are used to show users what an analysis looks like, without requiring the user to import their genomes.

package sampleAnalyses

import "seekia/internal/genetics/geneticAnalysis"
import "seekia/internal/genetics/readGeneticAnalysis"

import _ "embed"

import "errors"


//go:embed SamplePerson1Analysis.messagepack
var person1Analysis []byte

//go:embed SamplePerson2Analysis.messagepack
var person2Analysis []byte

//go:embed SampleCoupleAnalysis.messagepack
var coupleAnalysis []byte


func GetSamplePerson1Analysis()(geneticAnalysis.PersonAnalysis, error){

	analysisObject, err := readGeneticAnalysis.ReadPersonGeneticAnalysisString(string(person1Analysis))
	if (err != nil){
		return geneticAnalysis.PersonAnalysis{}, errors.New("sampleAnalyses contains invalid person1Analysis: " + err.Error())
	}

	return analysisObject, nil
}


func GetSamplePerson2Analysis()(geneticAnalysis.PersonAnalysis, error){

	analysisObject, err := readGeneticAnalysis.ReadPersonGeneticAnalysisString(string(person2Analysis))
	if (err != nil){
		return geneticAnalysis.PersonAnalysis{}, errors.New("sampleAnalyses contains invalid person2Analysis: " + err.Error())
	} 

	return analysisObject, nil
}

func GetSampleCoupleAnalysis()(geneticAnalysis.CoupleAnalysis, error){

	analysisObject, err := readGeneticAnalysis.ReadCoupleGeneticAnalysisString(string(coupleAnalysis))
	if (err != nil){
		return geneticAnalysis.CoupleAnalysis{}, errors.New("sampleAnalyses contains invalid coupleAnalysis: " + err.Error())
	}

	return analysisObject, nil
}


