Skip to content

Commit

Permalink
Added a fix for collection date format
Browse files Browse the repository at this point in the history
  • Loading branch information
tgurbich committed Jul 23, 2024
1 parent e0f5bcd commit da4ca1c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions genomeuploader/genome_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,10 @@ def combine_ENA_info(genomeInfo, ENADict):
else:
run = genomeInfo[g]["accessions"][0]
genomeInfo[g]["sequencingMethod"] = ENADict[run]["instrumentModel"]
genomeInfo[g]["collectionDate"] = ENADict[run]["collectionDate"]
if ENADict[run]["collectionDate"].lower() == "not applicable":
genomeInfo[g]["collectionDate"] = "not provided"
else:
genomeInfo[g]["collectionDate"] = ENADict[run]["collectionDate"]
genomeInfo[g]["study"] = ENADict[run]["study"]
genomeInfo[g]["description"] = ENADict[run]["projectDescription"]
genomeInfo[g]["sample_accessions"] = ENADict[run]["sampleAccession"]
Expand All @@ -517,7 +520,6 @@ def combine_ENA_info(genomeInfo, ENADict):
genomeInfo[g]["accessions"] = ','.join(genomeInfo[g]["accessions"])



def getAccessions(accessionsFile):
accessionDict = {}
with open(accessionsFile, 'r') as f:
Expand Down

0 comments on commit da4ca1c

Please sign in to comment.