Mercurial > repos > bgruening > sylph_query
comparison macros.xml @ 0:d2a4c2cb8779 draft default tip
planemo upload for repository https://github.com/bgruening/galaxytools/main/tools/sylph commit 6ac2834ca0a21512c9986e2fb8d0dcda1c4b0e18
| author | bgruening |
|---|---|
| date | Fri, 23 May 2025 09:49:04 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:d2a4c2cb8779 |
|---|---|
| 1 <macros> | |
| 2 <token name="@TOOL_VERSION@">0.8.1</token> | |
| 3 <token name="@VERSION_SUFFIX@">0</token> | |
| 4 <token name="@LICENSE@">MIT</token> | |
| 5 <token name="@DB_SELECTOR@"><![CDATA[ | |
| 6 #if $database_select.select == 'cached' or $database_select.select == 'cached_and_custom': | |
| 7 #set $databases = str($database_select.sylph_database.fields.path).split(',') | |
| 8 #for $number, $current_db in enumerate($databases): | |
| 9 #set $db_name = str($number) + "_sylph_database.syldb" | |
| 10 ln -s '$current_db' '$db_name' && | |
| 11 #end for | |
| 12 #end if | |
| 13 | |
| 14 #if $database_select.select == 'cached' | |
| 15 #set $metadata = str($database_select.sylph_database.fields.sylph_tax_identifier).split(',') | |
| 16 #set metadata_files = '' | |
| 17 #for $number, $current_metadata in enumerate($metadata): | |
| 18 #set metadata_files = str($metadata_files) + str($current_metadata) + ' ' | |
| 19 #end for | |
| 20 #end if | |
| 21 | |
| 22 ]]></token> | |
| 23 <token name="@SINGLE_INPUT_FASTQ@"><![CDATA[ | |
| 24 #if $sketch_reads.input.ext == 'fastqsanger' | |
| 25 #set $ext = 'fastq' | |
| 26 #else if $sketch_reads.input.ext == 'fastqsanger.gz': | |
| 27 #set $ext = 'fastq.gz' | |
| 28 #else: | |
| 29 #set $ext = str($sketch_reads.input.ext) | |
| 30 #end if | |
| 31 #if $sketch_reads.input.element_identifier.endswith('.fastq') or $sketch_reads.input.element_identifier.endswith('.fastq.gz'): | |
| 32 #set $input = re.sub(r'\s+', '_', $sketch_reads.input.element_identifier) | |
| 33 #else: | |
| 34 #set $input = re.sub(r'\s+', '_', $sketch_reads.input.element_identifier + '.' + str($ext)) | |
| 35 #end if | |
| 36 ln -s '$sketch_reads.input' '$input' && | |
| 37 ]]></token> | |
| 38 <token name="@SINGLE_GROUP_FASTQ@"><![CDATA[ | |
| 39 #set input = '' | |
| 40 #for $number, $current_file in enumerate($sketch_reads.input): | |
| 41 #if $current_file.ext == 'fastqsanger' | |
| 42 #set $ext = 'fastq' | |
| 43 #else if $current_file.ext == 'fastqsanger.gz': | |
| 44 #set $ext = 'fastq.gz' | |
| 45 #else: | |
| 46 #set $ext = str($current_file.ext) | |
| 47 #end if | |
| 48 #if $current_file.element_identifier.endswith('.fastq') or $current_file.element_identifier.endswith('.fastq.gz'): | |
| 49 #set $current_input = re.sub(r'\s+', '_', $current_file.element_identifier) | |
| 50 #else: | |
| 51 #set $current_input = re.sub(r'\s+', '_', $current_file.element_identifier + '.' + str($ext)) | |
| 52 #end if | |
| 53 ln -s '${current_file}' '$current_input' && | |
| 54 #set input = str($input) + ' ' + str($current_input) | |
| 55 #end for | |
| 56 ]]></token> | |
| 57 <token name="@PAIRED@"><![CDATA[ | |
| 58 #if $sketch_reads.input_1.ext == 'fastqsanger' | |
| 59 #set $ext_1 = 'fastq' | |
| 60 #else if $sketch_reads.input_1.ext == 'fastqsanger.gz': | |
| 61 #set $ext_1 = 'fastq.gz' | |
| 62 #else: | |
| 63 #set $ext_1 = str($sketch_reads.input_1.ext) | |
| 64 #end if | |
| 65 | |
| 66 #if $sketch_reads.input_2.ext == 'fastqsanger' | |
| 67 #set $ext_2 = 'fastq' | |
| 68 #else if $sketch_reads.input_2.ext == 'fastqsanger.gz': | |
| 69 #set $ext_2 = 'fastq.gz' | |
| 70 #else: | |
| 71 #set $ext_2 = str($sketch_reads.input_2.ext) | |
| 72 #end if | |
| 73 | |
| 74 #if $sketch_reads.input_1.element_identifier.endswith('.fastq') or $sketch_reads.input_1.element_identifier.endswith('.fastq.gz'): | |
| 75 #set $read1 = re.sub(r'\s+', '_', $sketch_reads.input_1.element_identifier) | |
| 76 #else: | |
| 77 #set $read1 = re.sub(r'\s+', '_', str($sketch_reads.input_1.element_identifier) + '.' + str($ext_1)) | |
| 78 #end if | |
| 79 #if $sketch_reads.input_2.element_identifier.endswith('.fastq') or $sketch_reads.input_2.element_identifier.endswith('.fastq.gz'): | |
| 80 #set $read2 = re.sub(r'\s+', '_', $sketch_reads.input_2.element_identifier) | |
| 81 #else: | |
| 82 #set $read2 = re.sub(r'\s+', '_', str($sketch_reads.input_2.element_identifier) + '.' + str($ext_2)) | |
| 83 #end if | |
| 84 ln -s '$sketch_reads.input_1' '$read1' && | |
| 85 ln -s '$sketch_reads.input_2' '$read2' && | |
| 86 ]]></token> | |
| 87 <token name="@PAIRED_GROUP@"><![CDATA[ | |
| 88 #if $sketch_reads.input.forward.ext == 'fastqsanger' | |
| 89 #set $ext_1 = 'fastq' | |
| 90 #else if $sketch_reads.input.forward.ext == 'fastqsanger.gz': | |
| 91 #set $ext_1 = 'fastq.gz' | |
| 92 #else: | |
| 93 #set $ext_1 = str($sketch_reads.input.forward.ext) | |
| 94 #end if | |
| 95 | |
| 96 #if $sketch_reads.input.reverse.ext == 'fastqsanger' | |
| 97 #set $ext_2 = 'fastq' | |
| 98 #else if $sketch_reads.input.reverse.ext == 'fastqsanger.gz': | |
| 99 #set $ext_2 = 'fastq.gz' | |
| 100 #else: | |
| 101 #set $ext_2 = str($sketch_reads.input.reverse.ext) | |
| 102 #end if | |
| 103 | |
| 104 #set $read1 = re.sub(r'\s+', '_', str($sketch_reads.input.element_identifier) + '.' + str($ext_1)) | |
| 105 #set $read2 = re.sub(r'\s+', '_', str($sketch_reads.input.element_identifier) + '_r2.' + str($ext_2)) | |
| 106 ln -s '$sketch_reads.input.forward' '$read1' && | |
| 107 ln -s '$sketch_reads.input.reverse' '$read2' && | |
| 108 ]]></token> | |
| 109 <token name="@SINGLE_INPUT_FASTA@"><![CDATA[ | |
| 110 #if $sketch_fasta.input.ext == 'fasta' | |
| 111 #set $ext = 'fasta' | |
| 112 #else if $sketch_fasta.input.ext == 'fasta.gz': | |
| 113 #set $ext = 'fasta.gz' | |
| 114 #else: | |
| 115 #set $ext = str($sketch_fasta.input.ext) | |
| 116 #end if | |
| 117 #if $sketch_fasta.input.element_identifier.endswith('.fasta') or $sketch_fasta.input.element_identifier.endswith('.fasta.gz'): | |
| 118 #set $input = re.sub(r'\s+', '_', $sketch_fasta.input.element_identifier) | |
| 119 #else: | |
| 120 #set $input = re.sub(r'\s+', '_', $sketch_fasta.input.element_identifier + '.' + str($ext)) | |
| 121 #end if | |
| 122 ln -s '$sketch_fasta.input' '$input' && | |
| 123 ]]></token> | |
| 124 <token name="@SINGLE_GROUP_FASTA@"><![CDATA[ | |
| 125 #set input = '' | |
| 126 #for $number, $current_file in enumerate($sketch_fasta.input): | |
| 127 #if $sketch_fasta.input.ext == 'fasta' | |
| 128 #set $ext = 'fasta' | |
| 129 #else if $sketch_fasta.input.ext == 'fasta.gz': | |
| 130 #set $ext = 'fasta.gz' | |
| 131 #else: | |
| 132 #set $ext = str($current_file.ext) | |
| 133 #end if | |
| 134 #if $current_file.element_identifier.endswith('.fasta') or $current_file.element_identifier.endswith('.fasta.gz'): | |
| 135 #set $current_input = re.sub(r'\s+', '_', $current_file.element_identifier) | |
| 136 #else: | |
| 137 #set $current_input = re.sub(r'\s+', '_', $current_file.element_identifier + '.' + str($ext)) | |
| 138 #end if | |
| 139 ln -s '${current_file}' '$current_input' && | |
| 140 #set input = str($input) + ' ' + str($current_input) | |
| 141 #end for | |
| 142 ]]></token> | |
| 143 <xml name="requirements"> | |
| 144 <requirements> | |
| 145 <requirement type="package" version="@TOOL_VERSION@">sylph</requirement> | |
| 146 <requirement type="package" version="3.11">python</requirement> | |
| 147 <requirement type="package" version="2.2">pandas</requirement> | |
| 148 <yield /> | |
| 149 </requirements> | |
| 150 </xml> | |
| 151 <xml name="citation"> | |
| 152 <citations> | |
| 153 <citation type="doi">10.1038/s41587-024-02412-y</citation> | |
| 154 </citations> | |
| 155 </xml> | |
| 156 <xml name="creator"> | |
| 157 <creator> | |
| 158 <person givenName="Tyler" familyName="Collins"/> | |
| 159 <person givenName="Alexander" familyName="Ostrovsky"/> | |
| 160 <person givenName="Hugo" familyName="Lefeuvre"/> | |
| 161 </creator> | |
| 162 </xml> | |
| 163 <xml name="xrefs"> | |
| 164 <xrefs> | |
| 165 <xref type="bio.tools">sylph</xref> | |
| 166 </xrefs> | |
| 167 </xml> | |
| 168 <xml name="input_database"> | |
| 169 <when value="custom"> | |
| 170 <conditional name="sketch_fasta"> | |
| 171 <param name="type_fasta" type="select" label="Select the type of fasta used"> | |
| 172 <option value="single_fasta">Individual fasta files</option> | |
| 173 <option value="single_group_fasta">Group of fasta files</option> | |
| 174 </param> | |
| 175 <when value="single_fasta"> | |
| 176 <param name="input" type="data" format="fasta,fasta.gz" label="Fasta files"/> | |
| 177 </when> | |
| 178 <when value="single_group_fasta"> | |
| 179 <param name="input" type="data" format="fasta,fasta.gz" label="Fasta files" multiple="true"/> | |
| 180 </when> | |
| 181 </conditional> | |
| 182 <param name="compression" type="integer" min="0" value="200" label="Compression" help="Memory/runtime scale like 1/c; higher c is faster but less sensitive at low coverage. The -c for genomes must be than >= the -c for reads (strict > is allowed) (-c)" /> | |
| 183 <param name="grouped_genomes" type="boolean" checked="false" label="Creating a database of contigs or if genomes are all in one fasta file" truevalue="Yes" falsevalue="No" help="Considers every record in a fasta (i.e. contig) as a genome (-i)" /> | |
| 184 </when> | |
| 185 <when value="cached_and_custom"> | |
| 186 <param label="Select a sylph database" name="sylph_database" type="select" multiple="true" optional="false"> | |
| 187 <options from_data_table="sylph_databases"> | |
| 188 <filter type="static_value" value="1" column="version"/> | |
| 189 <validator message="No Sylph databases are available" type="no_options" /> | |
| 190 </options> | |
| 191 </param> | |
| 192 <conditional name="sketch_fasta"> | |
| 193 <param name="type_fasta" type="select" label="Select the type of fasta used"> | |
| 194 <option value="single_fasta">Individual fasta files</option> | |
| 195 <option value="single_group_fasta">Group of fasta files</option> | |
| 196 </param> | |
| 197 <when value="single_fasta"> | |
| 198 <param name="input" type="data" format="fasta,fasta.gz" label="Fasta files"/> | |
| 199 </when> | |
| 200 <when value="single_group_fasta"> | |
| 201 <param name="input" type="data" format="fasta,fasta.gz" label="Fasta files" multiple="true"/> | |
| 202 </when> | |
| 203 </conditional> | |
| 204 <param name="compression" type="integer" min="0" value="200" label="Compression" help="Memory/runtime scale like 1/c; higher c is faster but less sensitive at low coverage. The -c for genomes must be than >= the -c for reads (strict > is allowed) (-c)" /> | |
| 205 <param name="grouped_genomes" type="boolean" checked="false" label="Creating a database of contigs or if genomes are all in one fasta file" truevalue="Yes" falsevalue="No" help="Considers every record in a fasta (i.e. contig) as a genome (-i)" /> | |
| 206 </when> | |
| 207 </xml> | |
| 208 <xml name="element_assert" token_name="" token_text=""> | |
| 209 <element name="@NAME@"> | |
| 210 <assert_contents> | |
| 211 <has_text text="@TEXT@"/> | |
| 212 <yield/> | |
| 213 </assert_contents> | |
| 214 </element> | |
| 215 </xml> | |
| 216 </macros> |
