Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
KateSakharova committed Feb 20, 2024
1 parent 6ce0416 commit 2a27a6e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions genomeuploader/genome_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,16 +404,16 @@ def extract_ENA_info(genomeInfo, uploadDir, webin, password):
location = sampleInfo["location"]
latitude, longitude = '', ''
if 'N' in location:
latitude = str(float(location.split('N')[0].strip()))
longitude = str(float(location.split('N')[1].strip()))
latitude = location.split('N')[0].strip()
longitude = location.split('N')[1].strip()
elif 'S' in location:
latitude = '-' + str(float(location.split('S')[0].strip()))
longitude = str(float(location.split('S')[1].strip()))
latitude = '-' + location.split('S')[0].strip()
longitude = location.split('S')[1].strip()

if 'W' in longitude:
longitude = '-' + str(float(longitude.split('W')[0].strip()))
longitude = '-' + longitude.split('W')[0].strip()
elif longitude.endswith('E'):
longitude = str(float(longitude.split('E')[0].strip()))
longitude = longitude.split('E')[0].strip()

if latitude:
latitude = round(float(latitude), GEOGRAPHY_DIGIT_COORDS)
Expand Down

0 comments on commit 2a27a6e

Please sign in to comment.