Compare commits

...

26 Commits

Author SHA1 Message Date
3836c84abd Added Galaxy repo as a submodule
Some checks failed
autoBIGS.galaxy/pipeline/head There was a failure building this commit
2025-03-06 09:43:26 -06:00
bb26222ddd Added personal development channel to planemo serve and lint VSCode tasks
Some checks failed
autoBIGS.galaxy/pipeline/head There was a failure building this commit
2025-02-27 21:12:24 +00:00
a622c5c52c Moved actual tool definition to submodule
Some checks failed
autoBIGS.galaxy/pipeline/head There was a failure building this commit
2025-02-26 21:08:12 +00:00
61f44f8338 Add auto-updated-tools-iuc repo
Some checks failed
autoBIGS.galaxy/pipeline/head There was a failure building this commit
2025-02-25 23:09:27 +00:00
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
3320b6fc43 Updated test to use minimized genome set
Some checks failed
autoBIGS.galaxy/pipeline/head There was a failure building this commit
2025-02-24 21:35:54 +00:00
26f95c66a2 Updated shed file and added README
Some checks failed
autoBIGS.galaxy/pipeline/head There was a failure building this commit
shedfile now passes planemo linting
2025-02-24 20:16:15 +00:00
cd033e99e5 Changed devcontainer
Some checks failed
autoBIGS.galaxy/pipeline/head There was a failure building this commit
2025-02-24 17:52:21 +00:00
0e5c323070 Changed to miniforge environment
Some checks failed
autoBIGS.galaxy/pipeline/head There was a failure building this commit
2025-02-24 17:24:15 +00:00
bb1a7dfe38 Changed all commands to be run by the galaxy user
Some checks failed
autoBIGS.galaxy/pipeline/head There was a failure building this commit
2025-02-24 15:28:31 +00:00
40f49a48ac Updated test_results folder ownership
Some checks reported errors
autoBIGS.galaxy/pipeline/head Something is wrong with the build of this commit
2025-02-24 15:12:24 +00:00
dac4d5a620 Fixed output mixup
Some checks are pending
autoBIGS.galaxy/pipeline/head Build queued...
2025-02-24 15:10:02 +00:00
c02b726745 Attempting to add 3rd test for scheme retrieval
Some checks reported errors
autoBIGS.galaxy/pipeline/head Something is wrong with the build of this commit
2025-02-24 14:19:23 +00:00
d2dfbb9464 generate and run planemo testing on separate user
Some checks reported errors
autoBIGS.galaxy/pipeline/head Something is wrong with the build of this commit
2025-02-22 16:45:33 +00:00
72f7af1879 Renamed schemes output label 2025-02-22 16:45:15 +00:00
aaeb02853e Switched back to normal pip container
Some checks failed
autoBIGS.galaxy/pipeline/head There was a failure building this commit
2025-02-21 22:18:47 +00:00
5042d0d5fa Separated information CSV output 2025-02-21 22:18:13 +00:00
52bd3ac07d Added a second test
Some checks are pending
autoBIGS.galaxy/pipeline/head Build queued...
2025-02-21 22:14:07 +00:00
7c0d209470 Updated kubernetes agent configuration
Some checks failed
autoBIGS.galaxy/pipeline/head There was a failure building this commit
2025-02-21 19:04:32 +00:00
bca38d5838 Began Jenkinsfile pipeline writing
Some checks failed
autoBIGS.galaxy/pipeline/head There was a failure building this commit
2025-02-21 18:31:34 +00:00
8cb0e17ed3 Updated autobigs-cli wrapper to 0.5.0 2025-02-21 17:14:34 +00:00
cac100d0ac .gitignore updated 2025-02-18 21:29:50 +00:00
fe43e93576 Added CSV output filtering 2025-02-18 21:26:56 +00:00
17 changed files with 100 additions and 58498 deletions

16
.devcontainer/Dockerfile Normal file
View 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>

View File

@@ -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
View 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
View File

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

6
.gitmodules vendored Normal file
View 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
View File

View File

@@ -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
View File

@@ -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
View 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
View 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

View File

@@ -1,107 +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.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>

View File

@@ -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
View File

@@ -0,0 +1,7 @@
name: base
channels:
- bioconda
- conda-forge
dependencies:
- python==3.12
- planemo

1
galaxy Submodule

Submodule galaxy added at d416517709

View File

@@ -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
1 id st clonal-complex tyrB icd pepA adk pgm fumC glyA
2 BX470248.1 1 ST-2 complex 1 1 1 1 1 1 1

File diff suppressed because it is too large Load Diff