Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add autoBIGS to IUC Toolshed #6799

Merged
merged 17 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions tools/autobigs/.shed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: autobigs
owner: iuc
description: Automated MLST typing from PubMLST and InstitutPasteur.
homepage_url: https://github.com/Syph-and-VPD-Lab/autoBIGS.cli
long_description: |
A program that allows quickly batched requests for obtaining MLST
profiles on multiple FASTA sequences and exporting it as a convenient
CSV. Capable of querying a variety of MLST databases from both
Institut Pasteur and PubMLST.
remote_repository_url: https://github.com/Syph-and-VPD-Lab/autoBIGS.cli
categories:
- Sequence Analysis
152 changes: 152 additions & 0 deletions tools/autobigs/autobigs-cli.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
<tool id="autobigs-cli" name="autoBIGS.cli" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05">
<description>Automated MLST typing</description>
<macros>
<token name="@TOOL_VERSION@">0.5.0</token>
<token name="@VERSION_SUFFIX@">0</token>
<import>macros.xml</import>
<expand macro="bio_tools"/>
</macros>

<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 '$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. See help for getting such names."/>
</repeat>
</when>
<when value="databases">

</when>
</conditional>
</when>
<when value="st">
<param name="fasta" label="FASTA file" type="data" format="fasta" 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" />
<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" />
</test>
<test expect_num_outputs="1">
<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>
</test>
<test expect_num_outputs="1">
<param name="operation" value="info" />
<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>
</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.

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.

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.

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.

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.

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.

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.


.. _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,
title = {Syph-and-VPD-Lab/autoBIGS.cli},
url = {https://github.com/Syph-and-VPD-Lab/autoBIGS.cli},
author = {Deng, Harrison},
date = {2025-01-24},
year = {2025},
month = {1},
day = {24},
}
</citation>
</citations>
</tool>
7 changes: 7 additions & 0 deletions tools/autobigs/macros.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<macros>
<xml name="bio_tools">
<xrefs>
<xref type="bio.tools">AutoBIGS.CLI</xref>
</xrefs>
</xml>
</macros>
Loading