# HG changeset patch # User proteore # Date 1555508733 14400 # Node ID f6afaa1f562ce5e7168f37ad98ba248674122a34 # Parent ac2cd728c40e71ff33f99c3a5067191453b3d37c planemo upload commit 39a9e2bf22b07beeca3fb77d86cda25820eb309c-dirty diff -r ac2cd728c40e -r f6afaa1f562c data_manager/resource_building.py --- a/data_manager/resource_building.py Tue Apr 16 07:50:03 2019 -0400 +++ b/data_manager/resource_building.py Wed Apr 17 09:45:33 2019 -0400 @@ -501,7 +501,18 @@ def Build_nextprot_ref_file(data_manager_dict,target_directory): nextprot_ids_file = "nextprot_ac_list_all.txt" ids = id_list_from_nextprot_ftp(nextprot_ids_file,target_directory) - + + output_file = 'nextprot_ref_'+ time.strftime("%d-%m-%Y") + ".tsv" + path = os.path.join(target_directory,output_file) + name = "neXtProt release "+time.strftime("%d-%m-%Y") + id = "nextprot_ref_"+time.strftime("%d-%m-%Y") + + + with open(path, 'w') as output: + writer = csv.writer(output,delimiter="\t") + + + nextprot_file=[["NextprotID","MW","SeqLength","IsoPoint","Chr","SubcellLocations","Diseases","TMDomains","ProteinExistence"]] for id in ids : #print (id) @@ -547,18 +558,10 @@ for tm in tm_domains : all_tm_domains.add(tm['cvTermName']) nb_domains+=1 - print "nb domains ++" - print (nb_domains) + # 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]) - - output_file = 'nextprot_ref_'+ time.strftime("%d-%m-%Y") + ".tsv" - path = os.path.join(target_directory,output_file) - name = "neXtProt release "+time.strftime("%d-%m-%Y") - id = "nextprot_ref_"+time.strftime("%d-%m-%Y") - - with open(path, 'w') as output: - writer = csv.writer(output,delimiter="\t") + nextprot_file.append([id,mass_mol,str(seq_length),iso_elec_point,chr_loc,all_subcell_locs,all_diseases,str(nb_domains),protein_existence]) writer.writerows(nextprot_file) data_table_entry = dict(id=id, name = name, value = path)