Mercurial > repos > iuc > lexicmap
comparison lexicmap.xml @ 5:f0e5afff062b draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/lexicmap commit 45c03ff07e2d5bba1d490a67434347ec17eb30f4
| author | iuc |
|---|---|
| date | Thu, 22 Jan 2026 09:42:53 +0000 |
| parents | feedc23590ad |
| children |
comparison
equal
deleted
inserted
replaced
| 4:feedc23590ad | 5:f0e5afff062b |
|---|---|
| 11 #set INDICES = [db.extra_files_path for db in $db_opts.histdb] | 11 #set INDICES = [db.extra_files_path for db in $db_opts.histdb] |
| 12 #else: | 12 #else: |
| 13 #set INDICES = $db_opts.lexicmap_index.fields.path.split(",") | 13 #set INDICES = $db_opts.lexicmap_index.fields.path.split(",") |
| 14 #end if | 14 #end if |
| 15 | 15 |
| 16 extract_query_ids() { | |
| 17 local input_files="\$1"; | |
| 18 local query_ids=""; | |
| 19 IFS=',' read -ra files <<< "\$input_files"; | |
| 20 query_ids=""; | |
| 21 for query_file in "\${files[@]}"; do | |
| 22 if file --mime-type "\$query_file" | grep -q "gzip"; then | |
| 23 query_ids+=\$(zcat "\$query_file" | grep '^>' | while IFS= read -r line; do clean="\${line#>}"; echo "\${clean%% *}>"; done); | |
| 24 else | |
| 25 query_ids+=\$(cat "\$query_file" | grep '^>' | while IFS= read -r line; do clean="\${line#>}"; echo "\${clean%% *}>"; done); | |
| 26 fi | |
| 27 done; | |
| 28 declare -g -a query_array=(); | |
| 29 IFS='>' read -r -a query_array <<< "\$query_ids"; | |
| 30 } | |
| 31 && | |
| 32 #for $counter, $index in enumerate($INDICES): | 16 #for $counter, $index in enumerate($INDICES): |
| 17 set -eu; | |
| 33 lexicmap search | 18 lexicmap search |
| 34 | |
| 35 --threads "\${GALAXY_SLOTS:-1}" | 19 --threads "\${GALAXY_SLOTS:-1}" |
| 36 | |
| 37 ${load_whole_seeds} | 20 ${load_whole_seeds} |
| 38 ${all} | 21 ${all} |
| 39 | 22 |
| 40 --index '${index}' | 23 --index '${index}' |
| 41 | 24 |
| 68 #end if | 51 #end if |
| 69 && | 52 && |
| 70 #end for | 53 #end for |
| 71 | 54 |
| 72 #if len($INDICES) > 1 | 55 #if len($INDICES) > 1 |
| 56 query_ids=""; | |
| 57 #for $query_file in $query | |
| 58 #if $query_file.is_of_type("fasta.gz") | |
| 59 query_ids+=\$(zcat '$query_file' | grep '^>' | while IFS= read -r line; do clean="\${line#>}"; echo "\${clean%% *}>"; done); | |
| 60 #else | |
| 61 query_ids+=\$(cat '$query_file' | grep '^>' | while IFS= read -r line; do clean="\${line#>}"; echo "\${clean%% *}>"; done); | |
| 62 #end if | |
| 63 #end for | |
| 64 IFS='>' read -r -a query_array <<< "\$query_ids"; | |
| 73 counter=0 && | 65 counter=0 && |
| 74 extract_query_ids '$query' && | |
| 75 for ((i=0; i<\${#query_array[@]}; i++)); do | 66 for ((i=0; i<\${#query_array[@]}; i++)); do |
| 76 counter=\$((counter + 1)); | 67 counter=\$((counter + 1)); |
| 77 lexicmap utils merge-search-results | 68 lexicmap utils merge-search-results |
| 78 --out-file "combined_result.\${counter}.tsv" | 69 --out-file "combined_result.\${counter}.tsv" |
| 79 -q "\${query_array[\$i]}" lexicmap_search_result__index*.tsv | 70 -q "\${query_array[\$i]}" lexicmap_search_result__index*.tsv |
| 83 #else | 74 #else |
| 84 mv lexicmap_search_result__index0.tsv '$out_file' | 75 mv lexicmap_search_result__index0.tsv '$out_file' |
| 85 #end if | 76 #end if |
| 86 ]]></command> | 77 ]]></command> |
| 87 <inputs> | 78 <inputs> |
| 88 <param name="query" type="data" format="fasta.gz" label="LexicMap query file" multiple="true" help=""/> | 79 <param name="query" type="data" format="@FASTA_TYPES@" label="LexicMap query file" multiple="true" help=""/> |
| 89 <conditional name="db_opts"> | 80 <conditional name="db_opts"> |
| 90 <param name="db_opts_selector" type="select" label="LexiMap index source"> | 81 <param name="db_opts_selector" type="select" label="LexiMap index source"> |
| 91 <option value="histdb">From your history</option> | 82 <option value="histdb">From your history</option> |
| 92 <option value="db" selected="true">Locally installed LexicMap indexes</option> | 83 <option value="db" selected="true">Locally installed LexicMap indexes</option> |
| 93 </param> | 84 </param> |
