changeset 3:ed1ef564da41 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/ncbi_fcs_gx commit 25c9d8d297d0e10f92e373f6a959274dedc10433
author iuc
date Wed, 09 Oct 2024 08:53:18 +0000
parents c228e49365c4
children
files ncbi_fcs_gx.xml test-data/ncbi_fcs_gx_config.tsv test-data/ncbi_fcs_gx_databases.loc test-data/ncbi_fcs_gx_databases_ext.loc test-data/ncbi_fcs_gx_divisions.tsv test-data/output.clean.fa.gz test-data/output.contam.fa.gz test-data/output.fcs_gx_report.txt test-data/output.taxonomy.rpt tool-data/ncbi_fcs_gx_config.tsv.sample tool-data/ncbi_fcs_gx_databases.loc.sample tool-data/ncbi_fcs_gx_databases_ext.loc.sample tool_data_table_conf.xml.sample tool_data_table_conf.xml.test
diffstat 14 files changed, 44 insertions(+), 61 deletions(-) [+]
line wrap: on
line diff
--- a/ncbi_fcs_gx.xml	Fri Aug 23 20:55:07 2024 +0000
+++ b/ncbi_fcs_gx.xml	Wed Oct 09 08:53:18 2024 +0000
@@ -6,17 +6,20 @@
     <expand macro="biotools"/>
     <expand macro="requirements"/>
     <command detect_errors="exit_code"><![CDATA[
-GX_NUM_CORES=\${GALAXY_SLOTS:-2}
 #if $mode.mode_selector == "screen"
-    ## copy data to local storage
-    #set manifest_pathname = $mode.screen_adv.database.fields.name
+    #set manifest_pathname = $mode.config_tag.fields.local_manifest
     #if $mode.config_tag.fields.use_source_manifest == "1"
-        #set manifest_pathname = $mode.screen_adv.database.fields.source_manifest
+        #set manifest_pathname = $mode.config_tag.fields.source_manifest
     #end if
-    mkdir -p '$mode.config_tag.fields.node_cache_dir' &&
-    sync_files.py get --mft '$manifest_pathname' --dir '$mode.config_tag.fields.node_cache_dir' > /dev/null 2>&1 &&
+    ## skip checksumming the database if the db_state_file exists
+    if [ ! -e '\${TMPDIR}/sync-files-completed.txt' ]; then
+        ## copy data to local storage
+        mkdir -p '\${TMPDIR}' &&
+        sync_files.py get --mft '$manifest_pathname' --dir '\${TMPDIR}' > /dev/null 2>&1 &&
+        touch '\${TMPDIR}/sync-files-completed.txt';
+    fi &&
     ## run gx
-    run_gx.py
+    GX_NUM_CORES=\${GALAXY_SLOTS:-2} run_gx.py
     #if $mode.config_tag.fields.phone_home == "1"
         --phone-home-label '$mode.config_tag.fields.phone_home_label'
     #end if
@@ -34,13 +37,13 @@
     #if $mode.screen_adv.div:
         --div '$mode.screen_adv.div'
     #end if
-        --gx-db '$mode.config_tag.fields.node_cache_dir'
+        --gx-db '\${TMPDIR}'
         --out-basename output
         --action-report true
         --generate-logfile false
 #elif $mode.mode_selector == "clean"
     ## run gx
-    gx clean-genome
+    GX_NUM_CORES=\${GALAXY_SLOTS:-2} gx clean-genome
         --input '$mode.input'
         --action-report '$mode.action_report'
         --contam-fasta-out 'contam.fa'
@@ -59,10 +62,10 @@
                 <option value="clean">Clean genome</option>
             </param>
             <when value="screen">
-                <!-- value, name, use_source_manifest, phone_home, phone_home_label, node_cache_dir -->
+                <!-- value, description, source_manifest, use_source_manifest, phone_home, phone_home_label, local_manifest -->
                 <param name="config_tag" type="select" label="Database">
-                    <options from_data_table="ncbi_fcs_gx_config">
-                        <filter type="sort_by" name="sorted_description" column="1"/>
+                    <options from_data_table="ncbi_fcs_gx_databases_ext">
+                        <filter type="sort_by" column="1"/>
                     </options>
                     <validator message="No database is available" type="no_options"/>
                 </param>
@@ -73,10 +76,11 @@
                         <option value="ncbi_tax">NCBI Taxonomic identifier</option>
                     </param>
                     <when value="gx_div">
-                        <param argument="--div" type="select">
+                        <!-- value, tag, description -->
+                        <param argument="--div" type="select" optional="true">
                             <options from_data_table="ncbi_fcs_gx_divisions">
                                 <filter type="param_value" ref="config_tag" column="1" />
-                                <filter type="sort_by" name="sorted_description" column="2" />
+                                <filter type="sort_by" column="2" />
                             </options>
                             <validator message="No GX Divisions are available" type="no_options"/>
                         </param>
@@ -97,21 +101,16 @@
                             </valid>
                         </sanitizer>
                     </param>
+                    <!-- value, tag, description -->
                     <param name="gx_extra_contam_divs" type="select" multiple="true" optional="true" label="Additional contaminants to identify" help="Multiple gx-divisions may be selected.">
                         <options from_data_table="ncbi_fcs_gx_divisions">
                             <filter type="param_value" ref="config_tag" column="1" />
-                            <filter type="sort_by" name="sorted_description" column="2" />
+                            <filter type="sort_by" column="2" />
                         </options>
                         <validator message="No GX Divisions are available" type="no_options"/>
                     </param>
                     <param argument="--split-fasta" type="boolean" checked="true" optional="true" label="Split fasta sequences on N-runs of length at least 10"/>
                     <param argument="--div" type="text" value="" optional="true" label="BLAST-div of the tax-id" help="from 'NCBI BLAST name' on taxon Info page"/>
-                    <param name="database" type="select" label="Database location">
-                        <options from_data_table="ncbi_fcs_gx_databases">
-                            <filter type="param_value" ref="config_tag" column="0"/>
-                        </options>
-                        <validator message="No database location is available" type="no_options"/>
-                    </param>
                 </section>
             </when>
             <when value="clean">
@@ -140,7 +139,7 @@
     <tests>
         <test expect_num_outputs="2">
             <param name="mode_selector" value="screen"/>
-            <param name="config_tag" value="test-only" />
+            <param name="config_tag" value="test" />
             <param name="id_selector" value="ncbi_tax"/>
             <param name="fasta" value="fcsgx_test.fa.gz" ftype="fasta"/>
             <param name="tax_id" value="6973"/>
--- a/test-data/ncbi_fcs_gx_config.tsv	Fri Aug 23 20:55:07 2024 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-## NCBI FCS GX Tool Config
-# 
-#tag	description	use_source_manifest	phone_home	phone_home_label	node_cache_dir
-test-only	Testing GX database	1	0		/tmp/gxdb
--- a/test-data/ncbi_fcs_gx_databases.loc	Fri Aug 23 20:55:07 2024 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-#tag	source_manifest	local_manifest
-test-only	https://ncbi-fcs-gx.s3.amazonaws.com/gxdb/test-only/test-only.manifest	<UNUSED>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/ncbi_fcs_gx_databases_ext.loc	Wed Oct 09 08:53:18 2024 +0000
@@ -0,0 +1,2 @@
+#tag	description	source_manifest	use_source_manifest	phone_home	phone_home_label	local_manifest
+test	Test Database	https://ncbi-fcs-gx.s3.amazonaws.com/gxdb/test-only/test-only.manifest	1	0		<UNUSED>
--- a/test-data/ncbi_fcs_gx_divisions.tsv	Fri Aug 23 20:55:07 2024 +0000
+++ b/test-data/ncbi_fcs_gx_divisions.tsv	Wed Oct 09 08:53:18 2024 +0000
@@ -1,3 +1,3 @@
 #gx_div	tag	description
-prok:CFB group bacteria	test-only	Bacteria - CFB group bacteria
-unkn:unknown	test-only	Unknown / Unclassified
+prok:CFB group bacteria	test	Bacteria - CFB group bacteria
+unkn:unknown	test	Unknown / Unclassified
Binary file test-data/output.clean.fa.gz has changed
Binary file test-data/output.contam.fa.gz has changed
--- a/test-data/output.fcs_gx_report.txt	Fri Aug 23 20:55:07 2024 +0000
+++ b/test-data/output.fcs_gx_report.txt	Wed Oct 09 08:53:18 2024 +0000
@@ -1,4 +1,4 @@
-##[["FCS genome report", 2, 1], {"git-rev": "v0.5.4-5-g5dfd516", "run-date": "Fri Aug 23 19:21:28 2024", "db": {"build-date": "2022-11-03", "seqs": 3042, "Gbp": 0.28336}, "run-info": {"agg-cvg": 0.455294, "asserted-div": "anml:insects", "inferred-primary-divs": ["prok:CFB group bacteria"], "corrected-primary-divs": ["anml:insects"], "genome-hash": "dbb3380351f70e9b"}}]
+##[["FCS genome report", 2, 1], {"git-rev": "v0.5.4-5-g5dfd516", "run-date": "Thu Sep  5 19:38:38 2024", "db": {"build-date": "2022-11-03", "seqs": 3042, "Gbp": 0.28336}, "run-info": {"agg-cvg": 0.455294, "asserted-div": "anml:insects", "inferred-primary-divs": ["prok:CFB group bacteria"], "corrected-primary-divs": ["anml:insects"], "genome-hash": "dbb3380351f70e9b"}}]
 #seq_id	start_pos	end_pos	seq_len	action	div	agg_cont_cov	top_tax_name
 JPZV02005859.1	1	705930	705930	REVIEW	prok:CFB group bacteria	31	Bacteroides salyersiae
 JPZV02009577.1	1	600722	600722	EXCLUDE	prok:CFB group bacteria	61	Bacteroides bouchesdurhonensis
--- a/test-data/output.taxonomy.rpt	Fri Aug 23 20:55:07 2024 +0000
+++ b/test-data/output.taxonomy.rpt	Wed Oct 09 08:53:18 2024 +0000
@@ -1,4 +1,4 @@
-##[["GX taxonomy analysis report", 3, 1], {"git-rev": "v0.5.4-5-g5dfd516", "run-date": "Fri Aug 23 19:21:28 2024", "db": {"build-date": "2022-11-03", "seqs": 3042, "Gbp": 0.28336}, "run-info": {"agg-cvg": 0.455294, "asserted-div": "anml:insects", "inferred-primary-divs": ["prok:CFB group bacteria"], "corrected-primary-divs": ["anml:insects"], "genome-hash": "dbb3380351f70e9b"}}]
+##[["GX taxonomy analysis report", 3, 1], {"git-rev": "v0.5.4-5-g5dfd516", "run-date": "Thu Sep  5 19:38:38 2024", "db": {"build-date": "2022-11-03", "seqs": 3042, "Gbp": 0.28336}, "run-info": {"agg-cvg": 0.455294, "asserted-div": "anml:insects", "inferred-primary-divs": ["prok:CFB group bacteria"], "corrected-primary-divs": ["anml:insects"], "genome-hash": "dbb3380351f70e9b"}}]
 #seq-id	seq-len	(xp,lc,co,n,mt,pt,pm)-len	cvg-by-all	sep1	tax-name-1	tax-id-1	div-1	cvg-by-div-1	cvg-by-tax-1	score-1	sep2	tax-id-2	div-2	cvg-by-div-2	cvg-by-tax-2	score-2	sep3	tax-id-3	div-3	cvg-by-div-3	cvg-by-tax-3	score-3	sep4	tax-id-4	div-4	cvg-by-div-4	cvg-by-tax-4	score-4	sep5	reserved	result	div	div_pct_cvg
 JPZV02005859.1	705930	0,1139,0,0,0,0,0	227139	|	Bacteroides salyersiae	291644	prok:CFB group bacteria	227139	47267	364	|	1796613	prok:CFB group bacteria	227139	40278	342	|						|						|	n/a	low-coverage	prok:CFB group bacteria	32
 JPZV02009577.1	600722	0,65,0,0,0,0,0	374876	|	Bacteroides bouchesdurhonensis	1841855	prok:CFB group bacteria	374876	122690	746	|	1796613	prok:CFB group bacteria	374876	125102	742	|						|						|	n/a	contaminant(div)	prok:CFB group bacteria	62
--- a/tool-data/ncbi_fcs_gx_config.tsv.sample	Fri Aug 23 20:55:07 2024 +0000
+++ b/tool-data/ncbi_fcs_gx_config.tsv.sample	Wed Oct 09 08:53:18 2024 +0000
@@ -1,5 +1,5 @@
 ## NCBI FCS GX Tool Configuration
 # 
-#tag	description	use_source_manifest	phone_home	phone_home_label	node_cache_dir
-#all	Complete GX database	0	0		/tmp/gxdb
-#test-only	Testing GX database	0	1	usegalaxy.org	/tmp/gxdb
+#tag	description	use_source_manifest	phone_home	phone_home_label
+#all	Complete GX database	0	0	
+#test-only	Testing GX database	0	1	usegalaxy.org
--- a/tool-data/ncbi_fcs_gx_databases.loc.sample	Fri Aug 23 20:55:07 2024 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-## NCBI FCS GX Databases
-# 
-#tag	manifest	path
-#r2022-01-24	https://ftp.ncbi.nlm.nih.gov/genomes/TOOLS/FCS/database/r2022-01-24/all.manifest	/big/data/dir/ncbi_fcs_gx_databases/r2022-01-24/all.manifest
-#r2022-07-08	https://ftp.ncbi.nlm.nih.gov/genomes/TOOLS/FCS/database/r2022-07-08/all.manifest	/big/data/dir/ncbi_fcs_gx_databases/r2022-07-08/all.manifest
-#r2023-01-24	https://ftp.ncbi.nlm.nih.gov/genomes/TOOLS/FCS/database/r2023-01-24/all.manifest	/big/data/dir/ncbi_fcs_gx_databases/r2023-01-24/all.manifest
-#latest	https://ftp.ncbi.nlm.nih.gov/genomes/TOOLS/FCS/database/latest/all.manifest	/big/data/dir/ncbi_fcs_gx_databases/latest/all.manifest
-#test-only	https://ftp.ncbi.nlm.nih.gov/genomes/TOOLS/FCS/database/test-only/test-only.manifest	/big/data/dir/ncbi_fcs_gx_databases/test-only/test-only.manifest
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tool-data/ncbi_fcs_gx_databases_ext.loc.sample	Wed Oct 09 08:53:18 2024 +0000
@@ -0,0 +1,6 @@
+#tag	description	source_manifest	use_source_manifest	phone_home	phone_home_label	local_manifest
+#r2022-01-24	r2022-01-24 Database	https://ftp.ncbi.nlm.nih.gov/genomes/TOOLS/FCS/database/r2022-01-24/all.manifest	0	0		/big/data/dir/ncbi_fcs_gx_databases_ext/r2022-01-24/all.manifest
+#r2022-07-08	r2022-07-08 Database	https://ftp.ncbi.nlm.nih.gov/genomes/TOOLS/FCS/database/r2022-07-08/all.manifest	0	0		/big/data/dir/ncbi_fcs_gx_databases_ext/r2022-07-08/all.manifest
+#r2023-01-24	r2023-01-24 Database	https://ftp.ncbi.nlm.nih.gov/genomes/TOOLS/FCS/database/r2023-01-24/all.manifest	0	0		/big/data/dir/ncbi_fcs_gx_databases_ext/r2023-01-24/all.manifest
+#latest	Latest Database	https://ftp.ncbi.nlm.nih.gov/genomes/TOOLS/FCS/database/latest/all.manifest	0	1	my galaxy instance	/big/data/dir/ncbi_fcs_gx_databases_ext/latest/all.manifest
+#test	Test Database	https://ftp.ncbi.nlm.nih.gov/genomes/TOOLS/FCS/database/test-only/test-only.manifest	0	0		/big/data/dir/ncbi_fcs_gx_databases_ext/test-only/test-only.manifest
--- a/tool_data_table_conf.xml.sample	Fri Aug 23 20:55:07 2024 +0000
+++ b/tool_data_table_conf.xml.sample	Wed Oct 09 08:53:18 2024 +0000
@@ -1,13 +1,8 @@
 <tables>
-    <!-- Location of NCBI FCS GX tool config -->
-    <table name="ncbi_fcs_gx_config" comment_char="#">
-        <columns>value, name, use_source_manifest, phone_home, phone_home_label, node_cache_dir</columns>
-        <file path="tool-data/ncbi_fcs_gx_config.tsv" />
-    </table>
-    <!-- Location of NCBI FCS GX databases -->
-    <table name="ncbi_fcs_gx_databases" comment_char="#">
-        <columns>value, source_manifest, name</columns>
-        <file path="tool-data/ncbi_fcs_gx_databases.loc" />
+    <!-- Locations of NCBI FCS GX databases -->
+    <table name="ncbi_fcs_gx_databases_ext" comment_char="#">
+        <columns>value, name, source_manifest, use_source_manifest, phone_home, phone_home_label, local_manifest</columns>
+        <file path="tool-data/ncbi_fcs_gx_databases_ext.loc" />
     </table>
     <!-- NCBI FCS GX divisions -->
     <table name="ncbi_fcs_gx_divisions" comment_char="#">
--- a/tool_data_table_conf.xml.test	Fri Aug 23 20:55:07 2024 +0000
+++ b/tool_data_table_conf.xml.test	Wed Oct 09 08:53:18 2024 +0000
@@ -1,13 +1,8 @@
 <tables>
-    <!-- Location of NCBI FCS GX tool config -->
-    <table name="ncbi_fcs_gx_config" comment_char="#">
-        <columns>value, name, use_source_manifest, phone_home, phone_home_label, node_cache_dir</columns>
-        <file path="${__HERE__}/test-data/ncbi_fcs_gx_config.tsv" />
-    </table>
-    <!-- Location of NCBI FCS GX databases -->
-    <table name="ncbi_fcs_gx_databases" comment_char="#">
-        <columns>value, source_manifest, name</columns>
-        <file path="${__HERE__}/test-data/ncbi_fcs_gx_databases.loc" />
+    <!-- Locations of NCBI FCS GX databases -->
+    <table name="ncbi_fcs_gx_databases_ext" comment_char="#">
+        <columns>value, name, source_manifest, use_source_manifest, phone_home, phone_home_label, local_manifest</columns>
+        <file path="${__HERE__}/test-data/ncbi_fcs_gx_databases_ext.loc" />
     </table>
     <!-- NCBI FCS GX divisions -->
     <table name="ncbi_fcs_gx_divisions" comment_char="#">