Compare commits

..

4 Commits

Author SHA1 Message Date
411a169079 Updated description
Some checks are pending
autoBIGS.galaxy/pipeline/head Build queued...
2025-02-25 16:50:27 +00:00
6a3e692d82 Updated .shed.yml owner to iuc 2025-02-25 16:46:24 +00:00
dcf28c8051 Added more help information and changed file input to use multiple instead of repeat.
Some checks are pending
autoBIGS.galaxy/pipeline/head Build queued...
2025-02-25 16:44:32 +00:00
ddb98514fb Changed to whitespaces
Some checks failed
autoBIGS.galaxy/pipeline/head There was a failure building this commit
2025-02-25 15:16:37 +00:00
5 changed files with 117 additions and 110 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
galaxy-server/**
test_results
autobigs-cli_test_report.html

View File

@ -1,5 +1,5 @@
name: autobigs
owner: ydeng
owner: iuc
description: Automated MLST typing from PubMLST and InstitutPasteur.
homepage_url: https://github.com/Syph-and-VPD-Lab/autoBIGS.cli
long_description: |

17
Jenkinsfile vendored
View File

@ -2,29 +2,28 @@ pipeline {
agent {
kubernetes {
cloud 'rsys-devel'
defaultContainer 'miniforge3'
inheritFrom 'miniforge'
defaultContainer 'pip'
inheritFrom 'pip'
}
}
stages {
stage ("install") {
steps {
sh 'conda env update -n base --file environment.yml'
sh 'useradd galaxy -m'
sh 'apt-get update'
sh 'apt-get install sudo -y'
sh 'pip install -r requirements.txt'
sh 'pip install standard-imghdr'
sh 'planemo ci_setup'
}
}
stage ("lint") {
steps {
sh "sudo -u galaxy planemo lint autobigs-cli.xml"
sh "planemo lint autobigs-cli.xml"
}
}
stage ("test") {
steps {
sh 'sudo -u galaxy mkdir test_results'
sh "sudo -u galaxy planemo test autobigs-cli.xml --test_output_junit test_results/junit_results.xml --test_output_json test_results/results.json --test_output test_results/human.html"
sh 'mkdir test_results'
sh "planemo test autobigs-cli.xml --test_output_junit test_results/junit_results.xml --test_output_json test_results/results.json --test_output test_results/human.html"
xunit checksName: '', tools: [JUnit(excludesPattern: '', pattern: 'test_results/junit_report.xml', stopProcessingIfError: true)]
}
}

View File

@ -1,76 +1,72 @@
<tool id="autobigs-cli" name="autoBIGS.cli" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05">
<description>Automated MLST typing from PubMLST and InstitutPasteur.</description>
<macros>
<token name="@TOOL_VERSION@">0.5.0</token>
<token name="@VERSION_SUFFIX@">0</token>
<import>autobigs-cli_macros.xml</import>
<expand macro="bio_tools"/>
</macros>
<description>Automated MLST typing from PubMLST and InstitutPasteur MLST databases.</description>
<macros>
<token name="@TOOL_VERSION@">0.5.0</token>
<token name="@VERSION_SUFFIX@">0</token>
<import>autobigs-cli_macros.xml</import>
<expand macro="bio_tools"/>
</macros>
<requirements>
<requirement type="package" version="@TOOL_VERSION@">autobigs-cli</requirement>
</requirements>
<requirements>
<requirement type="package" version="@TOOL_VERSION@">autobigs-cli</requirement>
</requirements>
<command detect_errors="exit_code"><![CDATA[
#if $mode.operation == "info":
#if $mode.select_info.retrieved == "schemes":
autoBIGS info --retrieve-bigsdb-schemas#for $scheme in $mode.select_info.schemes_list# '${scheme.selected_db}' #end for# --csv $info_schemes_out
#else if $mode.select_info.retrieved == "databases":
autoBIGS info --retrieve-bigsdbs --csv $info_db_out
#end if
#else if $mode.operation == "st":
autoBIGS st#for $fasta in $mode.fastas_list# '${fasta.fasta}' #end for#"$seqdefdb" $schema "$mlst_profiles_output" $stop_on_fail
#end if
]]></command>
<inputs>
<conditional name="mode">
<param name="operation" label="Operation" type="select">
<option value="info">Retrieve Database Information</option>
<option value="st">Perform Sequence Typing</option>
</param>
<when value="info">
<conditional name="select_info">
<param name="retrieved" label="Schemes or Database List" type="select">
<option value="schemes">Available Schemas for Database</option>
<option value="databases">Available Databases</option>
</param>
<when value="schemes">
<repeat name="schemes_list" title="Schemes" min="1">
<param name="selected_db" argument="--retrieve-bigsdb-schemas" label="Database to retrieve schemes from" type="text"/>
</repeat>
</when>
<when value="databases">
<command detect_errors="exit_code"><![CDATA[
#if $mode.operation == "info":
#if $mode.select_info.retrieved == "schemes":
autoBIGS info --retrieve-bigsdb-schemas#for $scheme in $mode.select_info.schemes_list# '${scheme.selected_db}' #end for# --csv $info_schemes_out
#else if $mode.select_info.retrieved == "databases":
autoBIGS info --retrieve-bigsdbs --csv $info_db_out
#end if
#else if $mode.operation == "st":
autoBIGS st "$fasta" "$seqdefdb" $schema "$mlst_profiles_output" $stop_on_fail
#end if
]]></command>
<inputs>
<conditional name="mode">
<param name="operation" label="Operation" type="select" help="The operational mode of the tool.">
<option value="info">Retrieve Database Information</option>
<option value="st">Perform Sequence Typing</option>
</param>
<when value="info">
<conditional name="select_info">
<param name="retrieved" label="Retrieve" type="select" help="The type of information should the tool retrieve.">
<option value="schemes">Available Schemes for Database</option>
<option value="databases">Available Databases</option>
</param>
<when value="schemes">
<repeat name="schemes_list" title="Schemes" min="1">
<param name="selected_db" argument="--retrieve-bigsdb-schemas" label="Database Name" type="text" optional="false" help="The name of the database to retrieve schemes for."/>
</repeat>
</when>
<when value="databases">
</when>
</conditional>
</when>
<when value="st">
<repeat name="fastas_list" title="Fasta" min="1">
<param name="fasta" label="FASTA file" type="data" format="fasta,fas,fa,fna,ffn,faa,mpfa,frn"/>
</repeat>
<param name="seqdefdb" label="BIGSdb SeqDef Name" type="text" optional="false"/>
<param name="schema" label="BIGSdb SeqDef Schema ID" type="integer" min="0"/>
<param name="stop_on_fail" label="Stop on failure to match" truevalue="--sof" falsevalue="" value="false" type="boolean"/>
</when>
</conditional>
</inputs>
<outputs>
<data name="mlst_profiles_output" label="${tool.name} on ${on_string}" format="csv">
<filter>mode['operation'] == 'st'</filter>
</data>
<data name="info_db_out" label="${tool.name} supported Databases" format="csv">
<filter>mode['operation'] == 'info' and mode['select_info']['retrieved'] == 'databases'</filter>
</data>
<data name="info_schemes_out" label="${tool.name} supported Schemes" format="csv">
<filter>mode['operation'] == 'info' and mode['select_info']['retrieved'] == 'schemes'</filter>
</data>
</outputs>
</when>
</conditional>
</when>
<when value="st">
<param name="fasta" label="FASTA file" type="data" format="fasta,fas,fa,fna,ffn,faa,mpfa,frn" multiple="true" help="The FASTA(s) file to perform sequence typing on."/>
<param name="seqdefdb" label="BIGSdb SeqDef Name" type="text" optional="false" help="The database to use for typing."/>
<param name="schema" label="BIGSdb SeqDef Schema ID" type="integer" min="0" help="The (integer) ID of the scheme to be used."/>
<param name="stop_on_fail" label="Stop on failure to match" truevalue="--sof" falsevalue="" value="false" type="boolean" help="Stops running on failure to obtain sequence type."/>
</when>
</conditional>
</inputs>
<outputs>
<data name="mlst_profiles_output" label="${tool.name} on ${on_string}" format="csv">
<filter>mode['operation'] == 'st'</filter>
</data>
<data name="info_db_out" label="${tool.name} supported Databases" format="csv">
<filter>mode['operation'] == 'info' and mode['select_info']['retrieved'] == 'databases'</filter>
</data>
<data name="info_schemes_out" label="${tool.name} supported Schemes" format="csv">
<filter>mode['operation'] == 'info' and mode['select_info']['retrieved'] == 'schemes'</filter>
</data>
</outputs>
<tests>
<test expect_num_outputs="1">
<param name="operation" value="st" />
<repeat name="fastas_list">
<param name="fasta" value="tohama_I_minimized_features.fasta" />
</repeat>
<param name="fasta" value="tohama_I_minimized_features.fasta" />
<param name="seqdefdb" value="pubmlst_bordetella_seqdef" />
<param name="schema" value="3" />
<output name="mlst_profiles_output" file="tohama_I_minimized_features_typed.csv" ftype="csv" />
@ -79,53 +75,63 @@
<param name="operation" value="info" />
<param name="retrieved" value="databases" />
<output name="info_db_out">
<assert_contents>
<has_text text="BIGSdb Names,Source"/>
<has_text text="pubmlst_bordetella_seqdef,https://bigsdb.pasteur.fr/api"/>
</assert_contents>
</output>
<assert_contents>
<has_text text="BIGSdb Names,Source"/>
<has_text text="pubmlst_bordetella_seqdef,https://bigsdb.pasteur.fr/api"/>
</assert_contents>
</output>
</test>
<test expect_num_outputs="1">
<param name="operation" value="info" />
<repeat name="schemes_list">
<param name="selected_db" value="pubmlst_bordetella_seqdef" />
</repeat>
<repeat name="schemes_list">
<param name="selected_db" value="pubmlst_bordetella_seqdef" />
</repeat>
<output name="info_schemes_out">
<assert_contents>
<has_text text="Name,ID"/>
<has_text text="MLST,3"/>
</assert_contents>
</output>
<assert_contents>
<has_text text="Name,ID"/>
<has_text text="MLST,3"/>
</assert_contents>
</output>
</test>
</tests>
<help><![CDATA[
<help><![CDATA[
What is autoBIGS
================
autoBIGS is a tool to help automatically performes multi-locus sequence typing (MLST) on given data by performing calls to necessary web BIGS database web APIs.
usage: autoBIGS info [-h] [--retrieve-bigsdbs] [--retrieve-bigsdb-schemas LIST_BIGSDB_SCHEMAS [LIST_BIGSDB_SCHEMAS ...]] [--csv CSV_OUTPUT]
Tool Modes
==========
autoBIGS has two modes. Since the tool works with the sequence definition and MLST databases live, it is also able to tell the user the currently available databases, and their associated schemas. See the following sections for more information.
Fetches the latest BIGSdb MLST database definitions.
Obtaining Database Name and Schema ID
=====================================
You will need a database name and scheme ID for sequence typing. Follow these steps to check what databases, schemes, and their associated IDs are available.
options:
-h, --help show this help message and exit
--retrieve-bigsdbs, -l
Lists all known BIGSdb MLST databases (fetched from known APIs and cached).
--retrieve-bigsdb-schemas LIST_BIGSDB_SCHEMAS
Lists the known schema IDs for a given BIGSdb sequence definition database name. The name, and then the ID of the schema is given.
--csv, -o CSV_OUTPUT Output list as CSV at a given path. A suffix is added depending on the action taken.
1. Select "Retrieve Database Information" for "Operation"
2. Then for "Retrieve" select "Databases" and run. This will produce a table job output with all possible database names and their database API URL.
3. Note down the names of the databases you are interested in.
4. Select "Retrieve Database Information" for "Operation"
5. Then, for "Retrieve", select "Available schemes for Database".
6. Enter the noted interested database and run. This will return a CSV with the scheme IDs. Note down interested IDs.
usage: autoBIGS st [-h] [--stop-on-fail] fastas [fastas ...] seqdefdb schema out
Performing Sequence Typing
==========================
Simply select "Perform Sequence Typing" for the "Operation" and select your FASTA files. Then, enter your SeqDef Database name (see "Obtaining Database Name and Schema ID" above) and schema ID.
Returns MLST exact profile matches.
Special behaviour for FASTAs with multiple sequences
====================================================
AutoBIGS will treat multiple sequences in the same FASTA file as part of the same sample. This will result in a fasta with multiple sequences within the same row with the final sequence type being retrieved from the resulting alleles of the individual sequences within the FASTA. This is helpful if the input FASTA was obtained from a targetted form of sequencing for the specific needed regions (e.g., Sanger sequencing of 7 house keeping genes), rather than a whole genome sequence. If your data is a whole genome sequence (WGS) of the entire genome or similar, each WGS should have it's own FASTA.
positional arguments:
fastas The FASTA files to process. Multiple can be listed.
seqdefdb The BIGSdb seqdef database to use for typing.
schema The BIGSdb seqdef database schema ID (integer) to use for typing.
out The output CSV name (.csv will be appended).
More Information
================
For more information on the tool being wrapped itself, please see the `autoBIGS.cli Github repository`_. Issues, bugs, and feature requests for the tool itself should be submitted to the `autoBIGS.cli issues`_. If the issue/bug/feature request is solely pertanent to the Galaxy wrapper, please check out the `autoBIGS.galaxy issues`_ tracker on GitHub.
options:
-h, --help show this help message and exit
--stop-on-fail, -sof Should the algorithm stop in the case there are no matches (or partial matches when expecting exact matches).
]]></help>
.. _autoBIGS.cli GitHub repository: https://github.com/Syph-and-VPD-Lab/autoBIGS.cli
.. _autoBIGS.cli issues: https://github.com/Syph-and-VPD-Lab/autoBIGS.cli/issues
.. _autoBIGS.galaxy: https://github.com/Syph-and-VPD-Lab/autoBIGS.galaxy
.. _autoBIGS.galaxy issues: https://github.com/Syph-and-VPD-Lab/autoBIGS.galaxy/issues
]]></help>
<citations>
<citation type="bibtex">
@book{Deng2025RealYHD,

1
galaxy-server Submodule

@ -0,0 +1 @@
Subproject commit 49c0dd08df22f3e78a2fd4785b73a7bc41fe7292