Mercurial > repos > dchristiany > data_manager_proteore
comparison data_manager/resource_building.py @ 51:8f6ddad93e9f draft
planemo upload commit 12b0b3e18cd7af9a8588906fa2ec199b9d2a770f-dirty
author | dchristiany |
---|---|
date | Fri, 01 Mar 2019 09:37:07 -0500 |
parents | 4b6c6f9b4de0 |
children |
comparison
equal
deleted
inserted
replaced
50:932950befe87 | 51:8f6ddad93e9f |
---|---|
50 path = os.path.join(target_directory, output_file) | 50 path = os.path.join(target_directory, output_file) |
51 unzip(url, path) #download and save file | 51 unzip(url, path) #download and save file |
52 tissue_name = tissue_name + " " + time.strftime("%d/%m/%Y") | 52 tissue_name = tissue_name + " " + time.strftime("%d/%m/%Y") |
53 tissue_id = tissue_name.replace(" ","_").replace("/","-") | 53 tissue_id = tissue_name.replace(" ","_").replace("/","-") |
54 | 54 |
55 data_table_entry = dict(id=tissue_id, name = tissue_name, value = tissue, path = path) | 55 data_table_entry = dict(id=tissue_id, name = tissue_name, tissue = tissue, value = path) |
56 _add_data_table_entry(data_manager_dict, data_table_entry, "proteore_protein_atlas") | 56 _add_data_table_entry(data_manager_dict, data_table_entry, "proteore_protein_atlas") |
57 | 57 |
58 | 58 |
59 ####################################################################################################### | 59 ####################################################################################################### |
60 # 2. Peptide Atlas | 60 # 2. Peptide Atlas |
474 id = species+"_"+interactome+"_"+ time.strftime("%d-%m-%Y") | 474 id = species+"_"+interactome+"_"+ time.strftime("%d-%m-%Y") |
475 | 475 |
476 with open(path, 'w') as handle: | 476 with open(path, 'w') as handle: |
477 json.dump(dico, handle, sort_keys=True) | 477 json.dump(dico, handle, sort_keys=True) |
478 | 478 |
479 data_table_entry = dict(id=id, name = name, value = species, path = path) | 479 data_table_entry = dict(id=id, name = name, species = species, value = path) |
480 _add_data_table_entry(data_manager_dict, data_table_entry, "proteore_"+interactome+"_dictionaries") | 480 _add_data_table_entry(data_manager_dict, data_table_entry, "proteore_"+interactome+"_dictionaries") |
481 | 481 |
482 | 482 |
483 ####################################################################################################### | 483 ####################################################################################################### |
484 # Main function | 484 # Main function |