Mercurial > repos > proteore > proteore_data_manager
changeset 12:f6afaa1f562c draft
planemo upload commit 39a9e2bf22b07beeca3fb77d86cda25820eb309c-dirty
| author | proteore |
|---|---|
| date | Wed, 17 Apr 2019 09:45:33 -0400 |
| parents | ac2cd728c40e |
| children | 098693479a9d |
| files | data_manager/resource_building.py |
| diffstat | 1 files changed, 15 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- 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)
