Mercurial > repos > proteore > proteore_data_manager
comparison data_manager/resource_building.py @ 1:f3507260b30f draft
planemo upload commit 39a9e2bf22b07beeca3fb77d86cda25820eb309c
author | proteore |
---|---|
date | Tue, 16 Apr 2019 07:46:59 -0400 |
parents | 9e31ea9fc7ea |
children | 9ec42cb35abd |
comparison
equal
deleted
inserted
replaced
0:9e31ea9fc7ea | 1:f3507260b30f |
---|---|
537 if len(all_diseases) > 0 : all_diseases = ";".join(all_diseases) | 537 if len(all_diseases) > 0 : all_diseases = ";".join(all_diseases) |
538 else : all_diseases="NA" | 538 else : all_diseases="NA" |
539 else : | 539 else : |
540 all_diseases="NA" | 540 all_diseases="NA" |
541 | 541 |
542 #get all tm domain | 542 #get all tm domain |
543 nb_domains = 0 | 543 nb_domains = 0 |
544 if "domain" in data['entry']['annotationsByCategory'].keys(): | 544 if "transmembrane-region" in data['entry']['annotationsByCategory'].keys(): |
545 tm_domains = data['entry']['annotationsByCategory']["domain"] | 545 tm_domains = data['entry']['annotationsByCategory']["transmembrane-region"] |
546 for tm_domain in tm_domains : | 546 all_tm_domains = set() |
547 if "properties" in tm_domain.keys() and tm_domain['properties']!=[]: | 547 for tm in tm_domains : |
548 domains = tm_domains["properties"] | 548 all_tm_domains.add(tm['cvTermName']) |
549 for domain in domains : | 549 nb_domains+=1 |
550 if domain["name"]=="region structure" and domain["value"]=="Helical" : | 550 print "nb domains ++" |
551 nb_domains+=1 | 551 print (nb_domains) |
552 | 552 |
553 | 553 nextprot_file.append([id,mass_mol,str(seq_length),iso_elec_point,chr_loc,all_subcell_locs,all_diseases,str(nb_domains),protein_existence]) |
554 nextprot_file.append([id,mass_mol,str(seq_length),iso_elec_point,chr_loc,all_subcell_locs,all_diseases,str(nb_domains),protein_existence]) | |
555 | 554 |
556 output_file = 'nextprot_ref_'+ time.strftime("%d-%m-%Y") + ".tsv" | 555 output_file = 'nextprot_ref_'+ time.strftime("%d-%m-%Y") + ".tsv" |
557 path = os.path.join(target_directory,output_file) | 556 path = os.path.join(target_directory,output_file) |
558 name = "neXtProt release "+time.strftime("%d-%m-%Y") | 557 name = "neXtProt release "+time.strftime("%d-%m-%Y") |
559 id = "nextprot_ref_"+time.strftime("%d-%m-%Y") | 558 id = "nextprot_ref_"+time.strftime("%d-%m-%Y") |