Mercurial > repos > proteore > proteore_data_manager
changeset 40:a7bcc9a0a456 draft
"planemo upload commit ba867b8fa3352695fbda1ae764407f363ee79a50-dirty"
| author | proteore |
|---|---|
| date | Wed, 08 Jan 2020 13:28:05 +0000 |
| parents | 45dc32d0afa0 |
| children | fe21769281fa |
| files | data_manager/resource_building.py data_manager/resource_building.xml |
| diffstat | 2 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/data_manager/resource_building.py Wed Jan 08 13:11:36 2020 +0000 +++ b/data_manager/resource_building.py Wed Jan 08 13:28:05 2020 +0000 @@ -150,6 +150,7 @@ tab_reader = csv.reader(select,delimiter="\t") for line in tab_reader : tab.append([line[0]]+[line[i] for i in [0,1,2,3,4,5,6,11,13,14,18,19,20]]) + if os.path.exists(os.path.join(archive,tab_path[-1])) : os.remove(os.path.join(archive,tab_path[-1])) shutil.move(tab_path, archive) #print("selected_tab ok") @@ -185,7 +186,7 @@ unidict = {} #keep only ids of interest in dictionaries - dat_file=species_dict[species]+"_"+files[1] + dat_file = species_dict[species]+"_"+files[1] dat_path = download_from_uniprot_ftp(dat_file,target_directory) with gzip.open(dat_path,"rt") as dat : dat_reader = csv.reader(dat,delimiter="\t") @@ -201,6 +202,7 @@ unidict[uniprotID].update({ id_type : cor_id }) elif id_type in ids : unidict[uniprotID]={id_type : cor_id} + if os.path.exists(os.path.join(archive,dat_path[-1])) : os.remove(os.path.join(archive,dat_path[-1])) shutil.move(dat_path, archive) #print("dat_file ok") @@ -231,6 +233,7 @@ nextprot_path = id_list_from_nextprot_ftp("nextprot_ac_list_all.txt",target_directory) with open(nextprot_path,'r') as nextprot_ids : nextprot_ids = nextprot_ids.read().splitlines() + if os.path.exists(os.path.join(archive,nextprot_path[-1])) : os.remove(os.path.join(archive,nextprot_path[-1])) shutil.move(nextprot_path,archive) next_dict = {} for nextid in nextprot_ids : @@ -644,7 +647,7 @@ ## Download ID_mapping source file from Uniprot try: - id_mapping=args.id_mapping + id_mapping = args.id_mapping except NameError: id_mapping = None if id_mapping is not None:
--- a/data_manager/resource_building.xml Wed Jan 08 13:11:36 2020 +0000 +++ b/data_manager/resource_building.xml Wed Jan 08 13:28:05 2020 +0000 @@ -1,4 +1,4 @@ -<tool id="data_manager_proteore" name="Get source files for proteore tools" version="2020.01.08.8" tool_type="manage_data"> +<tool id="data_manager_proteore" name="Get source files for proteore tools" version="2020.01.08.9" tool_type="manage_data"> <description> to create or update reference files for proteore tools </description>
