# HG changeset patch # User iuc # Date 1733381362 0 # Node ID 4a82d1157b14a487f3986150ed4b0fc3b298f25d # Parent 4d3eff1bc4216ca696c0f4630fdbd1f8ab47de24 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_fetch_genome_dbkeys_all_fasta commit 57d05675396f0b44265fb4dbc8f9f891c6073219 diff -r 4d3eff1bc421 -r 4a82d1157b14 data_manager/data_manager_fetch_genome_all_fasta_dbkeys.py --- a/data_manager/data_manager_fetch_genome_all_fasta_dbkeys.py Thu Dec 05 17:10:39 2019 -0500 +++ b/data_manager/data_manager_fetch_genome_all_fasta_dbkeys.py Thu Dec 05 06:49:22 2024 +0000 @@ -279,6 +279,8 @@ target_directory=target_directory, dbkey=dbkey, dbkey_name=dbkey_name, + sequence_id=sequence_id, + sequence_name=sequence_name, fasta_filename=fasta_filename) _add_data_table_entry(data_manager_dict, data_table_entry=dict(value=sequence_id, dbkey=dbkey, name=sequence_name, path=os.path.basename(fasta_filename)), @@ -286,11 +288,11 @@ return fasta_filename -def add_dbkey_to_table(data_manager_dict, target_directory, dbkey, dbkey_name, fasta_filename): +def add_dbkey_to_table(data_manager_dict, target_directory, dbkey, dbkey_name, sequence_id, sequence_name, fasta_filename): # do len calc here - len_base_name = "%s.len" % (dbkey) + len_base_name = f"{sequence_id}.len" compute_fasta_length(fasta_filename, os.path.join(target_directory, len_base_name), keep_first_word=True) - dbkey_dict = dict(value=dbkey, name=dbkey_name, len_path=len_base_name) + dbkey_dict = dict(dbkey=dbkey, value=sequence_id, name=sequence_name, len_path=len_base_name) _add_data_table_entry(data_manager_dict, data_table_entry=dbkey_dict, data_table_name='__dbkeys__') @@ -345,7 +347,7 @@ if isinstance(input_filename, list): fasta_readers = [get_stream_reader(open(filename, 'rb'), tmp_dir) for filename in input_filename] else: - fasta_readers = get_stream_reader(open(input_filename), tmp_dir) + fasta_readers = get_stream_reader(open(input_filename, 'rb'), tmp_dir) return fasta_readers for data_table_name, data_table_entry in data_table_entries: if data_table_entry: diff -r 4d3eff1bc421 -r 4a82d1157b14 data_manager/data_manager_fetch_genome_all_fasta_dbkeys.xml --- a/data_manager/data_manager_fetch_genome_all_fasta_dbkeys.xml Thu Dec 05 17:10:39 2019 -0500 +++ b/data_manager/data_manager_fetch_genome_all_fasta_dbkeys.xml Thu Dec 05 06:49:22 2024 +0000 @@ -1,7 +1,7 @@ - + fetching - python + python + - - + + + + + + + + + + + + diff -r 4d3eff1bc421 -r 4a82d1157b14 data_manager_conf.xml --- a/data_manager_conf.xml Thu Dec 05 17:10:39 2019 -0500 +++ b/data_manager_conf.xml Thu Dec 05 06:49:22 2024 +0000 @@ -10,9 +10,9 @@ ${path} - ${dbkey}/seq/${path} + genomes/${dbkey}/seq/${path} - ${GALAXY_DATA_MANAGER_DATA_PATH}/${dbkey}/seq/${path} + ${GALAXY_DATA_MANAGER_DATA_PATH}/genomes/${dbkey}/seq/${path} abspath @@ -24,9 +24,9 @@ ${len_path} - ${value}/len/${len_path} + genomes/${dbkey}/len/${len_path} - ${GALAXY_DATA_MANAGER_DATA_PATH}/${value}/len/${len_path} + ${GALAXY_DATA_MANAGER_DATA_PATH}/genomes/${dbkey}/len/${len_path} abspath diff -r 4d3eff1bc421 -r 4a82d1157b14 test-data/fetch_data_manager.1.data_manager_json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/fetch_data_manager.1.data_manager_json Thu Dec 05 06:49:22 2024 +0000 @@ -0,0 +1,1 @@ +{"data_tables": {"__dbkeys__": [{"dbkey": "phiX174", "len_path": "phiX174.len", "name": "phiX174 sequence name", "value": "phiX174"}], "all_fasta": [{"dbkey": "phiX174", "name": "phiX174 sequence name", "path": "phiX174.fa", "value": "phiX174"}]}} \ No newline at end of file diff -r 4d3eff1bc421 -r 4a82d1157b14 test-data/fetch_data_manager.2.data_manager_json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/fetch_data_manager.2.data_manager_json Thu Dec 05 06:49:22 2024 +0000 @@ -0,0 +1,1 @@ +{"data_tables": {"__dbkeys__": [{"dbkey": "phiX174", "len_path": "phiX174Variant1.len", "name": "phiX174 Variant 1 sequence name", "value": "phiX174Variant1"}], "all_fasta": [{"dbkey": "phiX174", "name": "phiX174 Variant 1 sequence name", "path": "phiX174Variant1.fa", "value": "phiX174Variant1"}]}} \ No newline at end of file diff -r 4d3eff1bc421 -r 4a82d1157b14 test-data/phiX174.data_manager_json --- a/test-data/phiX174.data_manager_json Thu Dec 05 17:10:39 2019 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -{"data_tables": {"__dbkeys__": [{"len_path": "phiX174.len", "name": "phiX174", "value": "phiX174"}], "all_fasta": [{"dbkey": "phiX174", "name": "phiX174 sequence name", "path": "phix174.fa", "value": "phix174"}]}} \ No newline at end of file