Skip to content

Commit

Permalink
Merge pull request #268 from phac-nml/sistr
Browse files Browse the repository at this point in the history
Sistr v1.1.3 new Galaxy wrapper release
  • Loading branch information
apetkau authored Dec 20, 2024
2 parents f574c20 + c30cd28 commit 4a9d0e7
Show file tree
Hide file tree
Showing 17 changed files with 84 additions and 879 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
# which are needed in subsequent steps.
setup:
name: Setup cache and determine changed repositories
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
outputs:
galaxy-head-sha: ${{ steps.get-galaxy-sha.outputs.galaxy-head-sha }}
repository-list: ${{ steps.discover.outputs.repository-list }}
Expand Down Expand Up @@ -108,7 +108,7 @@ jobs:
name: Lint tool-list
needs: setup
if: ${{ needs.setup.outputs.repository-list != '' || needs.setup.outputs.tool-list != '' }}
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
name: Lint Python scripts
needs: setup
if: ${{ github.event_name == 'pull_request' && needs.setup.outputs.repository-list != '' }}
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -245,7 +245,7 @@ jobs:
name: Check file sizes
needs: setup
if: ${{ github.event_name == 'pull_request' && needs.setup.outputs.repository-list != '' }}
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -274,7 +274,7 @@ jobs:
name: Test tools
needs: setup
if: ${{ needs.setup.outputs.repository-list != '' }}
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -340,7 +340,7 @@ jobs:
name: Combine chunked test results
needs: [setup, test]
if: ${{ always() && needs.setup.outputs.repository-list != '' }}
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.7']
Expand Down Expand Up @@ -384,7 +384,7 @@ jobs:
name: Deploy
needs: [setup, lint, combine_outputs]
if: ${{ (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' ) && github.repository_owner == 'phac-nml' }}
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ['3.7']
Expand Down Expand Up @@ -421,7 +421,7 @@ jobs:
name: Report deploy status
needs: [deploy]
if: ${{ always() && needs.deploy.result != 'success' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' ) && github.repository_owner == 'phac-nml' }}
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
# report to the PR if deployment failed
- name: Get PR object
Expand All @@ -443,7 +443,7 @@ jobs:
name: Check workflow success
needs: [setup, lint, flake8, lintr, file_sizes, combine_outputs]
if: ${{ always() && github.ref != 'refs/heads/master' && github.ref != 'refs/heads/main' }}
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Check tool lint status
if: ${{ needs.lint.result != 'success' && needs.flake8.result != 'skipped' }}
Expand Down
2 changes: 2 additions & 0 deletions tools/sistr_cmd/.shed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ categories: ["Sequence Analysis"]
description: SISTR in silico serotyping tool
name: sistr_cmd
owner: nml
long_description: Salmonella In Silico Typing Resource (SISTR) command-line tool for serovar prediction
remote_repository_url: https://github.com/phac-nml/sistr_cmd
homepage_url: https://github.com/phac-nml/sistr_cmd
81 changes: 56 additions & 25 deletions tools/sistr_cmd/sistr_cmd.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
<tool id="sistr_cmd" name="sistr_cmd" version="@VERSION@+galaxy1">
<tool id="sistr_cmd" name="sistr_cmd" version="@VERSION@+galaxy0">
<description>
Salmonella In Silico Typing Resource commandline tool for serovar prediction
Salmonella In Silico Typing Resource command-line tool for serovar prediction
</description>
<macros>
<token name="@VERSION@">1.1.1</token>
<token name="@VERSION@">1.1.3</token>
</macros>
<xrefs>
<xref type="bio.tools">SISTR</xref>
</xrefs>
<requirements>
<requirement type="package" version="@VERSION@">sistr_cmd</requirement>
</requirements>
<stdio>
<exit_code range="1:" />
</stdio>
<command><![CDATA[
sistr
#for $fasta in $input_fastas
-i '$fasta' '${$fasta.element_identifier.replace("." + $fasta.ext, "")}'
Expand All @@ -25,6 +29,11 @@
$no_cgmlst
$run_mash
$qc
#if $serovar_list.selection_mode == "default"
--list-of-serovars
#elif $serovar_list.selection_mode == "custom"
--list-of-serovars $serovar_list.custom_list_of_serovars_file
#end if
--threads "\${GALAXY_SLOTS:-1}"
-T "\${TMPDIR:-/tmp}"
$keep_tmp
Expand Down Expand Up @@ -86,7 +95,21 @@
truevalue="--qc"
falsevalue=""
label="Basic QC of results"
/>
/>
<conditional name="serovar_list">
<param label="Check predicted SISTR serovar against the list of serovars?" name="selection_mode" type="select">
<option value="none">Not selected</option>
<option selected="true" value="default">Use the default list</option>
<option value="custom">Use a custom list</option>
</param>
<when value="none"/>
<when value="default"/>
<when value="custom">
<param name="custom_list_of_serovars_file" type="data" format="text" optional="true" label="Custom list of serovars (optional)"
help="if no file selected, the default one is used available at https://raw.githubusercontent.com/phac-nml/sistr_cmd/v1.1.3/sistr/data/serovar-list.txt"
/>
</when>
</conditional>
<param
name="more_output"
type="select"
Expand Down Expand Up @@ -131,63 +154,64 @@
<data
name="output_prediction_csv"
format="csv"
label="SISTR Results"
label="${tool.name} on ${input_fastas[0].element_identifier}: Main Report (csv)"
from_work_dir="sistr-report.csv">
<filter>output_format == "csv"</filter>
</data>
<data
name="output_prediction_json"
format="json"
label="SISTR Results"
label="${tool.name} on ${input_fastas[0].element_identifier}: Main Report (json)"
from_work_dir="sistr-report.json">
<filter>output_format == "json"</filter>
</data>
<data
name="output_prediction_tab"
format="tabular"
label="SISTR Results"
label="${tool.name} on ${input_fastas[0].element_identifier}: Main Report (tab)"
from_work_dir="sistr-report.tab">
<filter>output_format == "tab"</filter>
</data>
<data
name="cgmlst_profiles"
format="csv"
label="cgMLST results" />
label="${tool.name} on ${input_fastas[0].element_identifier}: cgMLST allele match results (csv)" />
<data
name="novel_alleles"
format="fasta"
label="Novel cgMLST alleles" />
label="${tool.name} on ${input_fastas[0].element_identifier}: Novel cgMLST alleles (fasta)" />
<data
name="alleles_output"
format="json"
label="cgMLST allele match results" />
label="${tool.name} on ${input_fastas[0].element_identifier}: cgMLST allele match results (json)" />
</outputs>
<tests>
<test>
<test expect_num_outputs="4">
<param name="input_fastas" value="AE014613-699860.fasta" ftype="fasta"/>
<param name="output_format" value="tab"/>
<param name="selection_mode" value="none"/>
<output
name="cgmlst_profiles"
value="cgmlst-profiles.csv"
value="cgmlst-profiles-AE014613.csv"
ftype="csv"
compare="diff">
</output>
<output name="output_prediction_tab"
ftype="tabular"
value="sistr-results.tabular"
compare="sim_size">
value="sistr-results-AE014613-699860.tabular"
compare="sim_size">
<assert_contents>
<has_text text="AE014613-699860" />
<has_text text="Typhi" />
<has_text text="enterica" />
<has_text_matching expression="FAIL\t-\t-:-:-\t-:-:-"/>
<has_text text="2014-LET-0419"/>
<has_n_columns n="22" />
<has_n_columns n="23" />
</assert_contents>
</output>
<output
name="alleles_output"
value="alleles-output.json"
value="alleles-output-AE014613.json"
ftype="json"
compare="sim_size">
<assert_contents>
Expand All @@ -198,8 +222,8 @@
</assert_contents>
</output>
</test>
<test>
<param name="input_fastas" value="13-1101-Paratyphi_B.fasta" ftype="fasta"/>
<test expect_num_outputs="4">
<param name="input_fastas" value="13-1101-Paratyphi_B_varJava.fasta" ftype="fasta"/>
<param name="output_format" value="tab"/>
<output
name="novel_alleles"
Expand All @@ -222,8 +246,10 @@
<has_text text="Paratyphi B var. Java"/>
<has_text text="enterica"/>
<has_text text="1,4,[5],12"/>
<has_text text="PASS"/>
<has_n_columns n="22"/>
<has_text text="1,4,[5],12:b:1,2"/>
<has_text text="FAIL"/>
<has_text text="Y"/>
<has_n_columns n="24"/>
</assert_contents>
</output>
<output
Expand Down Expand Up @@ -255,13 +281,13 @@ Usage::
Serovar predictions from whole-genome sequence assemblies by determination of antigen gene and cgMLST gene alleles using BLAST.
Note about using the "--use-full-cgmlst-db" flag:
The "centroid" allele database is ~10% the size of the full set so analysis is much quicker with the "centroid" vs "full" set of alleles. Results between 2 cgMLST allele sets should not differ.
The "centroid" allele database is ~10% the size of the full set so analysis is much quicker with the "centroid" vs "full" set of alleles.
Results between 2 cgMLST allele sets should not differ.
If you find this program useful in your research, please cite as:
The Salmonella In Silico Typing Resource (SISTR): an open web-accessible tool for rapidly typing and subtyping draft Salmonella genome assemblies.
Catherine Yoshida, Peter Kruczkiewicz, Chad R. Laing, Erika J. Lingohr, Victor P.J. Gannon, John H.E. Nash, Eduardo N. Taboada.
PLoS ONE 11(1): e0147101. doi: 10.1371/journal.pone.0147101
The Salmonella In Silico Typing Resource (SISTR): an open web-accessible tool for rapidly typing and subtyping draft Salmonella genome assemblies.
Catherine Yoshida, Peter Kruczkiewicz, Chad R. Laing, Erika J. Lingohr, Victor P.J. Gannon, John H.E. Nash, Eduardo N. Taboada.
PLoS ONE 11(1): e0147101. doi: 10.1371/journal.pone.0147101
positional arguments:
F Input genome FASTA file
Expand Down Expand Up @@ -300,6 +326,11 @@ Usage::
serovar prediction results.
-t THREADS, --threads THREADS
Number of parallel threads to run sistr_cmd analysis.
-l [LIST_OF_SEROVARS], --list-of-serovars [LIST_OF_SEROVARS]
A path to a single column text file containing list of
serovars to check SISTR serovar prediction against.
Result reported in the "predicted_serovar_in_list"
field as Y (present) or N (absent) value.
-v, --verbose Logging verbosity level (-v == show warnings; -vvv ==
show debug info)
-V, --version show program's version number and exit
Expand Down
Loading

0 comments on commit 4a9d0e7

Please sign in to comment.