comparison tools/ncbi_blast_plus/get_species_taxids.xml @ 33:d999e774072a draft

Fix for get_species_taxids
author peterjc
date Sun, 19 Nov 2023 22:57:39 +0000
parents acf4e47b734c
children
comparison
equal deleted inserted replaced
32:a52d2d93e595 33:d999e774072a
5 </macros> 5 </macros>
6 <expand macro="preamble"/> 6 <expand macro="preamble"/>
7 <command detect_errors="aggressive"><![CDATA[ 7 <command detect_errors="aggressive"><![CDATA[
8 #if $type_cond.type_sel == 'names' 8 #if $type_cond.type_sel == 'names'
9 #for name in $type_cond.names.split(',') 9 #for name in $type_cond.names.split(',')
10 taxid=\$(get_species_taxids.sh -n '$name' | grep Taxid | sed 's/Taxid://') && 10 taxid=\$(get_species_taxids.sh -n '$name' | grep Taxid | sed 's/Taxid\s*:\s*//') &&
11 if [ -z \$taxid ]; then 11 if [ -z "\$taxid" ]; then
12 >&2 echo "could not find taxid for $name" && exit 1; 12 >&2 echo "could not find taxid for $name" && exit 1;
13 else 13 else
14 echo " $name -> \$taxid"; 14 echo " $name -> \$taxid";
15 fi && 15 fi &&
16 get_species_taxids.sh -t \$taxid >> species_ids.txt && 16 get_species_taxids.sh -t "\$taxid" >> species_ids.txt &&
17 #end for 17 #end for
18 #else 18 #else
19 #for taxid in $type_cond.ids.split(',') 19 #for taxid in $type_cond.ids.split(',')
20 get_species_taxids.sh -t $taxid >> species_ids.txt && 20 get_species_taxids.sh -t "$taxid" >> species_ids.txt &&
21 #end for 21 #end for
22 #end if 22 #end if
23 sort -n -u species_ids.txt > '$output' 23 sort -n -u species_ids.txt > '$output'
24 ]]></command> 24 ]]></command>
25 <inputs> 25 <inputs>