Mercurial > repos > proteore > proteore_data_manager
comparison data_manager/resource_building.py @ 16:f75c525e0a4a draft
planemo upload commit 04868e380c43447fac1309fc292785d67863a87b-dirty
| author | proteore |
|---|---|
| date | Thu, 02 May 2019 09:04:06 -0400 |
| parents | 5f39d3ef5fe3 |
| children | 29cf75c83618 |
comparison
equal
deleted
inserted
replaced
| 15:5f39d3ef5fe3 | 16:f75c525e0a4a |
|---|---|
| 503 ids = id_list_from_nextprot_ftp(nextprot_ids_file,target_directory) | 503 ids = id_list_from_nextprot_ftp(nextprot_ids_file,target_directory) |
| 504 | 504 |
| 505 output_file = 'nextprot_ref_'+ time.strftime("%d-%m-%Y") + ".tsv" | 505 output_file = 'nextprot_ref_'+ time.strftime("%d-%m-%Y") + ".tsv" |
| 506 path = os.path.join(target_directory,output_file) | 506 path = os.path.join(target_directory,output_file) |
| 507 name = "neXtProt release "+time.strftime("%d-%m-%Y") | 507 name = "neXtProt release "+time.strftime("%d-%m-%Y") |
| 508 id = "nextprot_ref_"+time.strftime("%d-%m-%Y") | 508 release_id = "nextprot_ref_"+time.strftime("%d-%m-%Y") |
| 509 | |
| 510 | 509 |
| 511 output = open(path, 'w') | 510 output = open(path, 'w') |
| 512 writer = csv.writer(output,delimiter="\t") | 511 writer = csv.writer(output,delimiter="\t") |
| 513 | |
| 514 | |
| 515 | 512 |
| 516 nextprot_file=[["NextprotID","MW","SeqLength","IsoPoint","Chr","SubcellLocations","Diseases","TMDomains","ProteinExistence"]] | 513 nextprot_file=[["NextprotID","MW","SeqLength","IsoPoint","Chr","SubcellLocations","Diseases","TMDomains","ProteinExistence"]] |
| 517 writer.writerows(nextprot_file) | 514 writer.writerows(nextprot_file) |
| 518 | 515 |
| 519 for id in ids : | 516 for id in ids : |
| 564 # print (nb_domains) | 561 # print (nb_domains) |
| 565 nextprot_file[:] = [] | 562 nextprot_file[:] = [] |
| 566 nextprot_file.append([id,mass_mol,str(seq_length),iso_elec_point,chr_loc,all_subcell_locs,all_diseases,str(nb_domains),protein_existence]) | 563 nextprot_file.append([id,mass_mol,str(seq_length),iso_elec_point,chr_loc,all_subcell_locs,all_diseases,str(nb_domains),protein_existence]) |
| 567 writer.writerows(nextprot_file) | 564 writer.writerows(nextprot_file) |
| 568 | 565 |
| 569 data_table_entry = dict(id=id, name = name, value = path) | 566 data_table_entry = dict(id=release_id, name = name, value = path) |
| 570 _add_data_table_entry(data_manager_dict, data_table_entry, "proteore_nextprot_ref") | 567 _add_data_table_entry(data_manager_dict, data_table_entry, "proteore_nextprot_ref") |
| 571 | 568 |
| 572 ####################################################################################################### | 569 ####################################################################################################### |
| 573 # Main function | 570 # Main function |
| 574 ####################################################################################################### | 571 ####################################################################################################### |
