changeset 2:5a6050937cb9 draft

planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/genenotebook commit ec3c633a0751bb9e253bcd77fea425180c9a0014
author gga
date Fri, 14 Apr 2023 10:13:56 +0000
parents f415e44e71de
children 1d59e907fa98
files genenotebook_build.xml kill_gnb.sh launch_gnb.sh macros.xml test-data/output/genome.tar.bz2 test-data/output/genome_annot.tar.bz2 test-data/output/genome_annot_ips.tar.bz2 test-data/output/genome_annot_ips_en.tar.bz2 test-data/output/genome_annot_ips_en_bl_exp.tar.bz2 test-data/output/genome_reload.tar.bz2
diffstat 10 files changed, 67 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/genenotebook_build.xml	Mon Apr 03 15:01:52 2023 +0000
+++ b/genenotebook_build.xml	Fri Apr 14 10:13:56 2023 +0000
@@ -5,7 +5,7 @@
         <import>macros.xml</import>
     </macros>
     <expand macro="requirements" />
-    <command detect_errors="aggressive"><![CDATA[
+    <command detect_errors="exit_code"><![CDATA[
 @START_GNB@
 
 #for genome in $genomes:
@@ -40,13 +40,20 @@
             genoboo add eggnog @CONNECT_INFO@ '${annot.eggnog}';
         #end if
 
-        #if $annot.blast_cond.blast_choice == "yes":
+        #if $annot.blast_cond.blast_choice == "blast":
             genoboo add blast @CONNECT_INFO@
                 --format 'xml'
                 --algorithm '${annot.blast_cond.algorithm}'
                 --matrix '${annot.blast_cond.matrix}'
                 --database '${annot.blast_cond.database}'
                 '${annot.blast_cond.blast}';
+        #elif $annot.blast_cond.blast_choice == "diamond":
+            genoboo add diamond @CONNECT_INFO@
+                --format 'xml'
+                --algorithm '${annot.blast_cond.algorithm}'
+                --matrix '${annot.blast_cond.matrix}'
+                --database '${annot.blast_cond.database}'
+                '${annot.blast_cond.diamond}';
         #end if
 
         #for exp in $annot.expression:
@@ -94,11 +101,18 @@
                 <conditional name="blast_cond">
                     <param name="blast_choice" type="select" label="Import Blast or Diamond results">
                         <option value="no" selected="true">No</option>
-                        <option value="yes">Yes</option>
+                        <option value="blast">Blast</option>
+                        <option value="diamond">Diamond</option>
                     </param>
                     <when value="no" />
-                    <when value="yes">
-                        <param name="blast" label="Blast or Diamond results" optional="false" type="data" format="xml" />
+                    <when value="blast">
+                        <param name="blast" label="Blast results (xml)" optional="false" type="data" format="xml" />
+                        <param argument="--algorithm" label="Algorithm" optional="false" type="text" help="e.g. blastx, blastp" />
+                        <param argument="--matrix" label="Matrix" optional="false" type="text" help="e.g. BLOSUM90, BLOSUM80, PAM100" />
+                        <param argument="--database" label="database" optional="false" type="text" help="e.g. Non-reundant protein sequences (nr)" />
+                    </when>
+                    <when value="diamond">
+                        <param name="diamond" label="Diamond results (xml)" optional="false" type="data" format="xml" />
                         <param argument="--algorithm" label="Algorithm" optional="false" type="text" help="e.g. blastx, blastp" />
                         <param argument="--matrix" label="Matrix" optional="false" type="text" help="e.g. BLOSUM90, BLOSUM80, PAM100" />
                         <param argument="--database" label="database" optional="false" type="text" help="e.g. Non-reundant protein sequences (nr)" />
@@ -166,7 +180,7 @@
             <assert_stdout>
                 <has_text text="addGenome succesfully inserted 1 elements" />
                 <has_text text="addAnnotation succesfully inserted 5 elements" />
-                <has_text text="addInterproscan succesfully inserted 5 elements" />
+                <has_text text="addInterproscan succesfully inserted 3 elements" />
             </assert_stdout>
         </test>
         <test>
@@ -194,7 +208,7 @@
             <assert_stdout>
                 <has_text text="addGenome succesfully inserted 1 elements" />
                 <has_text text="addAnnotation succesfully inserted 5 elements" />
-                <has_text text="addInterproscan succesfully inserted 5 elements" />
+                <has_text text="addInterproscan succesfully inserted 3 elements" />
                 <has_text text="addEggnog succesfully inserted 4 elements" />
             </assert_stdout>
         </test>
@@ -212,7 +226,7 @@
                     </conditional>
 
                     <conditional name="blast_cond">
-                        <param name="blast_choice" value="yes"/>
+                        <param name="blast_choice" value="blast"/>
                         <param name="blast" value="blast.xml" ftype="xml" />
                         <param name="algorithm" value="blastx" />
                         <param name="matrix" value="BLOSUM80" />
@@ -235,6 +249,43 @@
                 <has_text text="addTranscriptome succesfully inserted 1 elements" />
             </assert_stdout>
         </test>
+        <test>
+            <repeat name="genomes">
+                <param name="name" value="Test org 2" />
+                <param name="genome" value="genome.fa" />
+                <repeat name="annots">
+                    <param name="annotation" value="annot.gff" />
+
+                    <conditional name="prot_naming">
+                        <param name="method" value="regex"/>
+                        <param name="re_protein_capture" value="^(.*?)-T([0-9]+)$" />
+                        <param name="re_protein" value="$1-P$2" />
+                    </conditional>
+
+                    <conditional name="blast_cond">
+                        <param name="blast_choice" value="diamond"/>
+                        <param name="diamond" value="blast.xml" ftype="xml" />
+                        <param name="algorithm" value="blastx" />
+                        <param name="matrix" value="BLOSUM62" />
+                        <param name="database" value="Non-reundant garbage (nrg)" />
+                    </conditional>
+
+                    <repeat name="expression">
+                        <param name="counts" value="exp.tsv" ftype="tsv" />
+                        <param name="sample_name" value="Sample1_rep1" />
+                        <param name="replica_group" value="Sample1" />
+                        <param name="sample_description" value="Pointless experiment" />
+                    </repeat>
+                </repeat>
+            </repeat>
+            <output name="gnb_db" file="output/genome_annot_ips_en_bl_exp.tar.bz2" compare="sim_size" delta="15000" />
+            <assert_stdout>
+                <has_text text="addGenome succesfully inserted 1 elements" />
+                <has_text text="addAnnotation succesfully inserted 5 elements" />
+                <has_text text="addSimilarSequence succesfully inserted 1 elements" />
+                <has_text text="addTranscriptome succesfully inserted 1 elements" />
+            </assert_stdout>
+        </test>
     </tests>
     <help><![CDATA[
 Build a GeneNoteBook by loading data into a MongoDB database. The resulting dataset can then be displayed with the "View a GeneNoteBook" interactive tool (to be written).
--- a/kill_gnb.sh	Mon Apr 03 15:01:52 2023 +0000
+++ b/kill_gnb.sh	Fri Apr 14 10:13:56 2023 +0000
@@ -3,6 +3,11 @@
 # Make sure everything is cleaned (including job queue)
 sleep 5
 
+# Print server log
+echo ""
+echo "--- 'genoboo run' stopped, printing logs (server side) ---"
+cat ./gnb.log
+
 # Kill GeneNoteBook
 kill $GNB_PID
 
--- a/launch_gnb.sh	Mon Apr 03 15:01:52 2023 +0000
+++ b/launch_gnb.sh	Fri Apr 14 10:13:56 2023 +0000
@@ -17,6 +17,8 @@
 TMP_STORAGE=$(pwd)/tmp_storage
 mkdir "$TMP_STORAGE"
 
+export NODE_OPTIONS="--max-old-space-size=$((${GALAXY_MEMORY_MB:-8192} * 75 / 100))"
+
 genoboo run --storage-path "$TMP_STORAGE" --port ${GNB_PORT} --mongo-url mongodb://$MONGO_URI%2Fmongodb-27017.sock/genenotebook > ./gnb.log 2>&1 &
 
 export GNB_PID=$!
--- a/macros.xml	Mon Apr 03 15:01:52 2023 +0000
+++ b/macros.xml	Fri Apr 14 10:13:56 2023 +0000
@@ -7,7 +7,7 @@
         </requirements>
     </xml>
 
-    <token name="@TOOL_VERSION@">0.4.1</token>
+    <token name="@TOOL_VERSION@">0.4.2</token>
     <token name="@WRAPPER_VERSION@">@TOOL_VERSION@+galaxy0</token>
 
     <xml name="citation">
Binary file test-data/output/genome.tar.bz2 has changed
Binary file test-data/output/genome_annot.tar.bz2 has changed
Binary file test-data/output/genome_annot_ips.tar.bz2 has changed
Binary file test-data/output/genome_annot_ips_en.tar.bz2 has changed
Binary file test-data/output/genome_annot_ips_en_bl_exp.tar.bz2 has changed
Binary file test-data/output/genome_reload.tar.bz2 has changed