# HG changeset patch # User iuc # Date 1763730690 0 # Node ID 5d4c00d5e84e93766109a2fc0bce27b50fdf2974 planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/data_managers/data_manager_build_coreprofiler commit ed6d188035ac31aa2da132889141b0898aa6bc86 diff -r 000000000000 -r 5d4c00d5e84e README.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README.rst Fri Nov 21 13:11:30 2025 +0000 @@ -0,0 +1,90 @@ +This tool downloads and builds the **CoreProfiler** scheme. +------------------------------------------------------------------------------- + +You can find the list of available schemes, as well as the reference platforms supported by CoreProfiler, in the +`CoreProfiler documentation `_. + +Please refer to this page for details on how to use the tool and which schema options are available. + +Use Galaxy's data manager framework to download and install new CoreProfiler schemes. + +If you want to use a scheme from **EnteroBase**, you do not need to provide any token or secret. + +However, if you want to use a scheme from **pubMLST** or **BigsDB**, you will need to follow a procedure before launching the data manager. + +BIGSdb and PubMLST platforms require **OAuth1 authentication** to access and download the most up-to-date schemes. +While authentication is not strictly mandatory, skipping it may result in downloading outdated schemes. + +This authentication involves two types of tokens: + +* **Consumer tokens**: permanent tokens used to initiate the authentication flow. +* **Access tokens**: tokens required to download a scheme. + +Procedure for **pubMLST schemes** (example: ``borrelia_3-cgMLST-639-pubmlst``) +------------------------------------------------------------------------------- + +1. Create an account on the `pubMLST website `_. +2. Generate a consumer token and secret from your account settings + (**My account → API keys → Enter key name → Submit**). +3. On your account page, go to **Database registrations**, check all databases, and register. +4. Download `coreprofiler `_ locally and run the following command to obtain your access token and secret: + + .. code-block:: bash + + coreprofiler db get_request_tokens --scheme \ + --consumer_key \ + --consumer_secret + + Replace the placeholders with your scheme of interest (example: ``borrelia_3``) and your actual consumer token and secret. + + This command will provide you with a URL to visit in order to authorize the client software to access your account. + After authorizing, it will give you a verification code that you need to enter in the command line prompt. + It will then return your access token and secret. + +5. Provide the consumer token, consumer secret, access token, and access secret in the data manager tool + by setting these bash variables in a ``.txt`` file: + + .. code-block:: bash + + export COREPROFILER_CONSUMER_TOKEN="" + export COREPROFILER_CONSUMER_SECRET="" + export COREPROFILER_ACCESS_TOKEN="" + export COREPROFILER_ACCESS_SECRET="" + +6. Set the path to this ``.txt`` file in your environment by making an environment variable + (example: ``export COREPROFILER_SECRETS_PATH="/path/to/your/secret_file.txt"``). + + +Procedure for **BigsDB schemes** (example: ``bordetella_1-cgMLST_genus-1415-BIGSdb``) +-------------------------------------------------------------------------------------- + +1. Create an account on the `BigsDB website `_. +2. Ask for a consumer token and secret by sending an email to ``bigsdb@pasteur.fr`` + (subject: **API client key**). +3. On your account page, go to **Database registrations**, check all databases, and register. +4. Download `coreprofiler `_ locally and run the following command to obtain your access token and secret: + + .. code-block:: bash + + coreprofiler db get_request_tokens --scheme \ + --consumer_key \ + --consumer_secret + + Replace the placeholders with your scheme of interest (example: ``bordetella_1``) and your actual consumer token and secret. + + This command will provide you with a URL to visit in order to authorize the client software to access your account. + After authorizing, it will give you a verification code that you need to enter in the command line prompt. + It will then return your access token and secret. + +5. Provide the consumer token, consumer secret, access token, and access secret in the data manager tool + by setting these bash variables in a ``.txt`` file: + + .. code-block:: bash + + export COREPROFILER_CONSUMER_TOKEN="" + export COREPROFILER_CONSUMER_SECRET="" + export COREPROFILER_ACCESS_TOKEN="" + export COREPROFILER_ACCESS_SECRET="" + +6. Set the path to this ``.txt`` file in your environment by making an environment variable + (example: ``export COREPROFILER_SECRETS_PATH="/path/to/your/secret_file.txt"``). diff -r 000000000000 -r 5d4c00d5e84e data_manager/data_manager_build_coreprofiler_download.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data_manager/data_manager_build_coreprofiler_download.xml Fri Nov 21 13:11:30 2025 +0000 @@ -0,0 +1,296 @@ + + + + 1.1.7 + 0 + 22.05 + + + + + + coreprofiler + blast + + + + + + + + + + + + + coreprofiler + blast + + &2 + echo "Please set the following variables before running this tool:" >&2 + echo " COREPROFILER_CONSUMER_TOKEN" >&2 + echo " COREPROFILER_CONSUMER_SECRET" >&2 + echo " COREPROFILER_ACCESS_TOKEN" >&2 + echo " COREPROFILER_ACCESS_SECRET" >&2 + echo "Please refer to the data manager help section for more information on how to generate these tokens." >&2 + fi && +#end if + + coreprofiler db download + -s $scheme_name + -o coreprofiler_${scheme_name}_${db_version}/scheme_$scheme_name + ## Used only for test + #if str($hide_test) == 'true': + -t + #end if + ## +#if $db_version == "token_version" + -k "$COREPROFILER_CONSUMER_TOKEN" + -ks "$COREPROFILER_CONSUMER_SECRET" + -a "$COREPROFILER_ACCESS_TOKEN" + -as "$COREPROFILER_ACCESS_SECRET" +#end if +&& +coreprofiler db makeblastdb + -s coreprofiler_${scheme_name}_${db_version}/scheme_$scheme_name + -n $scheme_name + -p coreprofiler_${scheme_name}_${db_version}/db_$scheme_name && + +mv coreprofiler_${scheme_name}_${db_version} '$out_file.extra_files_path' && + +cp '$dmjson' '$out_file' + ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CoreProfiler documentation. + +Please refer to this page for details on how to use the tool and which schema options are available. + +Use Galaxy's data manager framework to download and install new CoreProfiler schemes : + +If you want to use a scheme from enterobase, you do not need to provide any token or secret. + +However, if you want to use a scheme from **pubMLST** or **BigsDB**, you will need to follow a procedure before launching the data manager. + +BIGSdb and PubMLST platforms require OAuth1 authentication to access and download the most up-to-date schemes. +While authentication is not strictly mandatory, skipping it may result in downloading outdated schemes. + +This authentication involves two types of tokens: + + * Consumer tokens : permanent tokens used to initiate the authentication flow. + + * Access tokens : tokens required to download a scheme. + +Procedure for pubMLST schemes (example with borrelia_3-cgMLST-639-pubmlst) : + +1. Create an account on the pubMLST website. +2. Generate a consumer token and secret from your account settings (My account > API keys > Enter key name > Submit). +3. On your account page, go to Database registrations, check all databases and register. +4. Download coreprofiler locally and run the following command to obtain your access token and secret + +Replace the placeholders with your scheme of interest (example : borrelia_3) your actual consumer token and secret : + +""" +coreprofiler db get_request_tokens --scheme --consumer_key --consumer_secret +""" + +This command will provide you with a URL to visit in order to authorize client software to access your account. + +After authorizing, it will give you a verification code that you need to enter in the command line prompt. + +It will then return your access token and secret. + +5. Provide the consumer token, consumer secret, access token, and access secret in the data manager tool by setting this bash variables in a txt file : + +""" +export COREPROFILER_CONSUMER_TOKEN="" +export COREPROFILER_CONSUMER_SECRET="" +export COREPROFILER_ACCESS_TOKEN="" +export COREPROFILER_ACCESS_SECRET="" +""" + +6. Set the path to this txt file in your environment by making an environment variable (example : export COREPROFILER_SECRETS_PATH="/path/to/your/secret_file.txt"). + +Procedure for BigsDB (example with bordetella_1-cgMLST_genus-1415-BIGSdb): + +1. Create an account on the BigsDB website. +2. Ask for a consumer token and secret by sending a mail to bigsdb@pasteur.fr (object "API client key"). +3. On your account page, go to Database registrations, check all databases and register. +4. Download coreprofiler locally and run the following command to obtain your access token and secret + +Replace the placeholders with your scheme of interest (example : bordetella_1) your actual consumer token and secret : + +""" +coreprofiler db get_request_tokens --scheme --consumer_key --consumer_secret +""" + +This command will provide you with a URL to visit in order to authorize client software to access your account. + +After authorizing, it will give you a verification code that you need to enter in the command line prompt. + +It will then return your access token and secret. + +5. Provide the consumer token, consumer secret, access token, and access secret in the data manager tool by setting this bash variables in a txt file : + +""" +export COREPROFILER_CONSUMER_TOKEN="" +export COREPROFILER_CONSUMER_SECRET="" +export COREPROFILER_ACCESS_TOKEN="" +export COREPROFILER_ACCESS_SECRET="" +""" + +6. Set the path to this txt file in your environment by making an environment variable (example : export COREPROFILER_SECRETS_PATH="/path/to/your/secret_file.txt"). + ]]> + + 10.3390/microorganisms10020292 + + diff -r 000000000000 -r 5d4c00d5e84e data_manager_conf.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/data_manager_conf.xml Fri Nov 21 13:11:30 2025 +0000 @@ -0,0 +1,21 @@ + + + + + + + + + + ${path} + coreprofiler/${path} + + ${GALAXY_DATA_MANAGER_DATA_PATH}/coreprofiler/${path} + abspath + + + + + + + diff -r 000000000000 -r 5d4c00d5e84e test-data/coreprofiler_scheme.loc.test --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/coreprofiler_scheme.loc.test Fri Nov 21 13:11:30 2025 +0000 @@ -0,0 +1,18 @@ +#This is a tab separated file describing the location of CoreProfiler scheme +#used for the CoreProfiler tool +# +#file has this format (white space characters are TAB characters) +# +#The columns are: +#value name path database scheme +# +#For example +#coreprofiler_downloaded_20250625_klebsiella_3_scgMLST634_632_loci_bigsdb klebsiella_3: scgMLST634 [632 loci] (BIGSdb) coreprofiler_klebsiella_3 coreprofiler_klebsiella_3/db_klebsiella_3/klebsiella_3.fasta coreprofiler_klebsiella_3/scheme_klebsiella_3 +coreprofiler_downloaded_10102025-borrelia_3-cgMLST-639-pubmlst-no_token borrelia_3: cgMLST [639 loci] (pubmlst-no_token) /tmp/tmphn3k3ekk/galaxy-dev/tool-data/coreprofiler/coreprofiler_borrelia_3_no_token coreprofiler_borrelia_3_no_token/db_borrelia_3/borrelia_3.fasta coreprofiler_borrelia_3_no_token/scheme_borrelia_3 +coreprofiler_downloaded_10102025-bordetella_1-cgMLST_genus-1415-BIGSdb-no_token bordetella_1: cgMLST_genus [1415 loci] (BIGSdb-no_token) /tmp/tmphn3k3ekk/galaxy-dev/tool-data/coreprofiler/coreprofiler_bordetella_1_no_token coreprofiler_bordetella_1_no_token/db_bordetella_1/bordetella_1.fasta coreprofiler_bordetella_1_no_token/scheme_bordetella_1 +coreprofiler_downloaded_28102025-yersinia_1-Yersinia_cgMLST-500-BIGSdb-no_token yersinia_1: Yersinia_cgMLST [500 loci] (BIGSdb-no_token) /tmp/tmpomzcgw6j/galaxy-dev/tool-data/coreprofiler/coreprofiler_yersinia_1_no_token coreprofiler_yersinia_1_no_token/db_yersinia_1/yersinia_1.fasta coreprofiler_yersinia_1_no_token/scheme_yersinia_1 +coreprofiler_downloaded_17112025-yersinia_1-Yersinia_cgMLST-500-BIGSdb-no_token yersinia_1: Yersinia_cgMLST [500 loci] (BIGSdb-no_token) /tmp/tmphe1udqum/galaxy-dev/tool-data/coreprofiler/coreprofiler_yersinia_1_no_token coreprofiler_yersinia_1_no_token/db_yersinia_1/yersinia_1.fasta coreprofiler_yersinia_1_no_token/scheme_yersinia_1 +coreprofiler_downloaded_17112025-escherichia_v1-cgMLST-2513-enterobase-no_token escherichia_v1: cgMLST [2513 loci] (enterobase-no_token) /tmp/tmphe1udqum/galaxy-dev/tool-data/coreprofiler/coreprofiler_escherichia_v1_no_token coreprofiler_escherichia_v1_no_token/db_escherichia_v1/escherichia_v1.fasta coreprofiler_escherichia_v1_no_token/scheme_escherichia_v1 +coreprofiler_downloaded_17112025-borrelia_3-cgMLST-639-pubmlst-no_token borrelia_3: cgMLST [639 loci] (pubmlst-no_token) /tmp/tmp6njg6emw/galaxy-dev/tool-data/coreprofiler/coreprofiler_borrelia_3_no_token coreprofiler_borrelia_3_no_token/db_borrelia_3/borrelia_3.fasta coreprofiler_borrelia_3_no_token/scheme_borrelia_3 +coreprofiler_downloaded_17112025-yersinia_1-Yersinia_cgMLST-500-BIGSdb-no_token yersinia_1: Yersinia_cgMLST [500 loci] (BIGSdb-no_token) /tmp/tmp6njg6emw/galaxy-dev/tool-data/coreprofiler/coreprofiler_yersinia_1_no_token coreprofiler_yersinia_1_no_token/db_yersinia_1/yersinia_1.fasta coreprofiler_yersinia_1_no_token/scheme_yersinia_1 +coreprofiler_downloaded_17112025-escherichia_v1-cgMLST-2513-enterobase-no_token escherichia_v1: cgMLST [2513 loci] (enterobase-no_token) /tmp/tmp6njg6emw/galaxy-dev/tool-data/coreprofiler/coreprofiler_escherichia_v1_no_token coreprofiler_escherichia_v1_no_token/db_escherichia_v1/escherichia_v1.fasta coreprofiler_escherichia_v1_no_token/scheme_escherichia_v1 diff -r 000000000000 -r 5d4c00d5e84e tool-data/coreprofiler_scheme.loc.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool-data/coreprofiler_scheme.loc.sample Fri Nov 21 13:11:30 2025 +0000 @@ -0,0 +1,10 @@ +#This is a tab separated file describing the location of CoreProfiler scheme +#used for the CoreProfiler tool +# +#file has this format (white space characters are TAB characters) +# +#The columns are: +#value name path database scheme +# +#For example +#coreprofiler_downloaded_20250625_klebsiella_3_scgMLST634_632_loci_bigsdb klebsiella_3: scgMLST634 [632 loci] (BIGSdb) coreprofiler_klebsiella_3 coreprofiler_klebsiella_3/db_klebsiella_3/klebsiella_3.fasta coreprofiler_klebsiella_3/scheme_klebsiella_3 \ No newline at end of file diff -r 000000000000 -r 5d4c00d5e84e tool_data_table_conf.xml.sample --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_data_table_conf.xml.sample Fri Nov 21 13:11:30 2025 +0000 @@ -0,0 +1,6 @@ + + + value, name, path, database, scheme + +
+
\ No newline at end of file diff -r 000000000000 -r 5d4c00d5e84e tool_data_table_conf.xml.test --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_data_table_conf.xml.test Fri Nov 21 13:11:30 2025 +0000 @@ -0,0 +1,6 @@ + + + value, name, path, database, scheme + +
+
\ No newline at end of file