changeset 1:f3507260b30f draft

planemo upload commit 39a9e2bf22b07beeca3fb77d86cda25820eb309c
author proteore
date Tue, 16 Apr 2019 07:46:59 -0400
parents 9e31ea9fc7ea
children 9ec42cb35abd
files data_manager/resource_building.py data_manager/resource_building.xml
diffstat 2 files changed, 11 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/data_manager/resource_building.py	Wed Mar 13 06:30:42 2019 -0400
+++ b/data_manager/resource_building.py	Tue Apr 16 07:46:59 2019 -0400
@@ -539,19 +539,18 @@
         else :
             all_diseases="NA"
 
-        #get all tm domain
+        #get all tm domain 
         nb_domains = 0
-        if  "domain" in data['entry']['annotationsByCategory'].keys():
-            tm_domains = data['entry']['annotationsByCategory']["domain"]
-            for tm_domain in tm_domains :
-                if "properties" in tm_domain.keys() and tm_domain['properties']!=[]:
-                    domains = tm_domains["properties"]
-                    for domain in domains :
-                        if domain["name"]=="region structure" and domain["value"]=="Helical" :
-                            nb_domains+=1
+        if  "transmembrane-region" in data['entry']['annotationsByCategory'].keys():
+            tm_domains = data['entry']['annotationsByCategory']["transmembrane-region"]
+            all_tm_domains = set()
+            for tm in tm_domains :
+                all_tm_domains.add(tm['cvTermName'])
+                nb_domains+=1
+                print "nb domains ++"
+                print (nb_domains)
 
-        
-        nextprot_file.append([id,mass_mol,str(seq_length),iso_elec_point,chr_loc,all_subcell_locs,all_diseases,str(nb_domains),protein_existence])
+    nextprot_file.append([id,mass_mol,str(seq_length),iso_elec_point,chr_loc,all_subcell_locs,all_diseases,str(nb_domains),protein_existence])
     
     output_file = 'nextprot_ref_'+ time.strftime("%d-%m-%Y") + ".tsv"
     path = os.path.join(target_directory,output_file)
--- a/data_manager/resource_building.xml	Wed Mar 13 06:30:42 2019 -0400
+++ b/data_manager/resource_building.xml	Tue Apr 16 07:46:59 2019 -0400
@@ -1,4 +1,4 @@
-<tool id="data_manager_proteore" name="Get source files for proteore tools" version="2019.03.13" tool_type="manage_data">
+<tool id="data_manager_proteore" name="Get source files for proteore tools" version="2019.04.04" tool_type="manage_data">
 <description>
 to create or update reference files for proteore tools
 </description>