comparison data_manager/resource_building.py @ 2:2e34ee6d2d37 draft

planemo upload commit 4dd1a2f7d196a1d2e70fab379a2c08367da0fe94-dirty
author proteore
date Wed, 06 Mar 2019 08:57:43 -0500
parents 0915249b8c4b
children 18d3b1ea7a18
comparison
equal deleted inserted replaced
1:0915249b8c4b 2:2e34ee6d2d37
230 name_dict={"Human" : "Homo sapiens", "Mouse" : "Mus musculus", "Rat" : "Rattus norvegicus"} 230 name_dict={"Human" : "Homo sapiens", "Mouse" : "Mus musculus", "Rat" : "Rattus norvegicus"}
231 name = species +" (" + name_dict[species]+" "+time.strftime("%d/%m/%Y")+")" 231 name = species +" (" + name_dict[species]+" "+time.strftime("%d/%m/%Y")+")"
232 id = species+"_id_mapping_"+ time.strftime("%d-%m-%Y") 232 id = species+"_id_mapping_"+ time.strftime("%d-%m-%Y")
233 233
234 data_table_entry = dict(id=id, name = name, value = species, path = path) 234 data_table_entry = dict(id=id, name = name, value = species, path = path)
235 _add_data_table_entry(data_manager_dict, data_table_entry, "proteore_idmapping_"+species) 235 _add_data_table_entry(data_manager_dict, data_table_entry, "proteore_id_mapping_"+species)
236 236
237 def download_from_uniprot_ftp(file,target_directory) : 237 def download_from_uniprot_ftp(file,target_directory) :
238 ftp_dir = "pub/databases/uniprot/current_release/knowledgebase/idmapping/by_organism/" 238 ftp_dir = "pub/databases/uniprot/current_release/knowledgebase/idmapping/by_organism/"
239 path = os.path.join(target_directory, file) 239 path = os.path.join(target_directory, file)
240 ftp = ftplib.FTP("ftp.uniprot.org") 240 ftp = ftplib.FTP("ftp.uniprot.org")