Mercurial > repos > proteore > proteore_data_manager
comparison data_manager/resource_building.py @ 65:64b2d53be08b draft default tip
"planemo upload commit b218f949aa7a17b1e75a35946a3a19194bf168f3-dirty"
| author | proteore |
|---|---|
| date | Fri, 31 Jul 2020 14:02:26 +0000 |
| parents | 570519e1d968 |
| children |
comparison
equal
deleted
inserted
replaced
| 64:570519e1d968 | 65:64b2d53be08b |
|---|---|
| 555 release_id = "nextprot_ref_"+time.strftime("%d-%m-%Y") | 555 release_id = "nextprot_ref_"+time.strftime("%d-%m-%Y") |
| 556 | 556 |
| 557 output = open('test.csv', 'w') | 557 output = open('test.csv', 'w') |
| 558 writer = csv.writer(output,delimiter="\t") | 558 writer = csv.writer(output,delimiter="\t") |
| 559 | 559 |
| 560 nextprot_file=[["NextprotID","MW","SeqLength","IsoPoint","Chr","SubcellLocations","Diseases","TMDomains","ProteinExistence","ProteinName","Function","PostTranslationalModifications","ProteinFamily","Pathway"]] | 560 nextprot_file=[["NextprotID","ProteinName","SeqLength","MW","IsoPoint","TMDomains","SubcellLocations","Diseases","Function","PostTranslationalModifications","ProteinFamily","Pathway","ProteinExistence","Chr"]] |
| 561 writer.writerows(nextprot_file) | 561 writer.writerows(nextprot_file) |
| 562 | 562 |
| 563 for id in ids : | 563 for id in ids : |
| 564 query="https://api.nextprot.org/entry/"+id+".json" | 564 query="https://api.nextprot.org/entry/"+id+".json" |
| 565 try: | 565 try: |
| 642 nb_domains+=1 | 642 nb_domains+=1 |
| 643 #print "nb domains ++" | 643 #print "nb domains ++" |
| 644 #print (nb_domains) | 644 #print (nb_domains) |
| 645 | 645 |
| 646 nextprot_file[:] = [] | 646 nextprot_file[:] = [] |
| 647 nextprot_file.append([id,mass_mol,str(seq_length),iso_elec_point,chr_loc,all_subcell_locs,all_diseases,str(nb_domains),protein_existence,protein_name,function,post_trans_mod,protein_family,pathway]) | 647 nextprot_file.append([id,protein_name,str(seq_length),mass_mol,iso_elec_point,str(nb_domains),all_subcell_locs,all_diseases,function,post_trans_mod,protein_family,pathway,protein_existence,chr_loc]) |
| 648 writer.writerows(nextprot_file) | 648 writer.writerows(nextprot_file) |
| 649 | 649 |
| 650 id = str(10000000000 - int(time.strftime("%Y%m%d"))) | 650 id = str(10000000000 - int(time.strftime("%Y%m%d"))) |
| 651 | 651 |
| 652 data_table_entry = dict(id=id, release=release_id, name = name, value = path) | 652 data_table_entry = dict(id=id, release=release_id, name = name, value = path) |
