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 c3ab4d6 commit 42a068b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions genomeuploader/genome_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ def extract_ENA_info(genomeInfo, uploadDir, webin, password):
sampleInfo = ena.get_sample(sampleAccession, webin, password)
print(sampleInfo)
location = sampleInfo["location"]
latitude, longitude = '', ''
latitude, longitude = None, None
if 'N' in location:
latitude = location.split('N')[0].strip()
longitude = location.split('N')[1].strip()
Expand All @@ -415,12 +415,15 @@ def extract_ENA_info(genomeInfo, uploadDir, webin, password):
elif longitude.endswith('E'):
longitude = longitude.split('E')[0].strip()

print(latitude, longitude)
if latitude:
print('!')
latitude = "{:.8f}".format(float(latitude))
else:
latitude = "not provided"

print(latitude, longitude)
if longitude:
print('!!!')
latitude = "{:.8f}".format(float(longitude))
else:
longitude = "not provided"
Expand Down

0 comments on commit 42a068b

Please sign in to comment.