annotate blast_tools_search/blasttoolssearch.xml @ 8:186734f1d63c draft default tip

Replace plotly_blast_tool content with blasttools_search. :(
author fubar
date Fri, 04 Aug 2023 01:57:51 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
1 <tool name="blasttoolssearch" id="blasttoolssearch" version="3.0">
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
2 <!--Source in git at: https://github.com/fubar2/galaxy_tf_overlay-->
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
3 <!--Created by toolfactory@galaxy.org at 04/08/2023 10:36:33 using the Galaxy Tool Factory.-->
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
4 <description>Runs a legacy Java jar called blasttools from https://github.com/schmidda/blast-tools/tree/master</description>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
5 <requirements>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
6 <requirement version="0.26.0" type="package">csvtk</requirement>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
7 <requirement version="11.0.13" type="package">openjdk</requirement>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
8 </requirements>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
9 <stdio>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
10 <exit_code range="1:" level="fatal"/>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
11 </stdio>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
12 <version_command><![CDATA[echo "3.0"]]></version_command>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
13 <command><![CDATA[bash $runme "$blastn_search_outputs" "$__tool_directory__/BlastTools.jar" "$summary_viruses_viroids" "$all_blasttools_output"]]></command>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
14 <configfiles>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
15 <configfile name="runme"><![CDATA[#raw
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
16
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
17 ## eResearch Office, QUT
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
18 ## Created: 31 March 2021
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
19 ## Last modified: 28 September 2022
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
20 ## Script: Processes Galaxy Australia generated blastN outputs to summarise and report hits to REGULATED and ENDEMIC viruses/viroids.
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
21 ## Usage: ./run_VirReport_Summary.sh
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
22 ## changed to accept a single input file name passed as $1
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
23 ## Ross Lazarus for a ToolFactory wrapper for Robert Barrero
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
24 ## July 18 2023
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
25
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
26
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
27 # Requirement: One or more GA-VSD .tabular outputs need to be in the folder where the command above (Usage)is executed.
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
28 # The script will Look for all files with the suffix *.tabular
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
29
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
30 #Processing tabular files
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
31 file=$1
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
32 var=$(basename $file)
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
33
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
34 #STEP1: modify the columns of Galaxy Australia (GA) blast output to the expected format by the BlastTools.jar tool
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
35 ###### namely: qseqid sgi sacc length pident mismatch gapopen qstart qend qlen sstart send slen sstrand evalue bitscore qcovhsp stitle staxids qseq sseq sseqid qcovs qframe sframe
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
36 cat $file |csvtk cut -H -t -f 1,19,20,4,3,5,6,7,8,17,9,10,18,22,11,12,24,21,25,15,16,2,23,13,14 | sed 's/ /_/g' > ${var}_all.txt
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
37 java -jar $2 -t blastn ${var}_all.txt
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
38 cat summary_${var}_all.txt | grep "virus\|viroid\|endo" > $4
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
39
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
40
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
41 #STEP0: fetch Top 1 Hits
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
42 cat $file | awk '{print $1}' | sort | uniq > ${var}.top1.ids
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
43 for i in `cat ${var}.top1.ids`
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
44 do
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
45 echo "fetching top hits..." $i 1>&2 ;
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
46 grep $i $file | head -1 >> ${var}.top1Hits.txt;
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
47 done
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
48
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
49 #STEP1: modify the columns of Galaxy Australia (GA) blast output to the expected format by the BlastTools.jar tool
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
50 ###### namely: qseqid sgi sacc length pident mismatch gapopen qstart qend qlen sstart send slen sstrand evalue bitscore qcovhsp stitle staxids qseq sseq sseqid qcovs qframe sframe
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
51 cat ${var}.top1Hits.txt |csvtk cut -H -t -f 1,19,20,4,3,5,6,7,8,17,9,10,18,22,11,12,24,21,25,15,16,2,23,13,14 | sed 's/ /_/g' > ${var}.txt
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
52
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
53 #STEP2: summarise the GA blastN files
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
54 java -jar $2 -t blastn ${var}.txt
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
55 #filter virus/viroid/endo
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
56 cat summary_${var}.txt | grep "virus\|viroid\|endo" > summary_${var}_filtered.txt
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
57
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
58 #STEP3: fetch unique names from Blast summary reports
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
59 cat summary_${var}_filtered.txt | awk '{print $7}' | awk -F "|" '{print $2}'| sort | uniq | sed 's/Species://' > ${var}_uniq.ids
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
60
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
61 #STEP4: retrieve the best hit for each virus/viroid
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
62 echo "processing top hits ..." 1>&2
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
63 touch ${var}_filtered.txt
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
64 for id in `cat ${var}_uniq.ids`
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
65 do
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
66 #print on the screen the name of the virus/viroids to search
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
67 #echo "fetching species matches ..." $id 1>&2
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
68
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
69 #fetch the virus name on the summary_blastn file by selecting the longest alignment (column 3) and highest genome coverage (column 5)
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
70 grep $id summary_${var}.txt | sort -k3,3nr -k5,5nr | head -1 >> ${var}_filtered.txt
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
71 done
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
72
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
73 #print the header of the inital summary_blastn file
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
74 cat summary_${var}.txt | head -1 > header
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
75 #report 1
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
76 cat header ${var}_filtered.txt > $3
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
77
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
78
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
79
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
80
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
81
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
82 #end raw]]></configfile>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
83 </configfiles>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
84 <inputs>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
85 <param name="blastn_search_outputs" type="data" optional="false" label="blastn_search_outputs" help="Nucleotide blast search output from a Galaxy blast search" format="tabular" multiple="false"/>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
86 </inputs>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
87 <outputs>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
88 <data name="summary_viruses_viroids" format="tabular" label="summary_viruses_viroids" hidden="false"/>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
89 <data name="all_blasttools_output" format="tabular" label="all_blasttools_output" hidden="false"/>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
90 </outputs>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
91 <tests>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
92 <test>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
93 <output name="summary_viruses_viroids" value="summary_viruses_viroids_sample" compare="diff" lines_diff="0"/>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
94 <output name="all_blasttools_output" value="all_blasttools_output_sample" compare="diff" lines_diff="0"/>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
95 <param name="blastn_search_outputs" value="blastn_search_outputs_sample"/>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
96 </test>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
97 </tests>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
98 <help><![CDATA[
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
99
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
100 **What it Does**
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
101
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
102 Wraps https://github.com/schmidda/blast-tools/tree/master as a Galaxy tool as a demonstration for Roberto Barrero
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
103
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
104
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
105
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
106 ------
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
107
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
108
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
109 Script::
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
110
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
111 ## eResearch Office, QUT
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
112 ## Created: 31 March 2021
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
113 ## Last modified: 28 September 2022
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
114 ## Script: Processes Galaxy Australia generated blastN outputs to summarise and report hits to REGULATED and ENDEMIC viruses/viroids.
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
115 ## Usage: ./run_VirReport_Summary.sh
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
116 ## changed to accept a single input file name passed as $1
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
117 ## Ross Lazarus for a ToolFactory wrapper for Robert Barrero
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
118 ## July 18 2023
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
119 # Requirement: One or more GA-VSD .tabular outputs need to be in the folder where the command above (Usage)is executed.
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
120 # The script will Look for all files with the suffix *.tabular
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
121 #Processing tabular files
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
122 file=$1
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
123 var=$(basename $file)
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
124 #STEP1: modify the columns of Galaxy Australia (GA) blast output to the expected format by the BlastTools.jar tool
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
125 ###### namely: qseqid sgi sacc length pident mismatch gapopen qstart qend qlen sstart send slen sstrand evalue bitscore qcovhsp stitle staxids qseq sseq sseqid qcovs qframe sframe
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
126 cat $file |csvtk cut -H -t -f 1,19,20,4,3,5,6,7,8,17,9,10,18,22,11,12,24,21,25,15,16,2,23,13,14 | sed 's/ /_/g' > $ {var}_all.txt
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
127 java -jar $2 -t blastn $ {var}_all.txt
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
128 cat summary_$ {var}_all.txt | grep "virus\|viroid\|endo" > $4
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
129 #STEP0: fetch Top 1 Hits
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
130 cat $file | awk '{print $1}' | sort | uniq > $ {var}.top1.ids
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
131 for i in `cat $ {var}.top1.ids`
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
132 do
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
133 echo "fetching top hits..." $i 1>&2 ;
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
134 grep $i $file | head -1 >> $ {var}.top1Hits.txt;
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
135 done
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
136 #STEP1: modify the columns of Galaxy Australia (GA) blast output to the expected format by the BlastTools.jar tool
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
137 ###### namely: qseqid sgi sacc length pident mismatch gapopen qstart qend qlen sstart send slen sstrand evalue bitscore qcovhsp stitle staxids qseq sseq sseqid qcovs qframe sframe
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
138 cat $ {var}.top1Hits.txt |csvtk cut -H -t -f 1,19,20,4,3,5,6,7,8,17,9,10,18,22,11,12,24,21,25,15,16,2,23,13,14 | sed 's/ /_/g' > $ {var}.txt
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
139 #STEP2: summarise the GA blastN files
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
140 java -jar $2 -t blastn $ {var}.txt
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
141 #filter virus/viroid/endo
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
142 cat summary_$ {var}.txt | grep "virus\|viroid\|endo" > summary_$ {var}_filtered.txt
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
143 #STEP3: fetch unique names from Blast summary reports
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
144 cat summary_$ {var}_filtered.txt | awk '{print $7}' | awk -F "|" '{print $2}'| sort | uniq | sed 's/Species://' > $ {var}_uniq.ids
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
145 #STEP4: retrieve the best hit for each virus/viroid
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
146 echo "processing top hits ..." 1>&2
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
147 touch $ {var}_filtered.txt
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
148 for id in `cat $ {var}_uniq.ids`
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
149 do
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
150 #print on the screen the name of the virus/viroids to search
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
151 #echo "fetching species matches ..." $id 1>&2
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
152 #fetch the virus name on the summary_blastn file by selecting the longest alignment (column 3) and highest genome coverage (column 5)
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
153 grep $id summary_$ {var}.txt | sort -k3,3nr -k5,5nr | head -1 >> $ {var}_filtered.txt
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
154 done
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
155 #print the header of the inital summary_blastn file
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
156 cat summary_$ {var}.txt | head -1 > header
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
157 #report 1
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
158 cat header $ {var}_filtered.txt > $3
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
159
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
160 ]]></help>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
161 <citations>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
162 <citation type="doi">10.1093/bioinformatics/bts573</citation>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
163 </citations>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
164 </tool>
186734f1d63c Replace plotly_blast_tool content with blasttools_search. :(
fubar
parents:
diff changeset
165