Added more help information and changed file input to use multiple instead of repeat.
Some checks are pending
autoBIGS.galaxy/pipeline/head Build queued...

This commit is contained in:
Harrison Deng 2025-02-25 16:44:32 +00:00
parent ddb98514fb
commit dcf28c8051
3 changed files with 41 additions and 33 deletions

1
.gitignore vendored
View File

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

1
Jenkinsfile vendored
View File

@ -11,6 +11,7 @@ pipeline {
stage ("install") {
steps {
sh 'pip install -r requirements.txt'
sh 'pip install standard-imghdr'
sh 'planemo ci_setup'
}
}

View File

@ -19,24 +19,24 @@
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
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">
<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="Schemes or Database List" type="select">
<option value="schemes">Available Schemas for Database</option>
<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 to retrieve schemes from" type="text"/>
<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">
@ -45,12 +45,10 @@
</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"/>
<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>
@ -68,9 +66,7 @@
<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="seqdefdb" value="pubmlst_bordetella_seqdef" />
<param name="schema" value="3" />
<output name="mlst_profiles_output" file="tohama_I_minimized_features_typed.csv" ftype="csv" />
@ -99,32 +95,42 @@
</test>
</tests>
<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).
.. _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">