Commit 377b5ee1 authored by Pinar Alper's avatar Pinar Alper
Browse files

Data extractor methods for own-cohort sheet added

Data extractor methods for  own-cohort sheet added
parent c206bff7
......@@ -34,6 +34,45 @@
}
]
},
"use_restrictions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"ga4gh_code": {
"type": "string",
"enum": [
'NRES',
'GRU(CC)',
'HMB(CC)',
'DS-[XX](CC)',
'POA',
'RS-[XX]',
'RUO',
'NMDS',
'GSO',
'NPU',
'PUB',
'COL-[XX]',
'RTN',
'IRB',
'GS-[XX]',
'MOR-[XX]',
'TS-[XX]',
'US',
'PS',
'IS'
]
},
"note": {
"type": "string"
}
},
"required": [
"ga4gh_code"
]
}
},
"data_types": {
"type": "array",
"items": {
......@@ -81,7 +120,7 @@
"source_type": {
"type": "string"
},
"source_project_acronym": {
"source_project": {
"type": "string"
},
"de_identification": {
......@@ -91,7 +130,14 @@
"pseudonymization"
]
},
"generated_inhouse": {
"consent_status": {
"type": "string",
"enum": [
"heterogeneous",
"homogeneous"
]
},
"involves_samples": {
"type": "boolean"
},
"has_special_subjects": {
......
......@@ -8,7 +8,7 @@
"acronym",
"title",
"description",
"descriptors",
"type_descriptors",
"funding_sources",
"contacts"
],
......
This diff is collapsed.
......@@ -165,11 +165,11 @@ def add_storage_locations(storage_dict, locations_list, category):
if is_storage_resource(locations_list[0]):
storage_dict.append(
{'storage_resource': locations_list[0], 'location': '<missing_info>',
'category': 'master'})
'category': category})
else:
storage_dict.append(
{'storage_resource': 'Other', 'location': locations_list[0],
'category': 'master'})
'category': category})
else:
raise ValueError('Uneven Master Data Location Row')
elif len(locations_list) % 2 == 0 and len(locations_list) > 0:
......@@ -182,3 +182,20 @@ def add_storage_locations(storage_dict, locations_list, category):
'location': locations_list[s * 2 + 1],
'category': category})
s += 1
def get_names_from_string(full_name):
result = ['', '']
name = full_name.strip()
if name.endswith(',') or name.endswith(','):
name = name[:-1]
if name is not None:
if " " in name:
name_list = name.split(" ")
result[0] = name_list[0]
if len(name_list) > 1:
result[1] = name_list[1]
else:
result[0] = name
return result
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment