Skip to content

Commit

Permalink
Changed lat/lon handling
Browse files Browse the repository at this point in the history
  • Loading branch information
tgurbich committed Jul 23, 2024
1 parent 98f981b commit 28e7648
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions genomeuploader/genome_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,12 +494,18 @@ def combine_ENA_info(genomeInfo, ENADict):
latitude = latitList[0]
if multipleElementSet(latitList):
latitude = "not provided"
genomeInfo[g]["latitude"] = str(round(float(latitude), GEOGRAPHY_DIGIT_COORDS))
try:
genomeInfo[g]["latitude"] = str(round(float(latitude), GEOGRAPHY_DIGIT_COORDS))
except ValueError:
genomeInfo[g]["latitude"] = "not provided"

longitude = longList[0]
if multipleElementSet(longList):
longitude = "not provided"
genomeInfo[g]["longitude"] = str(round(float(longitude), GEOGRAPHY_DIGIT_COORDS))
try:
genomeInfo[g]["longitude"] = str(round(float(longitude), GEOGRAPHY_DIGIT_COORDS))
except ValueError:
genomeInfo[g]["longitude"] = "not provided"

samples = samplesList[0]
if multipleElementSet(samplesList):
Expand Down

0 comments on commit 28e7648

Please sign in to comment.