Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lint fixes for various tools #107

Closed
wants to merge 16 commits into from
34 changes: 10 additions & 24 deletions tools/abricate/abricate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
<macros>
<import>macros.xml</import>
</macros>
<expand macro='xrefs'/>
<expand macro='edam_ontology'/>
<expand macro="requirements" />
<expand macro="version_command" />

<expand macro="edam_ontology"/>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we fix a linter error we should remove it from the tool's .lint_skip file.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

abcriacte didn't had a lint_skip file imho

<expand macro="xrefs"/>
<expand macro="requirements"/>
<expand macro="version_command"/>
<command detect_errors="exit_code"><![CDATA[
#import re
#set $sample_name = re.sub('[^\w\-_\.]', '_', $file_input.element_identifier)
Expand All @@ -27,9 +26,8 @@
--db=$adv.db
> '$report'
]]></command>

<inputs>
<param name="file_input" type="data" format="fasta,genbank,embl" label="Input file (Fasta, Genbank or EMBL file)" help="To screen for antibiotic resistant genes, can be a fasta file, a genbank file or an EMBL file." />
<param name="file_input" type="data" format="fasta,genbank,embl" label="Input file (Fasta, Genbank or EMBL file)" help="To screen for antibiotic resistant genes, can be a fasta file, a genbank file or an EMBL file."/>
<section name="adv" title="Advanced options" expanded="False">
<param argument="--db" type="select" label="Database to use - default is 'resfinder'" help="Option to switch to other AMR/other database">
<option value="argannot">ARG-ANNOT</option>
Expand All @@ -42,72 +40,61 @@
<option value="megares">megares</option>
<option value="ecoli_vf">Ecoli_VF</option>
</param>
<param name="no_header" argument="--noheader" type="boolean" truevalue="--noheader" falsevalue="" label="Suppress header" help="Suppress output file's column headings" />
<param name="min_dna_id" argument="--minid" type="float" value="80" min="0" max="100" optional="true" label="Minimum DNA %identity" />
<param name="min_cov" argument="--mincov" type="float" value="80" min="0" max="100" optional="true" label="Minimum DNA %coverage" />
<param name="no_header" argument="--noheader" type="boolean" truevalue="--noheader" falsevalue="" label="Suppress header" help="Suppress output file's column headings"/>
<param name="min_dna_id" argument="--minid" type="float" min="0" max="100" value="80" optional="true" label="Minimum DNA %identity"/>
<param name="min_cov" argument="--mincov" type="float" min="0" max="100" value="80" optional="true" label="Minimum DNA %coverage"/>
</section>
</inputs>

<outputs>
<data name="report" format="tabular" label="${tool.name} on ${on_string} report file" />
<data name="report" format="tabular" label="${tool.name} on ${on_string} report file"/>
</outputs>

<tests>
<!-- Basic test 0 - will produce no results. -->
<test>
<param name="file_input" value="Acetobacter.fna"/>
<output name="report" ftype="tabular" file="output_noresults.txt" />
<output name="report" ftype="tabular" file="output_noresults.txt"/>
</test>

<!-- Basic test 1 - will produce results. -->
<test>
<param name="file_input" value="MRSA0252.fna"/>
<output name="report" ftype="tabular" file="output_mrsa.txt" compare="contains"/>
</test>

<!-- Advanced test 2 - No header. -->
<test>
<param name="file_input" value="MRSA0252.fna"/>
<param name="no_header" value="True"/>
<output name="report" ftype="tabular" file="output_noheader.txt" compare="contains"/>
</test>

<!-- Advanced test 3 - Changed DB to card -->
<test>
<param name="file_input" value="MRSA0252.fna"/>
<param name="db" value="card"/>
<output name="report" ftype="tabular" file="output_db-card.txt" compare="contains"/>
</test>

<!-- Advanced test 4 - Changed DB to megares -->
<test>
<param name="file_input" value="MRSA0252.fna"/>
<param name="db" value="megares"/>
<output name="report" ftype="tabular" file="output_db-megares.txt" compare="contains"/>
</test>

<!-- Advanced test 5 - Min DNA ID 100 -->
<test>
<param name="file_input" value="MRSA0252.fna"/>
<param name="min_dna_id" value="100"/>
<output name="report" ftype="tabular" file="output_minid100.txt" compare="contains"/>
</test>

<!-- Advanced test 6 - Min Coverage 100 -->
<test>
<param name="file_input" value="MRSA0252.fna"/>
<param name="min_cov" value="100"/>
<output name="report" ftype="tabular" file="output_mincov100.txt" compare="contains"/>
</test>

<!-- Filetype test 7 - input a gbk -->
<test>
<param name="file_input" value="test.gbk"/>
<output name="report" ftype="tabular" file="output_gbk.txt" compare="contains"/>
</test>

