Initial work on wrapping AutoBIGS for Galaxy
This commit is contained in:
commit
b3057a833c
22
.devcontainer/devcontainer.json
Normal file
22
.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,22 @@
|
||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
||||
// README at: https://github.com/devcontainers/templates/tree/main/src/python
|
||||
{
|
||||
"name": "Python 3",
|
||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
||||
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye",
|
||||
|
||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||
// "features": {},
|
||||
|
||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
// "forwardPorts": [],
|
||||
|
||||
// Use 'postCreateCommand' to run commands after the container is created.
|
||||
"postCreateCommand": "pip3 install --user -r requirements.txt"
|
||||
|
||||
// Configure tool-specific properties.
|
||||
// "customizations": {},
|
||||
|
||||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
||||
// "remoteUser": "root"
|
||||
}
|
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
autobigs-cli_test_report.html
|
||||
galaxy-server
|
8
.vscode/extensions.json
vendored
Normal file
8
.vscode/extensions.json
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"davelopez.galaxy-tools",
|
||||
"mechatroner.rainbow-csv",
|
||||
"redhat.vscode-xml",
|
||||
"ms-vscode.live-server"
|
||||
]
|
||||
}
|
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"galaxyTools.planemo.galaxyRoot": "galaxy-server"
|
||||
}
|
13
.vscode/tasks.json
vendored
Normal file
13
.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
||||
// for the documentation about the tasks.json format
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "lint",
|
||||
"type": "shell",
|
||||
"command": "planemo lint",
|
||||
"problemMatcher": []
|
||||
}
|
||||
]
|
||||
}
|
107
autobigs-cli.xml
Normal file
107
autobigs-cli.xml
Normal file
@ -0,0 +1,107 @@
|
||||
<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.4.2</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>
|
||||
|
||||
<command detect_errors="exit_code"><![CDATA[
|
||||
#if $operation == "info":
|
||||
#if $retrieved == "schema":
|
||||
autoBIGS info $selected_schema
|
||||
#else if $retrieved == "databases":
|
||||
autoBIGS info --retrieve-bigsdbs
|
||||
#end if
|
||||
#else if $operation == "st":
|
||||
autoBIGS st $fastas $seqdefdb $schema $mlst_profiles_output
|
||||
#end if
|
||||
]]></command>
|
||||
<inputs>
|
||||
<conditional name="mode">
|
||||
<param name="operation" label="Operation" type="select">
|
||||
<option value="info"/>
|
||||
<option value="st"/>
|
||||
</param>
|
||||
<when value="info">
|
||||
<conditional name="select-info">
|
||||
<param name="retrieved" label="Schema or Database List" type="select">
|
||||
<option value="schema"/>
|
||||
<option value="databases"/>
|
||||
</param>
|
||||
<when value="schema">
|
||||
<param name="selected_schema" argument="--retrieve-bigsdb-schemas" label="Retrieve schemas for" type="integer" min="0"/>
|
||||
</when>
|
||||
<when value="databases">
|
||||
<!-- No need to do anything -->
|
||||
</when>
|
||||
</conditional>
|
||||
</when>
|
||||
<when value="st">
|
||||
<param name="fastas" label="FASTA files" type="data" format="fasta,fas,fa,fna,ffn,faa,mpfa,frn"/>
|
||||
<param name="seqdefdb" label="BIGSdb SeqDef Name" type="text"/>
|
||||
<param name="schema" label="BIGSdb SeqDef Schema ID" type="integer" min="0"/>
|
||||
</when>
|
||||
</conditional>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="mlst_profiles_output" label="${tool.name} on ${on_string}" format="csv" />
|
||||
</outputs>
|
||||
<tests>
|
||||
<test>
|
||||
<param name="operation" value="st" />
|
||||
<param name="fastas" value="tohama_I_bpertussis.fasta" />
|
||||
<param name="seqdefdb" value="pubmlst_bordetella_seqdef" />
|
||||
<param name="schema" value="3" />
|
||||
<output name="mlst_profiles_output" file="results.csv" ftype="csv" />
|
||||
</test>
|
||||
</tests>
|
||||
<help><![CDATA[
|
||||
|
||||
usage: autoBIGS info [-h] [--retrieve-bigsdbs] [--retrieve-bigsdb-schemas LIST_BIGSDB_SCHEMAS [LIST_BIGSDB_SCHEMAS ...]]
|
||||
|
||||
Fetches the latest BIGSdb MLST database definitions.
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
--retrieve-bigsdbs Lists all known BIGSdb MLST databases (fetched from known APIs and cached).
|
||||
--retrieve-bigsdb-schemas SCHEMA_IDS
|
||||
Lists the known schema IDs for a given BIGSdb sequence definition database name. The name, and then the ID of the schema is given.
|
||||
|
||||
usage: autoBIGS st [-h] [--exact] [--stop-on-fail] fastas [fastas ...] seqdefdb schema out
|
||||
|
||||
Returns MLST exact profile matches.
|
||||
|
||||
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).
|
||||
|
||||
options:
|
||||
-h, --help show this help message and exit
|
||||
--exact, -ex Should run exact matching rather than returning all similar ones
|
||||
--stop-on-fail, -sof Should the algorithm stop in the case there are no matches (or partial matches when
|
||||
expecting exact matches).
|
||||
|
||||
|
||||
]]></help>
|
||||
<citations>
|
||||
<citation type="bibtex">
|
||||
@book{Deng2025RealYHD,
|
||||
title = {RealYHD/autoBIGS.cli},
|
||||
url = {https://github.com/RealYHD/autoBIGS.cli},
|
||||
author = {Deng, Harrison},
|
||||
date = {2025-01-24},
|
||||
year = {2025},
|
||||
month = {1},
|
||||
day = {24},
|
||||
}
|
||||
</citation>
|
||||
</citations>
|
||||
</tool>
|
7
autobigs-cli_macros.xml
Normal file
7
autobigs-cli_macros.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<macros>
|
||||
<xml name="bio_tools">
|
||||
<xrefs>
|
||||
<xref type="bio.tools">AutoBIGS.CLI</xref>
|
||||
</xrefs>
|
||||
</xml>
|
||||
</macros>
|
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@ -0,0 +1 @@
|
||||
planemo
|
2
test-data/results.csv
Normal file
2
test-data/results.csv
Normal file
@ -0,0 +1,2 @@
|
||||
id,st,clonal-complex,tyrB,icd,pepA,adk,pgm,fumC,glyA
|
||||
BX470248.1,1,ST-2 complex,1,1,1,1,1,1,1
|
|
58377
test-data/tohama_I_bpertussis.fasta
Normal file
58377
test-data/tohama_I_bpertussis.fasta
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user