Mercurial > repos > devteam > bwa
comparison bwa_macros.xml @ 8:cbc665adcde4 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bwa commit c355891532cecaab6b3288a148a6b3bcb5973396
| author | iuc |
|---|---|
| date | Fri, 24 Nov 2017 09:55:28 -0500 |
| parents | a4d167793afa |
| children | a628f5606f68 |
comparison
equal
deleted
inserted
replaced
| 7:c022e4a68b76 | 8:cbc665adcde4 |
|---|---|
| 1 <macros> | 1 <macros> |
| 2 <import>read_group_macros.xml</import> | 2 <import>read_group_macros.xml</import> |
| 3 | 3 |
| 4 <token name="@VERSION@">0.7.17</token> | 4 <token name="@VERSION@">0.7.17</token> |
| 5 | 5 |
| 6 <token name="@set_rg_string@"> | 6 <token name="@set_rg_string@"> |
| 7 #set $rg_string = "@RG\\tID:" + str($rg_id) | 7 #set $rg_string = "@RG\\tID:" + str($rg_id) |
| 8 #set $rg_string += $format_read_group("\\tSM:", $rg_sm) | 8 #set $rg_string += $format_read_group("\\tSM:", $rg_sm) |
| 9 #set $rg_string += $format_read_group("\\tPL:", $rg_pl) | 9 #set $rg_string += $format_read_group("\\tPL:", $rg_pl) |
| 10 #set $rg_string += $format_read_group("\\tLB:", $rg_lb) | 10 #set $rg_string += $format_read_group("\\tLB:", $rg_lb) |
| 11 #set $rg_string += $format_read_group("\\tCN:", $rg_cn) | 11 #set $rg_string += $format_read_group("\\tCN:", $rg_cn) |
| 12 #set $rg_string += $format_read_group("\\tDS:", $rg_ds) | 12 #set $rg_string += $format_read_group("\\tDS:", $rg_ds) |
| 13 #set $rg_string += $format_read_group("\\tDT:", $rg_dt) | 13 #set $rg_string += $format_read_group("\\tDT:", $rg_dt) |
| 14 #set $rg_string += $format_read_group("\\tFO:", $rg_fo) | 14 #set $rg_string += $format_read_group("\\tFO:", $rg_fo) |
| 15 #set $rg_string += $format_read_group("\\tKS:", $rg_ks) | 15 #set $rg_string += $format_read_group("\\tKS:", $rg_ks) |
| 16 #set $rg_string += $format_read_group("\\tPG:", $rg_pg) | 16 #set $rg_string += $format_read_group("\\tPG:", $rg_pg) |
| 17 #set $rg_string += $format_read_group("\\tPI:", $rg_pi) | 17 #set $rg_string += $format_read_group("\\tPI:", $rg_pi) |
| 18 #set $rg_string += $format_read_group("\\tPU:", $rg_pu) | 18 #set $rg_string += $format_read_group("\\tPU:", $rg_pu) |
| 19 </token> | 19 </token> |
| 20 | 20 |
| 21 <token name="@set_reference_fasta_filename@"><![CDATA[ | 21 <token name="@set_reference_fasta_filename@"><![CDATA[ |
| 22 #if str( $reference_source.reference_source_selector ) == "history": | 22 #if str( $reference_source.reference_source_selector ) == "history": |
| 23 #set $reference_fasta_filename = "localref.fa" | 23 #set $reference_fasta_filename = "localref.fa" |
| 24 ln -s "${reference_source.ref_file}" "${reference_fasta_filename}" && | 24 ln -s '${reference_source.ref_file}' '${reference_fasta_filename}' && |
| 25 bwa index | 25 bwa index |
| 26 #if str($reference_source.index_a) != 'auto' | 26 #if str($reference_source.index_a) != 'auto' |
| 27 -a ${reference_source.index_a} | 27 -a ${reference_source.index_a} |
| 28 #end if | 28 #end if |
| 29 "${reference_fasta_filename}" && | 29 '${reference_fasta_filename}' && |
| 30 #else: | 30 #else: |
| 31 #set $reference_fasta_filename = str( $reference_source.ref_file.fields.path ) | 31 #set $reference_fasta_filename = str( $reference_source.ref_file.fields.path ) |
| 32 #end if | 32 #end if |
| 33 ]]></token> | 33 ]]></token> |
| 34 | 34 |
| 35 <xml name="requirements"> | 35 <xml name="requirements"> |
| 36 <requirements> | 36 <requirements> |
| 37 <requirement type="package" version="@VERSION@">bwa</requirement> | 37 <requirement type="package" version="@VERSION@">bwa</requirement> |
| 38 <requirement type="package" version="1.5">samtools</requirement> | 38 <requirement type="package" version="1.6">samtools</requirement> |
| 39 </requirements> | 39 </requirements> |
| 40 </xml> | 40 </xml> |
| 41 | 41 |
| 42 <xml name="stdio"> | 42 <xml name="stdio"> |
| 43 <stdio> | 43 <stdio> |
| 44 <exit_code range="1:" /> | 44 <exit_code range="1:" /> |
| 45 <exit_code range=":-1" /> | 45 <exit_code range=":-1" /> |
| 46 <regex match="Error:" /> | 46 <regex match="Error:" /> |
| 47 <regex match="Exception:" /> | 47 <regex match="Exception:" /> |
| 48 </stdio> | 48 </stdio> |
| 49 </xml> | 49 </xml> |
| 50 | 50 |
| 51 <macro name="reference_source_conditional"> | 51 <macro name="reference_source_conditional"> |
| 52 <conditional name="reference_source"> | 52 <conditional name="reference_source"> |
| 53 <param name="reference_source_selector" type="select" label="Will you select a reference genome from your history or use a built-in index?" help="Built-ins were indexed using default options. See `Indexes` section of help below"> | 53 <param name="reference_source_selector" type="select" label="Will you select a reference genome from your history or use a built-in index?" help="Built-ins were indexed using default options. See `Indexes` section of help below"> |
| 54 <option value="cached">Use a built-in genome index</option> | 54 <option value="cached">Use a built-in genome index</option> |
| 55 <option value="history">Use a genome from history and build index</option> | 55 <option value="history">Use a genome from history and build index</option> |
| 56 </param> | 56 </param> |
| 57 <when value="cached"> | 57 <when value="cached"> |
| 58 <param name="ref_file" type="select" label="Using reference genome" help="Select genome from the list"> | 58 <param name="ref_file" type="select" label="Using reference genome" help="Select genome from the list"> |
| 59 <options from_data_table="bwa_mem_indexes"> | 59 <options from_data_table="bwa_mem_indexes"> |
| 60 <filter type="sort_by" column="2" /> | 60 <filter type="sort_by" column="2" /> |
| 61 <validator type="no_options" message="No indexes are available" /> | 61 <validator type="no_options" message="No indexes are available" /> |
| 62 </options> | 62 </options> |
| 63 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/> | 63 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/> |
| 64 </param> | 64 </param> |
| 65 </when> | 65 </when> |
| 66 <when value="history"> | 66 <when value="history"> |
| 67 <param name="ref_file" type="data" format="fasta" label="Use the following dataset as the reference sequence" help="You can upload a FASTA sequence to the history and use it as reference" /> | 67 <param name="ref_file" type="data" format="fasta" label="Use the following dataset as the reference sequence" help="You can upload a FASTA sequence to the history and use it as reference" /> |
| 68 <param name="index_a" type="select" label="Algorithm for constructing the BWT index" help="(-a)"> | 68 <param name="index_a" type="select" label="Algorithm for constructing the BWT index" help="(-a)"> |
| 69 <option value="auto">Auto. Let BWA decide the best algorithm to use</option> | 69 <option value="auto">Auto. Let BWA decide the best algorithm to use</option> |
| 70 <option value="is">IS linear-time algorithm for constructing suffix array. It requires 5.37N memory where N is the size of the database. IS is moderately fast, but does not work with database larger than 2GB</option> | 70 <option value="is">IS linear-time algorithm for constructing suffix array. It requires 5.37N memory where N is the size of the database. IS is moderately fast, but does not work with database larger than 2GB</option> |
| 71 <option value="bwtsw">BWT-SW algorithm. This method works also with big genomes</option> | 71 <option value="bwtsw">BWT-SW algorithm. This method works also with big genomes</option> |
| 72 </param> | 72 </param> |
| 73 </when> | 73 </when> |
| 74 </conditional> | 74 </conditional> |
| 75 </macro> | 75 </macro> |
| 76 | 76 |
| 77 <macro name="dbKeyActionsBwa"> | 77 <macro name="dbKeyActionsBwa"> |
| 78 <expand macro="dbKeyActions"> | 78 <expand macro="dbKeyActions"> |
| 79 <option type="from_data_table" name="bwa_indexes" column="1" offset="0"> | 79 <option type="from_data_table" name="bwa_indexes" column="1" offset="0"> |
| 80 <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/> | 80 <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/> |
| 81 <filter type="param_value" ref="reference_source.ref_file" column="0"/> | 81 <filter type="param_value" ref="reference_source.ref_file" column="0"/> |
| 82 </option> | 82 </option> |
| 83 </expand> | 83 </expand> |
| 84 </macro> | 84 </macro> |
| 85 | 85 |
| 86 <macro name="dbKeyActionsBwaMem"> | 86 <macro name="dbKeyActionsBwaMem"> |
| 87 <expand macro="dbKeyActions"> | 87 <expand macro="dbKeyActions"> |
| 88 <option type="from_data_table" name="bwa_mem_indexes" column="1" offset="0"> | 88 <option type="from_data_table" name="bwa_mem_indexes" column="1" offset="0"> |
| 89 <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/> | 89 <filter type="param_value" column="0" value="#" compare="startswith" keep="False"/> |
| 90 <filter type="param_value" ref="reference_source.ref_file" column="0"/> | 90 <filter type="param_value" ref="reference_source.ref_file" column="0"/> |
| 91 </option> | 91 </option> |
| 92 </expand> | 92 </expand> |
| 93 </macro> | 93 </macro> |
| 94 | 94 |
| 95 <macro name="dbKeyActions"> | 95 <macro name="dbKeyActions"> |
| 96 <actions> | 96 <actions> |
| 97 <conditional name="reference_source.reference_source_selector"> | 97 <conditional name="reference_source.reference_source_selector"> |
| 98 <when value="cached"> | 98 <when value="cached"> |
| 99 <action type="metadata" name="dbkey"> | 99 <action type="metadata" name="dbkey"> |
| 100 <yield /> | 100 <yield /> |
| 101 </action> | 101 </action> |
| 102 </when> | 102 </when> |
| 103 <when value="history"> | 103 <when value="history"> |
| 104 <action type="metadata" name="dbkey"> | 104 <action type="metadata" name="dbkey"> |
| 105 <option type="from_param" name="reference_source.ref_file" param_attribute="dbkey" /> | 105 <option type="from_param" name="reference_source.ref_file" param_attribute="dbkey" /> |
| 106 </action> | 106 </action> |
| 107 </when> | 107 </when> |
| 108 </conditional> | 108 </conditional> |
| 109 </actions> | 109 </actions> |
| 110 </macro> | 110 </macro> |
| 111 | 111 |
| 112 <token name="@RG@"> | 112 <token name="@RG@"> |
| 113 ----- | 113 ----- |
| 114 | 114 |
| 115 .. class:: warningmark | 115 .. class:: warningmark |
| 116 | 116 |
| 117 **Read Groups are Important!** | 117 **Read Groups are Important!** |
| 158 @RG ID:FLOWCELL2.LANE2 PL:illumina LB:LIB-KID-1 SM:KID PI:200 | 158 @RG ID:FLOWCELL2.LANE2 PL:illumina LB:LIB-KID-1 SM:KID PI:200 |
| 159 @RG ID:FLOWCELL2.LANE3 PL:illumina LB:LIB-KID-2 SM:KID PI:400 | 159 @RG ID:FLOWCELL2.LANE3 PL:illumina LB:LIB-KID-2 SM:KID PI:400 |
| 160 @RG ID:FLOWCELL2.LANE4 PL:illumina LB:LIB-KID-2 SM:KID PI:400 | 160 @RG ID:FLOWCELL2.LANE4 PL:illumina LB:LIB-KID-2 SM:KID PI:400 |
| 161 | 161 |
| 162 Note the hierarchical relationship between read groups (unique for each lane) to libraries (sequenced on two lanes) and samples (across four lanes, two lanes for each library). | 162 Note the hierarchical relationship between read groups (unique for each lane) to libraries (sequenced on two lanes) and samples (across four lanes, two lanes for each library). |
| 163 </token> | 163 </token> |
| 164 <token name="@info@"> | 164 <token name="@info@"> |
| 165 ----- | 165 ----- |
| 166 | 166 |
| 167 .. class:: infomark | 167 .. class:: infomark |
| 168 | 168 |
| 169 **More info** | 169 **More info** |
| 173 1. https://biostar.usegalaxy.org/ | 173 1. https://biostar.usegalaxy.org/ |
| 174 2. https://www.biostars.org/ | 174 2. https://www.biostars.org/ |
| 175 3. https://github.com/lh3/bwa | 175 3. https://github.com/lh3/bwa |
| 176 4. http://bio-bwa.sourceforge.net/ | 176 4. http://bio-bwa.sourceforge.net/ |
| 177 | 177 |
| 178 </token> | 178 </token> |
| 179 | |
| 180 <token name="@dataset_collections@"> | |
| 181 ------ | |
| 182 | |
| 183 **Dataset collections - processing large numbers of datasets at once** | |
| 184 | |
| 185 Dataset collections are in beta-testing. Extensive documentation will be added later this Spring. | |
| 186 | |
| 187 | |
| 188 </token> | |
| 189 | |
| 190 </macros> | 179 </macros> |
