Added LocusIsPhased information to the local user profile creation process.
This commit is contained in:
parent
b71b994dc4
commit
d538afc7a2
3 changed files with 32 additions and 26 deletions
|
@ -6,6 +6,7 @@ Small and insignificant changes may not be included in this log.
|
|||
|
||||
## Unversioned Changes
|
||||
|
||||
* Added LocusIsPhased information to the local user profile creation process. - *Simon Sarasova*
|
||||
* Added the Height trait the traits package. Migrated locus metadata from json encoding to gob encoding. - *Simon Sarasova*
|
||||
* Upgraded Fyne to version 2.5.0. - *Simon Sarasova*
|
||||
* Added neural network trait prediction to genetic analyses. - *Simon Sarasova*
|
||||
|
|
|
@ -9,4 +9,4 @@ Many other people have written code for modules which are imported by Seekia. Th
|
|||
|
||||
Name | Date Of First Commit | Number Of Commits
|
||||
--- | --- | ---
|
||||
Simon Sarasova | June 13, 2023 | 269
|
||||
Simon Sarasova | June 13, 2023 | 270
|
|
@ -196,7 +196,11 @@ func UpdateMyExportedProfile(myProfileType string, networkType byte)error{
|
|||
}
|
||||
|
||||
polygenicDiseaseObjectsList, err := polygenicDiseases.GetPolygenicDiseaseObjectsList()
|
||||
if (err != nil) { return err }
|
||||
if (err != nil) { return err }
|
||||
|
||||
// This map stores the rsIDs to share in our profile
|
||||
// We use a map to avoid duplicates
|
||||
myLociToShareMap := make(map[int64]struct{})
|
||||
|
||||
for _, diseaseObject := range polygenicDiseaseObjectsList{
|
||||
|
||||
|
@ -219,18 +223,7 @@ func UpdateMyExportedProfile(myProfileType string, networkType byte)error{
|
|||
|
||||
locusRSID := locusObject.LocusRSID
|
||||
|
||||
locusValueObject, exists := myGenomeLocusValuesMap[locusRSID]
|
||||
if (exists == true){
|
||||
|
||||
rsIDString := helpers.ConvertInt64ToString(locusRSID)
|
||||
|
||||
locusBase1 := locusValueObject.Base1Value
|
||||
locusBase2 := locusValueObject.Base2Value
|
||||
|
||||
basePairValue := locusBase1 + ";" + locusBase2
|
||||
|
||||
profileMap["LocusValue_rs" + rsIDString] = basePairValue
|
||||
}
|
||||
myLociToShareMap[locusRSID] = struct{}{}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -256,21 +249,33 @@ func UpdateMyExportedProfile(myProfileType string, networkType byte)error{
|
|||
|
||||
for _, rsID := range lociList{
|
||||
|
||||
locusValueObject, exists := myGenomeLocusValuesMap[rsID]
|
||||
if (exists == true){
|
||||
|
||||
rsIDString := helpers.ConvertInt64ToString(rsID)
|
||||
|
||||
locusBase1 := locusValueObject.Base1Value
|
||||
locusBase2 := locusValueObject.Base2Value
|
||||
|
||||
basePairValue := locusBase1 + ";" + locusBase2
|
||||
|
||||
profileMap["LocusValue_rs" + rsIDString] = basePairValue
|
||||
}
|
||||
myLociToShareMap[rsID] = struct{}{}
|
||||
}
|
||||
}
|
||||
|
||||
for rsID, _ := range myLociToShareMap{
|
||||
|
||||
locusValueObject, exists := myGenomeLocusValuesMap[rsID]
|
||||
if (exists == false){
|
||||
continue
|
||||
}
|
||||
|
||||
rsIDString := helpers.ConvertInt64ToString(rsID)
|
||||
|
||||
locusBase1 := locusValueObject.Base1Value
|
||||
locusBase2 := locusValueObject.Base2Value
|
||||
locusIsPhased := locusValueObject.LocusIsPhased
|
||||
|
||||
basePairValue := locusBase1 + ";" + locusBase2
|
||||
locisIsPhasedString := helpers.ConvertBoolToYesOrNoString(locusIsPhased)
|
||||
|
||||
locusValueAttributeName := "LocusValue_rs" + rsIDString
|
||||
locusIsPhasedAttributeName := "LocusIsPhased_rs" + rsIDString
|
||||
|
||||
profileMap[locusValueAttributeName] = basePairValue
|
||||
profileMap[locusIsPhasedAttributeName] = locisIsPhasedString
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue