package traits

import "seekia/internal/helpers"

import "maps"


func getLactoseToleranceTraitObject()Trait{

	// Map Structure: rsID -> References Map
	locusReferencesMap := make(map[int64]map[string]string)

	referencesMap_1 := make(map[string]string)
	referencesMap_1["SNPedia.com - rs182549"] = "https://www.snpedia.com/index.php/Rs182549"

	locusReferencesMap[182549] = referencesMap_1


	referencesMap_2 := make(map[string]string)
	referencesMap_2["SNPedia.com - rs4988235"] = "https://www.snpedia.com/index.php/Rs4988235"

	locusReferencesMap[4988235] = referencesMap_2

	referencesMap_3 := make(map[string]string)
	referencesMap_3["SNPedia.com - rs145946881"] = "https://www.snpedia.com/index.php/Rs145946881"

	locusReferencesMap[145946881] = referencesMap_3


	referencesMap_4 := make(map[string]string)
	referencesMap_4["SNPedia.com - rs41380347"] = "https://www.snpedia.com/index.php/Rs41380347"

	locusReferencesMap[41380347] = referencesMap_4


	referencesMap_5 := make(map[string]string)
	referencesMap_5["SNPedia.com - rs41525747"] = "https://www.snpedia.com/index.php/Rs41525747"

	locusReferencesMap[41525747] = referencesMap_5



	referencesMap_rs182549 := make(map[string]string)
	referencesMap_rs182549["SNPedia.com - rs182549"] = "https://www.snpedia.com/index.php/Rs182549"
	
	rule1_Locus1Object := RuleLocus{

		LocusIdentifier: "43bf19",
		LocusRSID: 182549,
		BasePairsList: []string{"C;C"},
	}
	rule1_LociList := []RuleLocus{rule1_Locus1Object}

	rule1_OutcomePointsMap := make(map[string]int)
	rule1_OutcomePointsMap["Intolerant"] = 1

	rule1_Object := TraitRule{
		RuleIdentifier: "f4e02c",
		LociList: rule1_LociList,
		OutcomePointsMap: rule1_OutcomePointsMap,
		ReferencesMap: maps.Clone(referencesMap_rs182549),
	}

	rule2_Locus1Object := RuleLocus{

		LocusIdentifier: "a7feff",
		LocusRSID: 182549,
		BasePairsList: []string{"C;T", "T;C", "C;T", "T;T"},
	}
	rule2_LociList := []RuleLocus{rule2_Locus1Object}

	rule2_OutcomePointsMap := make(map[string]int)
	rule2_OutcomePointsMap["Tolerant"] = 1

	rule2_Object := TraitRule{
		RuleIdentifier: "cc3df0",
		LociList: rule2_LociList,
		OutcomePointsMap: rule2_OutcomePointsMap,
		ReferencesMap: maps.Clone(referencesMap_rs182549),
	}

	referencesMap_rs4988235 := make(map[string]string)
	referencesMap_rs4988235["SNPedia.com - rs4988235"] = "https://www.snpedia.com/index.php/Rs4988235"

	rule3_Locus1Object := RuleLocus{

		LocusIdentifier: "da6b04",
		LocusRSID: 4988235,
		BasePairsList: []string{"G;G"},
	}
	rule3_LociList := []RuleLocus{rule3_Locus1Object}

	rule3_OutcomePointsMap := make(map[string]int)
	rule3_OutcomePointsMap["Intolerant"] = 1

	rule3_Object := TraitRule{
		RuleIdentifier: "8170ee",
		LociList: rule3_LociList,
		OutcomePointsMap: rule3_OutcomePointsMap,
		ReferencesMap: maps.Clone(referencesMap_rs4988235),
	}

	rule4_Locus1Object := RuleLocus{

		LocusIdentifier: "176dde",
		LocusRSID: 4988235,
		BasePairsList: []string{"G;A", "A;G"},
	}
	rule4_LociList := []RuleLocus{rule4_Locus1Object}

	rule4_OutcomePointsMap := make(map[string]int)
	rule4_OutcomePointsMap["Tolerant"] = 1

	rule4_Object := TraitRule{
		RuleIdentifier: "52425f",
		LociList: rule4_LociList,
		OutcomePointsMap: rule4_OutcomePointsMap,
		ReferencesMap: maps.Clone(referencesMap_rs4988235),
	}

	rule5_Locus1Object := RuleLocus{

		LocusIdentifier: "164acb",
		LocusRSID: 4988235,
		BasePairsList: []string{"A;A"},
	}
	rule5_LociList := []RuleLocus{rule5_Locus1Object}

	rule5_OutcomePointsMap := make(map[string]int)
	rule5_OutcomePointsMap["Tolerant"] = 2

	rule5_Object := TraitRule{
		RuleIdentifier: "4b5c35",
		LociList: rule5_LociList,
		OutcomePointsMap: rule5_OutcomePointsMap,
		ReferencesMap: maps.Clone(referencesMap_rs4988235),
	}

	lactoseToleranceRulesList := []TraitRule{rule1_Object, rule2_Object, rule3_Object, rule4_Object, rule5_Object}


	referencesMap := make(map[string]string)
	referencesMap["SNPedia.com - Lactose Intolerance"] = "https://www.snpedia.com/index.php/Lactose_intolerance"

	outcomesList := []string{"Tolerant", "Intolerant"}

	lactoseToleranceLociList := helpers.GetListOfMapKeys(locusReferencesMap)

	lociList_Rules := []int64{182549, 4988235}

	lactoseToleranceObject := Trait{
		TraitName: "Lactose Tolerance",
		TraitDescription: "The ability to tolerate lactose.",
		DiscreteOrNumeric: "Discrete",
		LocusReferencesMap: locusReferencesMap,
		LociList: lactoseToleranceLociList,
		LociList_Rules: lociList_Rules,
		RulesList: lactoseToleranceRulesList,
		OutcomesList: outcomesList,
		NumericValueFormatter: nil,
		ReferencesMap: referencesMap,
	}

	return lactoseToleranceObject
}