</tests>

<help><![CDATA[
**What it does**

Expand Down Expand Up @@ -156,6 +143,5 @@ ABRicate will produce a tab-seperated output file with the following outputs:
6159.fna NC_017338.1 727191 728356 norA_1 1-1166/1167 =============== 0/0 99.91 92.367 resfinder M97169
6159.fna NC_017339.1 10150 10995 blaZ_32 1-846/846 =============== 0/0 100.00 100.000 resfinder AP004832
]]></help>

<expand macro="citations"/>
</tool>
17 changes: 6 additions & 11 deletions tools/abricate/abricate_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,28 @@
<macros>
<import>macros.xml</import>
</macros>
<expand macro='xrefs'/>
<expand macro='edam_ontology'/>
<expand macro="requirements" />
<expand macro="version_command" />

<expand macro="edam_ontology"/>
<expand macro="xrefs"/>
<expand macro="requirements"/>
<expand macro="version_command"/>
<command detect_errors="exit_code"><![CDATA[
abricate --list > '$report'
]]></command>

<inputs>
<param name="hidden_input" type="hidden" label="This is to please our linter in this expeptional case"/>
bgruening marked this conversation as resolved.
Show resolved Hide resolved
</inputs>

<outputs>
<data name="report" format="txt" label="${tool.name} - list of databases"/>
</outputs>

<tests>
<test>
<output name="report" ftype="txt" file="output_list.txt" compare="contains" />
<output name="report" ftype="txt" file="output_list.txt" compare="contains"/>
</test>
</tests>

<help><![CDATA[
**What it does**

ABRicate List will list all the antibiotic databases used by ABRicate. The database of these genes is built from ResFinder.
]]></help>

<expand macro="citations"/>
</tool>
18 changes: 6 additions & 12 deletions tools/abricate/abricate_summary.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
<macros>
<import>macros.xml</import>
</macros>
<expand macro='xrefs'/>
<expand macro='edam_ontology'/>
<expand macro="requirements" />
<expand macro="version_command" />

<expand macro="edam_ontology"/>
<expand macro="xrefs"/>
<expand macro="requirements"/>
<expand macro="version_command"/>
<command detect_errors="exit_code"><![CDATA[
mkdir reports &&
#import re
Expand All @@ -21,22 +20,18 @@
abricate --summary *
> '$summary'
]]></command>

<inputs>
<param name="abricate_reports" type="data" multiple="true" format="tabular" label="Abricate output reports to summarize"/>
<param name="abricate_reports" type="data" multiple="true" format="tabular" label="Abricate output reports to summarize"/>
</inputs>

<outputs>
<data name="summary" format="tabular"/>
</outputs>

<tests>
<test>
<param name="abricate_reports" value="output_db-card.txt,output_db-megares.txt"/>
<output name="summary" ftype="tabular" file="output_summary.txt" />
<output name="summary" ftype="tabular" file="output_summary.txt"/>
</test>
</tests>

<help><![CDATA[
**What it does**

Expand All @@ -51,6 +46,5 @@ ABRicate can combine results into a simple matrix of gene presence/absence. An a
sample2 24 100.00 . 100.00;100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00;100.00 . 100.00 100.00 100.00;100.00 100.00 100.00 100.00 100.00 100.00 100.00 100.00 . 100.00 . . . 100.00 . . . . . . . . .

]]></help>

<expand macro="citations"/>
</tool>
19 changes: 7 additions & 12 deletions tools/abricate/macros.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@
<xml name="requirements">
<requirements>
<requirement type="package" version="@VERSION@">abricate</requirement>
<yield />
<yield/>
</requirements>
</xml>

<xml name="version_command">
<version_command><![CDATA[abricate --version]]></version_command>
</xml>

<token name="@VERSION@">1.0.1</token>
<token name="@PROFILE@">20.01</token>

<xml name="edam_ontology">
<edam_topics>
<edam_topic>topic_0622</edam_topic>
Expand All @@ -22,23 +19,21 @@
<edam_operation>operation_3482</edam_operation>
</edam_operations>
</xml>

<xml name="xrefs">
<xrefs>
<xref type='bio.tools'>ABRicate</xref>
</xrefs>
<xrefs>
<xref type="bio.tools">ABRicate</xref>
</xrefs>
</xml>

<xml name="citations">
<citations>
<citation type="bibtex">
<citations>
<citation type="bibtex">
@UNPUBLISHED{Seemann2016,
author = {Seemann, Torsten},
title = {ABRicate: mass screening of contigs for antiobiotic resistance genes},
year = {2016},
url = {https://github.com/tseemann/abricate},
}
</citation>
</citations>
</citations>
</xml>
</macros>
Loading
Loading