Conversation
|
FYI OpenMS/OpenMS#7000 (comment) This registration thing in Sirius is really super annoying. Also sirius being kind of a black box always did not feel right for me. |
|
@bernt-matthias - Thank you for informing me about the Sirius OpenMS implementation. Although the registration process isn't ideal, the tool appears to be popular within the Metabolomics community. I have received several requests, including W4M. While I managed to get the testing to work locally using Planemo, integrating it with the Galaxy GitHub workflow has proven to be somewhat tricky. I am still keen to see if I can get the CI tests to work. I am using a similar approach to the one used for genome annotation tools, specifically Apollo. See here Your review or input is more than welcome. |
| cmd_login = "sirius login " \ | ||
| "--user='{}' " \ | ||
| "--password='{}'".format(credentials["username"], | ||
| credentials["password"]) |
There was a problem hiding this comment.
| cmd_login = "sirius login " \ | |
| "--user='{}' " \ | |
| "--password='{}'".format(credentials["username"], | |
| credentials["password"]) | |
| cmd_login = f"sirius login --user='{credentials["username"]}' --password='{credentials["password"]}'" |
f-string are the new cool stuff :)
| paramd["cli"]["--profile"], | ||
| paramd["cli"]["--database"] | ||
| ) | ||
| "fingerprint " \ |
There was a problem hiding this comment.
maybe also use f-string here?
There was a problem hiding this comment.
Those are IUC updates, correct? Maybe put them into a separate PR so we know what belongs to this PR?
(I assume you need to change CI for testing as well)
| echo "Credentials for Sirius are available via: User -> Preferences -> Manage Information" | ||
| #else: | ||
| echo "Running Sirius as user: $username" && | ||
| export _JAVA_OPTIONS=-Duser.home=$__new_file_path__ && |
There was a problem hiding this comment.
You should not write into __new_file_path__ random stuff. Can you use there \$PWD?
| --candidates $candidates | ||
| --ppm_max $ppm_max | ||
| --polarity $polarity | ||
| --out_dir $__new_file_path__ |
There was a problem hiding this comment.
| --out_dir $__new_file_path__ | |
| --out_dir ./ |
Better?
| --meta_select_col $meta_select_col | ||
| --min_MSMS_peaks $min_MSMS_peaks | ||
| --schema $schema | ||
| --temp_dir $__new_file_path__ |
There was a problem hiding this comment.
| --temp_dir $__new_file_path__ | |
| --temp_dir ./ |
| # group runs by PR, but keep runs on main separate | ||
| # because we do not want to cancel toolshed uploads | ||
| group: pr-${{ (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') && github.run_number || github.ref }} | ||
| group: pr-${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/main') && github.run_number || github.ref }} |
There was a problem hiding this comment.
You can leave this as it is. It covers main and master
|
@bernt-matthias @bgruening - Thank you for your swift reviews. Could you help me understand why the arguments for Planemo are resulting in the incorrect order, see here I am using the |
.github/workflows/pr.yaml
Outdated
| galaxy-branch: ${{ env.GALAXY_BRANCH }} | ||
| chunk: ${{ matrix.chunk }} | ||
| chunk-count: ${{ needs.setup.outputs.chunk-count }} | ||
| additional-planemo-options: --job_config_file "${{ github.workspace }}/config/job_conf_planemo_subst.xml" |
There was a problem hiding this comment.
Test currently fails with
Error: Invalid value for '--job_config_file': File '"/home/runner/work/sirius-csifingerid-galaxy/sirius-csifingerid-galaxy/config/job_conf_planemo_subst.xml"' does not exist.
There was a problem hiding this comment.
In case you want to debug danielr1996/envsubst-action@1.0.0 you could just execute the command used in the action: https://github.com/danielr1996/envsubst-action/blob/b10d6e6eb5dba1c22527571460ceb83bc17c0b28/entrypoint.sh#L3
| <param id="docker_sudo">false</param> | ||
| <param id="docker_sudo_cmd">sudo</param> | ||
| <param id="docker_cmd">docker</param> | ||
| <param id="docker_run_extra_arguments">-e USERNAME_SIRIUS='${USERNAME_SIRIUS}' -e PASSWORD_SIRIUS='${PASSWORD_SIRIUS}'</param> |
There was a problem hiding this comment.
You can set env vars for containers like so:
<param id="docker_env_USERNAME_SIRIUS">'${USERNAME_SIRIUS}'</param>
<param id="docker_env_PASSWORD_SIRIUS">'${USERNAME_SIRIUS}'</param>
| parser.add_argument('--schema', default='msp') | ||
| parser.add_argument('-a', '--adducts', action='append', nargs=1, | ||
| required=False, default=[], help='Adducts used') | ||
| parser.add_argument('--credentials') |
There was a problem hiding this comment.
help would be nice.
| "--user='{}' " \ | ||
| "--password='{}'".format(credentials["username"], | ||
| credentials["password"]) | ||
| os.system(cmd_login) |
There was a problem hiding this comment.
Using subprocess might be better: https://docs.python.org/3/library/subprocess.html
| #set $username = $__user__.extra_preferences.get('sirius_account|username', "") | ||
| #end if | ||
| #if $username == "": | ||
| echo "Credentials for Sirius are available via: User -> Preferences -> Manage Information" |
There was a problem hiding this comment.
| echo "Credentials for Sirius are available via: User -> Preferences -> Manage Information" | |
| >&2 echo "Credentials for Sirius are available via: User -> Preferences -> Manage Information"; | |
| exit 1 |
| #if $username == "": | ||
| echo "Credentials for Sirius are available via: User -> Preferences -> Manage Information" | ||
| #else: | ||
| echo "Running Sirius as user: $username" && |
There was a problem hiding this comment.
Should we expose this info to the user (e.g. in the case it's set by the admin via env vars)?
What do you mean with wrong order? My guess would be that the use of single and double quotes in |
No description provided.