Compare commits
24 Commits
cac100d0ac
...
main
Author | SHA1 | Date | |
---|---|---|---|
3836c84abd | |||
bb26222ddd | |||
a622c5c52c | |||
61f44f8338 | |||
411a169079 | |||
6a3e692d82 | |||
dcf28c8051 | |||
ddb98514fb | |||
3320b6fc43 | |||
26f95c66a2 | |||
cd033e99e5 | |||
0e5c323070 | |||
bb1a7dfe38 | |||
40f49a48ac | |||
dac4d5a620 | |||
c02b726745 | |||
d2dfbb9464 | |||
72f7af1879 | |||
aaeb02853e | |||
5042d0d5fa | |||
52bd3ac07d | |||
7c0d209470 | |||
bca38d5838 | |||
8cb0e17ed3 |
16
.devcontainer/Dockerfile
Normal file
16
.devcontainer/Dockerfile
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
FROM mcr.microsoft.com/devcontainers/miniconda:1-3
|
||||||
|
|
||||||
|
# Copy environment.yml (if found) to a temp location so we update the environment. Also
|
||||||
|
# copy "noop.txt" so the COPY instruction does not fail if no environment.yml exists.
|
||||||
|
COPY environment.yml* .devcontainer/noop.txt /tmp/conda-tmp/
|
||||||
|
RUN if [ -f "/tmp/conda-tmp/environment.yml" ]; then umask 0002 && /opt/conda/bin/conda env update -n base -f /tmp/conda-tmp/environment.yml; fi \
|
||||||
|
&& rm -rf /tmp/conda-tmp
|
||||||
|
|
||||||
|
# [Optional] Uncomment to install a different version of Python than the default
|
||||||
|
# RUN conda install -y python=3.6 \
|
||||||
|
# && pip install --no-cache-dir pipx \
|
||||||
|
# && pipx reinstall-all
|
||||||
|
|
||||||
|
# [Optional] Uncomment this section to install additional OS packages.
|
||||||
|
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
||||||
|
# && apt-get -y install --no-install-recommends <your-package-list-here>
|
@@ -3,7 +3,7 @@
|
|||||||
{
|
{
|
||||||
"name": "Python 3",
|
"name": "Python 3",
|
||||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
// 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",
|
"image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye",
|
||||||
|
|
||||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||||
// "features": {},
|
// "features": {},
|
||||||
|
3
.devcontainer/noop.txt
Normal file
3
.devcontainer/noop.txt
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
This file is copied into the container along with environment.yml* from the
|
||||||
|
parent folder. This is done to prevent the Dockerfile COPY instruction from
|
||||||
|
failing if no environment.yml is found.
|
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
autobigs-cli_test_report.html
|
|
||||||
galaxy-server/**
|
galaxy-server/**
|
||||||
|
test_results
|
||||||
|
autobigs-cli_test_report.html
|
||||||
|
6
.gitmodules
vendored
Normal file
6
.gitmodules
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
[submodule "auto-updated-tools-iuc"]
|
||||||
|
path = auto-updated-tools-iuc
|
||||||
|
url = https://github.com/Syph-and-VPD-Lab/auto-updated-tools-iuc.git
|
||||||
|
[submodule "galaxy"]
|
||||||
|
path = galaxy
|
||||||
|
url = https://github.com/galaxyproject/galaxy.git
|
0
.planemo.yml
Normal file
0
.planemo.yml
Normal file
4
.vscode/extensions.json
vendored
4
.vscode/extensions.json
vendored
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"recommendations": [
|
"recommendations": [
|
||||||
"davelopez.galaxy-tools",
|
|
||||||
"mechatroner.rainbow-csv",
|
"mechatroner.rainbow-csv",
|
||||||
"redhat.vscode-xml",
|
"redhat.vscode-xml",
|
||||||
"ms-vscode.live-server"
|
"ms-vscode.live-server",
|
||||||
|
"davelopez.galaxy-tools"
|
||||||
]
|
]
|
||||||
}
|
}
|
14
.vscode/tasks.json
vendored
14
.vscode/tasks.json
vendored
@@ -6,7 +6,19 @@
|
|||||||
{
|
{
|
||||||
"label": "lint",
|
"label": "lint",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "planemo lint",
|
"command": "planemo lint auto-updated-tools-iuc/tools/autobigs",
|
||||||
|
"problemMatcher": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "serve",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "planemo serve auto-updated-tools-iuc/tools/autobigs --conda_channels https://git.reslate.systems/api/packages/ydeng/conda,bioconda,conda-forge",
|
||||||
|
"problemMatcher": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "run tests",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "planemo test auto-updated-tools-iuc/tools/autobigs/autobigs-cli.xml --test_output_junit test_results/junit_results.xml --test_output_json test_results/results.json --test_output test_results/human.html --conda_channels https://git.reslate.systems/api/packages/ydeng/conda,bioconda,conda-forge",
|
||||||
"problemMatcher": []
|
"problemMatcher": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
31
Jenkinsfile
vendored
Normal file
31
Jenkinsfile
vendored
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
kubernetes {
|
||||||
|
cloud 'rsys-devel'
|
||||||
|
defaultContainer 'pip'
|
||||||
|
inheritFrom 'pip'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage ("install") {
|
||||||
|
steps {
|
||||||
|
sh 'pip install -r requirements.txt'
|
||||||
|
sh 'pip install standard-imghdr'
|
||||||
|
sh 'planemo ci_setup'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage ("lint") {
|
||||||
|
steps {
|
||||||
|
sh "planemo lint autobigs-cli.xml"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage ("test") {
|
||||||
|
steps {
|
||||||
|
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)]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
17
README.md
Normal file
17
README.md
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
# autoBIGS.Galaxy
|
||||||
|
|
||||||
|
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. autoBIGS.galaxy is the galaxy frontend implementation of autoBIGS.cli and autoBIGS.engine.
|
||||||
|
|
||||||
|
This Galaxy tool implements [autoBIGS.engine](https://pypi.org/project/autoBIGS.engine) via wrapping the official [autoBIGS.cli](https://github.com/Syph-and-VPD-Lab/autoBIGS.cli) wrapper.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
This CLI is capable of exactly what [autoBIGS.engine](https://pypi.org/project/autoBIGS.engine) is capable of:
|
||||||
|
- Import multiple whole genome FASTA files
|
||||||
|
- Fetch the available BIGSdb databases that is currently live and available
|
||||||
|
- Fetch the available BIGSdb database schemas for a given MLST database
|
||||||
|
- Retrieve exact/non-exact MLST allele variant IDs based off a sequence
|
||||||
|
- Retrieve MLST sequence type IDs based off a sequence
|
||||||
|
- Inexact matches are annotated with an asterisk (\*)
|
||||||
|
- Output all results to a single CSV
|
1
auto-updated-tools-iuc
Submodule
1
auto-updated-tools-iuc
Submodule
Submodule auto-updated-tools-iuc added at c2efa2b703
111
autobigs-cli.xml
111
autobigs-cli.xml
@@ -1,111 +0,0 @@
|
|||||||
<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.3</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">
|
|
||||||
<repeat name="schemas" title="Schemas">
|
|
||||||
<param name="selected_schema" argument="--retrieve-bigsdb-schemas" label="Retrieve schemas for" type="integer" min="0"/>
|
|
||||||
</repeat>
|
|
||||||
</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">
|
|
||||||
<filter>mode == "st"</filter>
|
|
||||||
</data>
|
|
||||||
</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>
|
|
@@ -1,7 +0,0 @@
|
|||||||
<macros>
|
|
||||||
<xml name="bio_tools">
|
|
||||||
<xrefs>
|
|
||||||
<xref type="bio.tools">AutoBIGS.CLI</xref>
|
|
||||||
</xrefs>
|
|
||||||
</xml>
|
|
||||||
</macros>
|
|
7
environment.yml
Normal file
7
environment.yml
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
name: base
|
||||||
|
channels:
|
||||||
|
- bioconda
|
||||||
|
- conda-forge
|
||||||
|
dependencies:
|
||||||
|
- python==3.12
|
||||||
|
- planemo
|
1
galaxy
Submodule
1
galaxy
Submodule
Submodule galaxy added at d416517709
@@ -1,2 +0,0 @@
|
|||||||
id,st,clonal-complex,tyrB,icd,pepA,adk,pgm,fumC,glyA
|
|
||||||
BX470248.1,1,ST-2 complex,1,1,1,1,1,1,1
|
|
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user