Skip to content
Snippets Groups Projects
Commit 8635d28a authored by Jasper Koehorst's avatar Jasper Koehorst
Browse files

fixed metadata field issues

parent 2b2923a6
No related branches found
No related tags found
No related merge requests found
......@@ -164,7 +164,7 @@ def setup_study(content):
if type(organization['Contact']) == list:
print("MULTIPLE CONTACTS DETECTED... -.-")
print(organization['Contact'])
study['email'] = organization['Contact']['@email']
study['Email address'] = organization['Contact']['@email']
# organization['Contact']['@sec_email']
if 'Name' in organization['Contact']:
......@@ -189,11 +189,11 @@ def setup_study(content):
study_object = content['STUDY']
study['Study identifier'] = study_object['@accession']
study['alias'] = study_object['@alias']
study['StudyTitle'] = study_object['DESCRIPTOR']['STUDY_TITLE']
study['Study title'] = study_object['DESCRIPTOR']['STUDY_TITLE']
if 'STUDY_ABSTRACT' in study_object['DESCRIPTOR']:
study['StudyDescription'] = study_object['DESCRIPTOR']['STUDY_ABSTRACT']
study['Study description'] = study_object['DESCRIPTOR']['STUDY_ABSTRACT']
else:
study['StudyDescription'] = "No study description available for " +study_object['@accession']
study['Study description'] = "No study description available for " +study_object['@accession']
if 'STUDY_TYPE' in study_object['DESCRIPTOR']:
study['type'] = study_object['DESCRIPTOR']['STUDY_TYPE']['@existing_study_type']
......@@ -218,11 +218,11 @@ def setup_observation_unit(content):
observation_unit['Study identifier'] = experiment['STUDY_REF']['@accession']
if "TITLE" in sample:
observation_unit['Observational description'] = sample['TITLE']
observation_unit['Observational name'] = sample['TITLE']
observation_unit['Observational unit description'] = sample['TITLE']
observation_unit['Observational unit name'] = sample['TITLE']
else:
observation_unit['Observational description'] = 'Automatic OU title from SRA ' + sample['@accession']
observation_unit['Observational name'] = 'Automatic OU title from SRA ' + sample['@accession']
observation_unit['Observational unit description'] = 'Automatic OU title from SRA ' + sample['@accession']
observation_unit['Observational unit name'] = 'Automatic OU title from SRA ' + sample['@accession']
return observation_unit
......@@ -246,10 +246,10 @@ def setup_sample(content):
# TODO check which name is used in the end
if "TITLE" in sample_object:
sample['Sample title'] = sample_object['TITLE']
sample['Sample name'] = sample_object['TITLE']
sample['sample name'] = sample_object['TITLE']
else:
sample['Sample title'] = 'Automatic sample title from SRA ' + sample['Sample identifier']
sample['Sample name'] = 'Automatic sample title from SRA ' + sample['Sample identifier']
sample['sample name'] = 'Automatic sample title from SRA ' + sample['Sample identifier']
sample['NCBI taxonomy ID'] = sample_object['SAMPLE_NAME']['TAXON_ID']
......@@ -331,7 +331,7 @@ def setup_assay(content):
assay['Library layout'] = list(dict(library['LIBRARY_LAYOUT']).keys())
# Machine
assay['Instument model'] = content['EXPERIMENT']['PLATFORM']['ILLUMINA']['INSTRUMENT_MODEL']
assay['Instrument model'] = content['EXPERIMENT']['PLATFORM']['ILLUMINA']['INSTRUMENT_MODEL']
if 'ILLUMINA' in content['EXPERIMENT']['PLATFORM']:
assay['Platform'] = 'Illumina'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment