Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
bernt-matthias committed Sep 4, 2023
1 parent 09f836d commit c67ed43
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 48 deletions.
44 changes: 32 additions & 12 deletions tools/eggnog_mapper/eggnog_macros.xml
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,22 @@ python '${__tool_directory__}/data_manager_eggnog.py' --config_file '$out_file'
#end if
]]></token>

<!-- output options applying to search step -->
<xml name="output_options_macro">
<section name="output_options" expanded="false" title="Output Options">
<param argument="--no_file_comments" type="boolean" truevalue="--no_file_comments" falsevalue="" checked="true"
label="Exclude header lines and stats from output files"/>
<yield/>
</section>
</xml>
<!-- output options applying search and annotate step -->
<xml name="output_options_annotate_macro">
<expand macro="output_options_macro">
<param argument="--report_orthologs" type="boolean" truevalue="--report_orthologs" falsevalue="" checked="false" label="Output a file with the list of orthologs for each hit"/>
<param argument="--md5" type="boolean" truevalue="--md5" falsevalue="" checked="false" label="Add md5 hash of each query to annotations"/>
</expand>
</xml>

<token name="@SEED_ORTHOLOG_COLUMNS@">query_name,seed_eggNOG_ortholog,seed_ortholog_evalue,seed_ortholog_score,query_start,query_end,seed_start,seed_end,pident,query_cov,seed_cov</token>

<xml name="ortho_search_outputs_macro">
Expand All @@ -437,14 +453,25 @@ python '${__tool_directory__}/data_manager_eggnog.py' --config_file '$out_file'
</data>
</xml>

<xml name="seed_orthologs_assertion">
<xml name="seed_orthologs_assertion" token_nocomments="true">
<output name="seed_orthologs" ftype="tabular">
<assert_contents>
<has_line line="#qseqid&#009;sseqid&#009;evalue&#009;bitscore&#009;qstart&#009;qend&#009;sstart&#009;send&#009;pident&#009;qcov&#009;scov"/>
<has_line_matching expression="(\S+\t){2}[-+.e\d]+\t[.\d]+(\t\d+){4}(\t[.\d]+){3}" n="1"/>
<has_line_matching expression="##.*" negate="@NOCOMMENTS@"/>
</assert_contents>
</output>
</xml>

<token name="@HELP_SEARCH_OUTPUTS@"><![CDATA[
**seed orthologs**
each line in the file provides the best match of each query within the best Orthologous Group (OG)
reported in the [project].hmm_hits file, obtained running PHMMER against all sequences within the best OG.
The seed ortholog is used to fetch fine-grained orthology relationships from eggNOG.
If using the diamond search mode, seed orthologs are directly
obtained from the best matching sequences by running DIAMOND against the whole eggNOG protein space.
]]></token>

<!-- macros and tokens for annotate -->

Expand Down Expand Up @@ -522,35 +549,28 @@ python '${__tool_directory__}/data_manager_eggnog.py' --config_file '$out_file'
</data>
</xml>

<xml name="annotations_assertion" token_columns="21" token_add_metadata_columm_names="" token_add_column_names="" token_add_column_re="">
<xml name="annotations_assertion" token_columns="21" token_add_metadata_columm_names="" token_add_column_names="" token_add_column_re="" token_nocomments="true">
<output name="annotations" ftype="tabular">
<metadata name="columns" value="@COLUMNS@" />
<!-- <metadata name="column_names" value="query,seed_ortholog,evalue,score,max_annot_lvl,COG_category,Description,Preferred_name,GOs,EC,KEGG_ko,KEGG_Pathway,KEGG_Module,KEGG_Reaction,KEGG_rclass,BRITE,KEGG_TC,CAZy,BiGG_Reaction,PFAMseggNOG_OGs@ADD_METADATA_COLUMN_NAMES@" /> -->
<assert_contents>
<has_line line="#query&#009;seed_ortholog&#009;evalue&#009;score&#009;eggNOG_OGs&#009;max_annot_lvl&#009;COG_category&#009;Description&#009;Preferred_name&#009;GOs&#009;EC&#009;KEGG_ko&#009;KEGG_Pathway&#009;KEGG_Module&#009;KEGG_Reaction&#009;KEGG_rclass&#009;BRITE&#009;KEGG_TC&#009;CAZy&#009;BiGG_Reaction&#009;PFAMs@ADD_COLUMN_NAMES@"/>
<has_line_matching expression="(\S+\t){2}[-+.e\d]+\t[.\d]+(\t\S+){7}\tko:\S+(\t\S+){9}@ADD_COLUMN_RE@" n="1"/>
<has_line_matching expression="##.*" negate="@NOCOMMENTS@"/>
</assert_contents>
</output>
</xml>
<xml name="annotations_orthologs_assertion">
<xml name="annotations_orthologs_assertion" token_nocomments="true">
<output name="annotations_orthologs" ftype="tabular">
<metadata name="columns" value="4" />
<metadata name="column_names" value="query,orth_type,species,orthologs" />
<assert_contents>
<has_line line="#query&#009;orth_type&#009;species&#009;orthologs"/>
<has_line_matching expression="\S+\t(one2one|many2one|one2many|many2many|seed)(\t[^\t]+){2}" n="2"/>
<has_line_matching expression="##.*" negate="@NOCOMMENTS@"/>
</assert_contents>
</output>
</xml>
<token name="@HELP_SEARCH_OUTPUTS@"><![CDATA[
**seed orthologs**
each line in the file provides the best match of each query within the best Orthologous Group (OG)
reported in the [project].hmm_hits file, obtained running PHMMER against all sequences within the best OG.
The seed ortholog is used to fetch fine-grained orthology relationships from eggNOG.
If using the diamond search mode, seed orthologs are directly
obtained from the best matching sequences by running DIAMOND against the whole eggNOG protein space.
]]></token>
<token name="@HELP_ANNOTATION_OUTPUTS@"><![CDATA[
**annotations**
Expand Down
22 changes: 5 additions & 17 deletions tools/eggnog_mapper/eggnog_mapper/eggnog_mapper.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,7 @@
<when value="--no_annot"/>
</conditional>

<section name="output_options" expanded="false" title="Output Options">
<param argument="--no_file_comments" type="boolean" truevalue="--no_file_comments" falsevalue="" checked="true"
label="Exclude header lines and stats from output files"/>
<param argument="--report_orthologs" type="boolean" truevalue="--report_orthologs" falsevalue="" checked="false"
label="Output a file with the list of orthologs for each hit"/>
<param argument="--md5" type="boolean" truevalue="--md5" falsevalue="" checked="false"
label="Add md5 hash of each query to annotations"/>
</section>
<expand macro="output_options_annotate_macro"/>
</inputs>
<outputs>
<expand macro="ortho_search_outputs_macro"/>
Expand All @@ -65,7 +58,6 @@
<param name="no_annot" value="--no_annot"/>
</conditional>
<section name="output_options">
<param name="no_file_comments" value="true"/>
</section>
<expand macro="seed_orthologs_assertion"/>
<expand macro="stdout_assertion"/>
Expand All @@ -84,7 +76,6 @@
</conditional>
<section name="output_options">
<param name="report_orthologs" value="true"/>
<param name="no_file_comments" value="true"/>
</section>
<expand macro="annotations_assertion"/>
<expand macro="annotations_orthologs_assertion"/>
Expand All @@ -99,12 +90,12 @@
</conditional>
<section name="output_options">
<param name="report_orthologs" value="true"/>
<param name="no_file_comments" value="true"/>
<param name="no_file_comments" value="false"/>
<param name="md5" value="true"/>
</section>
<expand macro="seed_orthologs_assertion"/>
<expand macro="annotations_assertion" columns="22" add_metadata_columm_names=",md5" add_column_names="&#009;md5" add_column_re="\t[\d\w]+"/>
<expand macro="annotations_orthologs_assertion"/>
<expand macro="seed_orthologs_assertion" nocomments="false"/>
<expand macro="annotations_assertion" columns="22" add_metadata_columm_names=",md5" add_column_names="&#009;md5" add_column_re="\t[\d\w]+" nocomments="false"/>
<expand macro="annotations_orthologs_assertion" nocomments="false"/>
<expand macro="stdout_assertion"/>
</test>

Expand All @@ -118,7 +109,6 @@
</conditional>
<section name="output_options">
<param name="report_orthologs" value="true"/>
<param name="no_file_comments" value="true"/>
<param name="md5" value="true"/>
</section>
<expand macro="annotations_assertion" columns="22" add_metadata_columm_names=",md5" add_column_names="&#009;md5" add_column_re="\t[\d\w]+"/>
Expand All @@ -141,7 +131,6 @@
</section>
<section name="output_options">
<param name="report_orthologs" value="true"/>
<param name="no_file_comments" value="true"/>
</section>
<expand macro="seed_orthologs_assertion"/>
<expand macro="annotations_assertion"/>
Expand All @@ -161,7 +150,6 @@
</conditional>
<section name="output_options">
<param name="report_orthologs" value="true"/>
<param name="no_file_comments" value="true"/>
</section>
<expand macro="seed_orthologs_assertion"/>
<expand macro="annotations_assertion"/>
Expand Down
9 changes: 1 addition & 8 deletions tools/eggnog_mapper/eggnog_mapper/eggnog_mapper_annotate.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,7 @@
<expand macro="annotation_options_macro"/>
</section>

<section name="output_options" expanded="false" title="Output Options">
<param argument="--no_file_comments" type="boolean" truevalue="--no_file_comments" falsevalue="" checked="true"
label="Exclude header lines and stats from output files"/>
<param argument="--report_orthologs" type="boolean" truevalue="--report_orthologs" falsevalue="" checked="false"
label="Output a file with the list of orthologs for each hit"/>
<param argument="--md5" type="boolean" truevalue="--md5" falsevalue="" checked="false"
label="Add md5 hash of each query to annotations"/>
</section>
<expand macro="output_options_annotate_macro"/>
</inputs>
<outputs>
<expand macro="annotation_output_macro"/>
Expand Down
12 changes: 1 addition & 11 deletions tools/eggnog_mapper/eggnog_mapper/eggnog_mapper_search.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
@ORTHO_SEARCH_TOKEN@
$output_options.no_file_comments
$output_options.report_orthologs
$output_options.md5
--output='results'
--cpu "\${GALAXY_SLOTS:-4}"
--scratch_dir \${TEMP:-\$_GALAXY_JOB_TMP_DIR}
Expand All @@ -21,14 +19,7 @@
<inputs>
<expand macro="db_macro"/>
<expand macro="ortho_search_macro"/>
<section name="output_options" expanded="false" title="Output Options">
<param argument="--no_file_comments" type="boolean" truevalue="--no_file_comments" falsevalue="" checked="true"
label="Exclude header lines and stats from output files"/>
<param argument="--report_orthologs" type="boolean" truevalue="--report_orthologs" falsevalue="" checked="false"
label="Output a file with the list of orthologs for each hits"/>
<param argument="--md5" type="boolean" truevalue="--md5" falsevalue="" checked="false"
label="Add md5 hash of each query to annotations"/>
</section>
<expand macro="output_options_macro"/>
</inputs>
<outputs>
<expand macro="ortho_search_outputs_macro"/>
Expand Down Expand Up @@ -56,7 +47,6 @@
<param name="sensmode" value="fast" />
</conditional>
<section name="output_options">
<param name="report_orthologs" value="true"/>
<param name="no_file_comments" value="true"/>
</section>
<expand macro="seed_orthologs_assertion"/>
Expand Down

0 comments on commit c67ed43

Please sign in to comment.