Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
d2dfbb9464 | |||
72f7af1879 | |||
aaeb02853e | |||
5042d0d5fa | |||
52bd3ac07d | |||
7c0d209470 | |||
bca38d5838 | |||
8cb0e17ed3 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,2 @@
|
||||
autobigs-cli_test_report.html
|
||||
galaxy-server/**
|
||||
test_results
|
||||
|
0
.planemo.yml
Normal file
0
.planemo.yml
Normal file
1
.vscode/extensions.json
vendored
1
.vscode/extensions.json
vendored
@ -1,6 +1,5 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"davelopez.galaxy-tools",
|
||||
"mechatroner.rainbow-csv",
|
||||
"redhat.vscode-xml",
|
||||
"ms-vscode.live-server"
|
||||
|
12
.vscode/tasks.json
vendored
12
.vscode/tasks.json
vendored
@ -8,6 +8,18 @@
|
||||
"type": "shell",
|
||||
"command": "planemo lint",
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "serve",
|
||||
"type": "shell",
|
||||
"command": "planemo serve",
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "run tests",
|
||||
"type": "shell",
|
||||
"command": "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",
|
||||
"problemMatcher": []
|
||||
}
|
||||
]
|
||||
}
|
33
Jenkinsfile
vendored
Normal file
33
Jenkinsfile
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
pipeline {
|
||||
agent {
|
||||
kubernetes {
|
||||
cloud 'rsys-devel'
|
||||
defaultContainer 'pip'
|
||||
inheritFrom 'pip'
|
||||
}
|
||||
}
|
||||
|
||||
stages {
|
||||
stage ("install") {
|
||||
steps {
|
||||
sh 'useradd galaxy -m'
|
||||
sh 'apt update'
|
||||
sh 'apt install sudo -y'
|
||||
sh 'pip install -r requirements.txt'
|
||||
sh 'pip install standard-imghdr'
|
||||
}
|
||||
}
|
||||
stage ("lint") {
|
||||
steps {
|
||||
sh "planemo lint autobigs-cli.xml"
|
||||
}
|
||||
}
|
||||
stage ("test") {
|
||||
steps {
|
||||
sh 'mkdir test_results'
|
||||
sh "sudo -u galaxy 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)]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
<tool id="autobigs-cli" name="AutoBIGS.CLI" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05">
|
||||
<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="@TOOL_VERSION@">0.5.0</token>
|
||||
<token name="@VERSION_SUFFIX@">0</token>
|
||||
<import>autobigs-cli_macros.xml</import>
|
||||
<expand macro="bio_tools"/>
|
||||
@ -12,57 +12,74 @@
|
||||
</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
|
||||
#if $mode['operation'] == "info":
|
||||
#if $select_info['retrieved'] == "schemas":
|
||||
autoBIGS info $selected_schema --csv $info_db_out
|
||||
#else if $select_info['retrieved'] == "databases":
|
||||
autoBIGS info --retrieve-bigsdbs --csv $info_schemes_out
|
||||
#end if
|
||||
#else if $operation == "st":
|
||||
autoBIGS st $fastas $seqdefdb $schema $mlst_profiles_output
|
||||
#else if $mode['operation'] == "st":
|
||||
autoBIGS st "$fastas" "$seqdefdb" $schema "$mlst_profiles_output" $stop_on_fail
|
||||
#end if
|
||||
]]></command>
|
||||
<inputs>
|
||||
<conditional name="mode">
|
||||
<param name="operation" label="Operation" type="select">
|
||||
<option value="info"/>
|
||||
<option value="st"/>
|
||||
<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="Schema or Database List" type="select">
|
||||
<option value="schema"/>
|
||||
<option value="databases"/>
|
||||
<conditional name="select_info">
|
||||
<param name="retrieved" label="Schemas or Database List" type="select">
|
||||
<option value="schemes">Available Schemas for Database</option>
|
||||
<option value="databases">Available Databases</option>
|
||||
</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"/>
|
||||
<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"/>
|
||||
</repeat>
|
||||
</when>
|
||||
<when value="databases">
|
||||
<!-- No need to do anything -->
|
||||
</when>
|
||||
<when value="databases">
|
||||
|
||||
</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="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"/>
|
||||
</when>
|
||||
</conditional>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data name="mlst_profiles_output" label="${tool.name} on ${on_string}" format="csv">
|
||||
<filter>mode == "st"</filter>
|
||||
<filter>mode['operation'] == "st"</filter>
|
||||
</data>
|
||||
<data name="info_db_out" label="${tool.name} supported Databases" format="csv">
|
||||
<filter>mode['operation'] == "info" and select_info['retrieved'] == 'databases'</filter>
|
||||
</data>
|
||||
<data name="info_schemes_out" label="${tool.name} supported Schemes" format="csv">
|
||||
<filter>mode['operation'] == "info" and select_info['retrieved'] == 'schemes'</filter>
|
||||
</data>
|
||||
</outputs>
|
||||
<tests>
|
||||
<test>
|
||||
<test expect_num_outputs="1">
|
||||
<param name="operation" value="st" />
|
||||
<param name="fastas" value="tohama_I_bpertussis.fasta" />
|
||||
<param name="fastas" value="tohama_I_bpertussis_wgs.fasta" />
|
||||
<param name="seqdefdb" value="pubmlst_bordetella_seqdef" />
|
||||
<param name="schema" value="3" />
|
||||
<output name="mlst_profiles_output" file="results.csv" ftype="csv" />
|
||||
<output name="mlst_profiles_output" file="tohama_I_bpertussis_wgs_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>
|
||||
</tests>
|
||||
<help><![CDATA[
|
||||
@ -89,7 +106,6 @@ positional arguments:
|
||||
|
||||
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).
|
||||
|
||||
@ -98,8 +114,8 @@ options:
|
||||
<citations>
|
||||
<citation type="bibtex">
|
||||
@book{Deng2025RealYHD,
|
||||
title = {RealYHD/autoBIGS.cli},
|
||||
url = {https://github.com/RealYHD/autoBIGS.cli},
|
||||
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},
|
||||
|
146
test-data/databases-2025-02-21.csv
Normal file
146
test-data/databases-2025-02-21.csv
Normal file
@ -0,0 +1,146 @@
|
||||
BIGSdb Names,Source
|
||||
pubmlst_aactinomycetemcomitans_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_abaumannii_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_achromobacter_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_aeromonas_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_afumigatus_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_aparagallinarum_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_aphagocytophilum_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_arcobacter_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_bbacilliformis_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_bcc_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_bcereus_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_bfragilis_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_bhenselae_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_blastocystis_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_blicheniformis_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_bmallei_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_bordetella_seqdef,https://bigsdb.pasteur.fr/api
|
||||
pubmlst_borrelia_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_bpseudomallei_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_brachyspira_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_brucella_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_bsubtilis_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_bwashoensis_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_calbicans_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_campylobacter_nonjejuni_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_campylobacter_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_cbotulinum_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_cchauvoei_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_cdifficile_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_cfreundii_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_cglabrata_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_chlamydiales_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_ckrusei_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_cmaltaromaticum_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_cperfringens_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_cronobacter_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_csepticum_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_csinensis_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_ctropicalis_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_diphtheria_seqdef,https://bigsdb.pasteur.fr/api
|
||||
pubmlst_dnodosus_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_ecloacae_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_edwardsiella_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_efaecalis_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_efaecium_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_escherichia_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_fpsychrophilum_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_gallibacterium_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_geotrichum_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_hcinaedi_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_helicobacter_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_hinfluenzae_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_hparasuis_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_hsuis_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_kaerogenes_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_klebsiella_seqdef,https://bigsdb.pasteur.fr/api
|
||||
pubmlst_koxytoca_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_kseptempunctata_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_leptospira_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_lgarvieae_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_liberibacter_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_listeria_seqdef,https://bigsdb.pasteur.fr/api
|
||||
pubmlst_llactis_phage_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_lsalivarius_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_mabscessus_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_magalactiae_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_manserisalpingitidis_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_mbovis_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_mcanis_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_mcaseolyticus_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_mflocculare_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_mgallisepticum_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_mgenitalium_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_mhaemolytica_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_mhominis_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_mhyopneumoniae_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_mhyorhinis_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_mhyosynoviae_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_miowae_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_mplutonius_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_mpneumoniae_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_msciuri_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_msynoviae_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_mycobacteria_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_neisseria_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_oralstrep_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_orhinotracheale_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_otsutsugamushi_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_pacnes_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_paeruginosa_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_pdamselae_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_pfluorescens_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_pgingivalis_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_plarvae_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_plasmid_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_pmultocida_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_ppentosaceus_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_pputida_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_proteus_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_psalmonis_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_ranatipestifer_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_rhodococcus_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_rmlst_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_sagalactiae_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_salmonella_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_saureus_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_sbsec_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_scanis_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_schromogenes_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_sdysgalactiae_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_sepidermidis_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_serratia_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_sgallolyticus_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_shaemolyticus_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_shewanella_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_shominis_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_siniae_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_sinorhizobium_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_smaltophilia_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_smitis_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_sparasitica_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_spneumoniae_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_spseudintermedius_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_spyogenes_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_ssuis_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_sthermophilus_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_streptomyces_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_suberis_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_szooepidemicus_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_taylorella_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_tenacibaculum_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_test_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_tpallidum_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_tvaginalis_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_ureaplasma_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_vcholerae_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_vibrio_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_vparahaemolyticus_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_vtapetis_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_vvulnificus_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_wolbachia_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_xcitri_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_xfastidiosa_seqdef,https://rest.pubmlst.org
|
||||
pubmlst_yersinia_seqdef,https://bigsdb.pasteur.fr/api
|
||||
pubmlst_yruckeri_seqdef,https://rest.pubmlst.org
|
|
@ -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
|
|
11
test-data/schemas-2025-02-21.csv
Normal file
11
test-data/schemas-2025-02-21.csv
Normal file
@ -0,0 +1,11 @@
|
||||
Name,ID
|
||||
Autotransporters,11
|
||||
Bp_vaccine antigens,7
|
||||
MLST,3
|
||||
Other toxins,9
|
||||
PRN-test-Bp,5
|
||||
Phase,8
|
||||
T3SS,10
|
||||
cgMLST_genus,1
|
||||
cgMLST_pertussis,4
|
||||
macrolide resistance,6
|
|
2
test-data/tohama_I_bpertussis_wgs_typed.csv
Normal file
2
test-data/tohama_I_bpertussis_wgs_typed.csv
Normal file
@ -0,0 +1,2 @@
|
||||
id,st,clonal-complex,adk,fumC,glyA,icd,pepA,pgm,tyrB
|
||||
BX470248.1,1,ST-2 complex,1,1,1,1,1,1,1
|
|
Loading…
x
Reference in New Issue
Block a user