Skip to content

Commit

Permalink
get_species_taxids: fix sed
Browse files Browse the repository at this point in the history
there seem to be now spaces around `:`

also add some quotes
  • Loading branch information
bernt-matthias authored and peterjc committed Nov 19, 2023
1 parent d63652a commit 2dd12dc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions tools/ncbi_blast_plus/get_species_taxids.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
<command detect_errors="aggressive"><![CDATA[
#if $type_cond.type_sel == 'names'
#for name in $type_cond.names.split(',')
taxid=\$(get_species_taxids.sh -n '$name' | grep Taxid | sed 's/Taxid://') &&
if [ -z \$taxid ]; then
taxid=\$(get_species_taxids.sh -n '$name' | grep Taxid | sed 's/Taxid\s*:\s*//') &&
if [ -z "\$taxid" ]; then
>&2 echo "could not find taxid for $name" && exit 1;
else
echo " $name -> \$taxid";
fi &&
get_species_taxids.sh -t \$taxid >> species_ids.txt &&
get_species_taxids.sh -t "\$taxid" >> species_ids.txt &&
#end for
#else
#for taxid in $type_cond.ids.split(',')
get_species_taxids.sh -t $taxid >> species_ids.txt &&
get_species_taxids.sh -t "$taxid" >> species_ids.txt &&
#end for
#end if
sort -n -u species_ids.txt > '$output'
Expand Down
2 changes: 1 addition & 1 deletion tools/ncbi_blast_plus/ncbi_macros.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<macros>
<token name="@TOOL_VERSION@">2.14.1</token>
<token name="@VERSION_SUFFIX@">0</token>
<token name="@VERSION_SUFFIX@">1</token>
<token name="@PROFILE@">16.10</token>
<xml name="parallelism">
<!-- If job splitting is enabled, break up the query file into parts -->
Expand Down

0 comments on commit 2dd12dc

Please sign in to comment.