comparison blasttoolssearch/blasttoolssearch.xml @ 5:3a499f3ed69c draft

Uploaded
author fubar
date Wed, 19 Jul 2023 10:18:30 +0000
parents 2051ee2bedc4
children c23d0b047de9
comparison
equal deleted inserted replaced
4:2051ee2bedc4 5:3a499f3ed69c
1 <tool name="blasttoolssearch" id="blasttoolssearch" version="3.0"> 1 <tool name="blasttoolssearch" id="blasttoolssearch" version="3.1">
2 <!--Source in git at: https://github.com/fubar2/galaxy--> 2 <!--Source in git at: https://github.com/fubar2/galaxy-->
3 <!--Created by toolfactory@galaxy.org at 19/07/2023 12:39:19 using the Galaxy Tool Factory.--> 3 <!--Created by toolfactory@galaxy.org at 19/07/2023 12:39:19 using the Galaxy Tool Factory.-->
4 <description>Runs a legacy Java jar called blasttools from https://github.com/schmidda/blast-tools/tree/master</description> 4 <description>Runs a legacy Java jar called blasttools from https://github.com/schmidda/blast-tools/tree/master</description>
5 <requirements> 5 <requirements>
6 <requirement type="package">csvtk</requirement> 6 <requirement type="package">csvtk</requirement>
8 </requirements> 8 </requirements>
9 <stdio> 9 <stdio>
10 <exit_code range="1:" level="fatal"/> 10 <exit_code range="1:" level="fatal"/>
11 </stdio> 11 </stdio>
12 <version_command><![CDATA[echo "3.0"]]></version_command> 12 <version_command><![CDATA[echo "3.0"]]></version_command>
13 <command><![CDATA[bash 13 <command><![CDATA[
14 $runme 14 mkdir -p files &&
15 $blastn_search_outputs 15 #for afile in $blastn_search_outputs:
16 $__tool_directory__/BlastTools.jar 16 ln -sf '$afile' files/\$(basename '$afile') &&
17 $summary_viruses_viroids 17 #end for
18 bash $runme ./files $__tool_directory__/BlastTools.jar $summary_viruses_viroids
18 ]]></command> 19 ]]></command>
19 <configfiles> 20 <configfiles>
20 <configfile name="runme"><![CDATA[#raw 21 <configfile name="runme"><![CDATA[#raw
21 22
22 23
33 34
34 # Requirement: One or more GA-VSD .tabular outputs need to be in the folder where the command above (Usage)is executed. 35 # Requirement: One or more GA-VSD .tabular outputs need to be in the folder where the command above (Usage)is executed.
35 # The script will Look for all files with the suffix *.tabular 36 # The script will Look for all files with the suffix *.tabular
36 37
37 #Processing tabular files 38 #Processing tabular files
38 file=$1 39 for file in files/*.*
39 40 do
40 var=$(basename $file) 41 var=$(basename $file)
41 42
42 #STEP0: fetch Top 1 Hits 43 #STEP0: fetch Top 1 Hits
43 cat $file | awk '{print $1}' | sort | uniq > ${var}.top1.ids 44 cat $file | awk '{print $1}' | sort | uniq > ${var}.top1.ids
44 for i in `cat ${var}.top1.ids` 45 for i in `cat ${var}.top1.ids`
73 74
74 #print the header of the inital summary_blastn file 75 #print the header of the inital summary_blastn file
75 cat summary_${var}.txt | head -1 > header 76 cat summary_${var}.txt | head -1 > header
76 #report 1 77 #report 1
77 cat header ${var}_filtered.txt > $3 78 cat header ${var}_filtered.txt > $3
78 79 done
79 #end raw]]></configfile> 80 #end raw]]></configfile>
80 </configfiles> 81 </configfiles>
81 <inputs> 82 <inputs>
82 <param name="blastn_search_outputs" type="data" optional="false" label="blastn_search_outputs" help="" format="tabular" multiple="false"/> 83 <param name="blastn_search_outputs" type="data" optional="false" label="blastn_search_outputs" help="" format="tabular" multiple="true"/>
83 </inputs> 84 </inputs>
84 <outputs> 85 <outputs>
85 <data name="summary_viruses_viroids" format="tabular" label="summary_viruses_viroids" hidden="false"/> 86 <data name="summary_viruses_viroids" format="tabular" label="summary_viruses_viroids" hidden="false"/>
86 </outputs> 87 </outputs>
87 <tests> 88 <tests>