package traits

import "seekia/internal/helpers"

import "maps"

func getHairTextureTraitObject()Trait{

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

	referencesMap_List1 := make(map[string]string)
	referencesMap_List1["SNPedia.com - rs7349332"] = "https://www.snpedia.com/index.php/Rs7349332"

	lociList_1 := []int64{
		7349332,
	}

	for _, rsID := range lociList_1{
		locusReferencesMap[rsID] = maps.Clone(referencesMap_List1)
	}


	referencesMap_List2 := make(map[string]string)
	referencesMap_List2["SNPedia.com - rs11803731"] = "https://www.snpedia.com/index.php/Rs11803731"

	lociList_2 := []int64{
		11803731,
	}

	for _, rsID := range lociList_2{
		locusReferencesMap[rsID] = maps.Clone(referencesMap_List2)
	}


	referencesMap_List3 := make(map[string]string)
	referencesMap_List3["SNPedia.com - rs17646946"] = "https://www.snpedia.com/index.php/Rs17646946"

	lociList_3 := []int64{
		17646946,
	}

	for _, rsID := range lociList_3{
		locusReferencesMap[rsID] = maps.Clone(referencesMap_List3)
	}



	referencesMap_rs7349332 := make(map[string]string)
	referencesMap_rs7349332["SNPedia.com - rs7349332"] = "https://www.snpedia.com/index.php/Rs7349332"
	
	rule1_Locus1Object := RuleLocus{

		LocusIdentifier: "0e06e2",
		LocusRSID: 7349332,
		BasePairsList: []string{"C;C"},
	}
	rule1_LociList := []RuleLocus{rule1_Locus1Object}

	rule1_OutcomePointsMap := make(map[string]int)
	rule1_OutcomePointsMap["Straight"] = 2

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

	//TODO: Make sure this is true, that a heterozygote has a higher likelihood of curly hair

	rule2_Locus1Object := RuleLocus{

		LocusIdentifier: "2da1b7",
		LocusRSID: 7349332,
		BasePairsList: []string{"C;T", "T;C"},
	}
	rule2_LociList := []RuleLocus{rule2_Locus1Object}

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

	rule2_Object := TraitRule{
		RuleIdentifier: "6bd1da",
		LociList: rule2_LociList,
		OutcomePointsMap: rule2_OutcomePointsMap,
		ReferencesMap: maps.Clone(referencesMap_rs7349332),
	}
	
	rule3_Locus1Object := RuleLocus{

		LocusIdentifier: "c6760e",
		LocusRSID: 7349332,
		BasePairsList: []string{"T;T"},
	}
	rule3_LociList := []RuleLocus{rule3_Locus1Object}

	rule3_OutcomePointsMap := make(map[string]int)
	rule3_OutcomePointsMap["Curly"] = 2

	rule3_Object := TraitRule{
		RuleIdentifier: "32e377",
		LociList: rule3_LociList,
		OutcomePointsMap: rule3_OutcomePointsMap,
		ReferencesMap: maps.Clone(referencesMap_rs7349332),
	}



	referencesMap_rs11803731 := make(map[string]string)
	referencesMap_rs11803731["SNPedia.com - rs11803731"] = "https://www.snpedia.com/index.php/Rs11803731"
	
	rule4_Locus1Object := RuleLocus{

		LocusIdentifier: "9079c9",
		LocusRSID: 11803731,
		BasePairsList: []string{"A;A"},
	}
	rule4_LociList := []RuleLocus{rule4_Locus1Object}

	rule4_OutcomePointsMap := make(map[string]int)
	rule4_OutcomePointsMap["Straight"] = 2

	rule4_Object := TraitRule{
		RuleIdentifier: "34e6d2",
		LociList: rule4_LociList,
		OutcomePointsMap: rule4_OutcomePointsMap,
		ReferencesMap: maps.Clone(referencesMap_rs11803731),
	}

	//TODO: Make sure this is true, that a heterozygote has a higher likelihood of curly hair
	
	rule5_Locus1Object := RuleLocus{

		LocusIdentifier: "d0aad3",
		LocusRSID: 11803731,
		BasePairsList: []string{"A;T", "T;A"},
	}
	rule5_LociList := []RuleLocus{rule5_Locus1Object}

	rule5_OutcomePointsMap := make(map[string]int)
	rule5_OutcomePointsMap["Curly"] = 1

	rule5_Object := TraitRule{
		RuleIdentifier: "cf6cb5",
		LociList: rule5_LociList,
		OutcomePointsMap: rule5_OutcomePointsMap,
		ReferencesMap: maps.Clone(referencesMap_rs11803731),
	}
	
	rule6_Locus1Object := RuleLocus{

		LocusIdentifier: "f554b5",
		LocusRSID: 11803731,
		BasePairsList: []string{"T;T"},
	}
	rule6_LociList := []RuleLocus{rule6_Locus1Object}

	rule6_OutcomePointsMap := make(map[string]int)
	rule6_OutcomePointsMap["Curly"] = 2

	rule6_Object := TraitRule{
		RuleIdentifier: "2ba65b",
		LociList: rule6_LociList,
		OutcomePointsMap: rule6_OutcomePointsMap,
		ReferencesMap: maps.Clone(referencesMap_rs11803731),
	}

	referencesMap_rs17646946 := make(map[string]string)
	referencesMap_rs17646946["SNPedia.com - rs17646946"] = "https://www.snpedia.com/index.php/Rs17646946"
	
	rule7_Locus1Object := RuleLocus{

		LocusIdentifier: "f500c2",
		LocusRSID: 17646946,
		BasePairsList: []string{"G;G"},
	}
	rule7_LociList := []RuleLocus{rule7_Locus1Object}

	rule7_OutcomePointsMap := make(map[string]int)
	rule7_OutcomePointsMap["Straight"] = 2

	rule7_Object := TraitRule{
		RuleIdentifier: "ae3274",
		LociList: rule7_LociList,
		OutcomePointsMap: rule7_OutcomePointsMap,
		ReferencesMap: maps.Clone(referencesMap_rs17646946),
	}
	
	rule8_Locus1Object := RuleLocus{

		LocusIdentifier: "f1144a",
		LocusRSID: 17646946,
		BasePairsList: []string{"A;G", "G;A"},
	}
	rule8_LociList := []RuleLocus{rule8_Locus1Object}

	rule8_OutcomePointsMap := make(map[string]int)
	rule8_OutcomePointsMap["Curly"] = 1

	rule8_Object := TraitRule{
		RuleIdentifier: "a546bf",
		LociList: rule8_LociList,
		OutcomePointsMap: rule8_OutcomePointsMap,
		ReferencesMap: maps.Clone(referencesMap_rs17646946),
	}

	rule9_Locus1Object := RuleLocus{

		LocusIdentifier: "468bb3",
		LocusRSID: 17646946,
		BasePairsList: []string{"A;A"},
	}
	rule9_LociList := []RuleLocus{rule9_Locus1Object}

	rule9_OutcomePointsMap := make(map[string]int)
	rule9_OutcomePointsMap["Curly"] = 2

	rule9_Object := TraitRule{
		RuleIdentifier: "b8dc0a",
		LociList: rule9_LociList,
		OutcomePointsMap: rule9_OutcomePointsMap,
		ReferencesMap: maps.Clone(referencesMap_rs17646946),
	}

	hairTextureRulesList := []TraitRule{rule1_Object, rule2_Object, rule3_Object, rule4_Object, rule5_Object, rule6_Object, rule7_Object, rule8_Object, rule9_Object}


	lociList_Rules := []int64{7349332, 11803731, 17646946}

	referencesMap := make(map[string]string)
	referencesMap["SNPedia.com - Hair Curliness"] = "https://www.snpedia.com/index.php/Hair_curliness"

	outcomesList := []string{"Straight", "Curly"}

	hairTextureLociList := helpers.GetListOfMapKeys(locusReferencesMap)

	hairTextureObject := Trait{

		TraitName: "Hair Texture",
		TraitDescription: "The texture of a person's head hair.",
		DiscreteOrNumeric: "Discrete",
		LocusReferencesMap: locusReferencesMap,
		LociList: hairTextureLociList,
		LociList_Rules: lociList_Rules,
		RulesList: hairTextureRulesList,
		OutcomesList: outcomesList,
		NumericValueFormatter: nil,
		ReferencesMap: referencesMap,
	}

	return hairTextureObject
}


