# HG changeset patch # User iuc # Date 1733381244 0 # Node ID cd0196536dfd5daa1d933eedf2d6d7b021a15f36 # Parent 545a0f7663ef26eb289a6ea7766c7a6cde6981be 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 545a0f7663ef -r cd0196536dfd data_manager/data_manager_fetch_genome_all_fasta_dbkeys.py --- a/data_manager/data_manager_fetch_genome_all_fasta_dbkeys.py Thu Dec 05 22:10:12 2019 +0000 +++ b/data_manager/data_manager_fetch_genome_all_fasta_dbkeys.py Thu Dec 05 06:47:24 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 545a0f7663ef -r cd0196536dfd data_manager/data_manager_fetch_genome_all_fasta_dbkeys.xml --- a/data_manager/data_manager_fetch_genome_all_fasta_dbkeys.xml Thu Dec 05 22:10:12 2019 +0000 +++ b/data_manager/data_manager_fetch_genome_all_fasta_dbkeys.xml Thu Dec 05 06:47:24 2024 +0000 @@ -1,7 +1,7 @@ - + fetching - python + python + - - + + + + + + + + + + + + diff -r 545a0f7663ef -r cd0196536dfd data_manager_conf.xml --- a/data_manager_conf.xml Thu Dec 05 22:10:12 2019 +0000 +++ b/data_manager_conf.xml Thu Dec 05 06:47:24 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 545a0f7663ef -r cd0196536dfd 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:47:24 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 545a0f7663ef -r cd0196536dfd 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:47:24 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 545a0f7663ef -r cd0196536dfd test-data/phiX174.data_manager_json --- a/test-data/phiX174.data_manager_json Thu Dec 05 22:10:12 2019 +0000 +++ /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