Mercurial > repos > iuc > bcftools_consensus
comparison bcftools_consensus.xml @ 12:91c3ed51093d draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bcftools commit 3c56c04b42c70a072429e4534a136dc28c98b642"
| author | iuc |
|---|---|
| date | Wed, 23 Oct 2019 19:09:14 -0400 |
| parents | 130789161fcc |
| children | f56a1a62cb12 |
comparison
equal
deleted
inserted
replaced
| 11:c4ed8e4032d5 | 12:91c3ed51093d |
|---|---|
| 1 <?xml version='1.0' encoding='utf-8'?> | 1 <?xml version='1.0' encoding='utf-8'?> |
| 2 <tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@TOOL_VERSION@+galaxy1"> | 2 <tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@TOOL_VERSION@+galaxy2"> |
| 3 <description>Create consensus sequence by applying VCF variants to a reference fasta file</description> | 3 <description>Create consensus sequence by applying VCF variants to a reference fasta file</description> |
| 4 <macros> | 4 <macros> |
| 5 <token name="@EXECUTABLE@">consensus</token> | 5 <token name="@EXECUTABLE@">consensus</token> |
| 6 <import>macros.xml</import> | 6 <import>macros.xml</import> |
| 7 </macros> | 7 </macros> |
| 8 <expand macro="requirements"> | 8 <expand macro="requirements"> |
| 9 <expand macro="samtools_requirement"/> | 9 <expand macro="samtools_requirement"/> |
| 10 <requirement type="package" version="5.0.1">gawk</requirement> | |
| 10 </expand> | 11 </expand> |
| 11 <expand macro="version_command" /> | 12 <expand macro="version_command" /> |
| 12 <command detect_errors="aggressive"><![CDATA[ | 13 <command detect_errors="aggressive"><![CDATA[ |
| 13 @PREPARE_ENV@ | 14 @PREPARE_ENV@ |
| 14 @PREPARE_INPUT_FILE@ | 15 @PREPARE_INPUT_FILE@ |
| 23 #set $section = $sec_default | 24 #set $section = $sec_default |
| 24 | 25 |
| 25 ${section.iupac_codes} | 26 ${section.iupac_codes} |
| 26 | 27 |
| 27 #if $section.mask: | 28 #if $section.mask: |
| 28 --mask "${section.mask}" | 29 --mask '${section.mask}' |
| 29 #end if | 30 #end if |
| 30 | 31 |
| 31 #if $section.select_haplotype: | 32 #if $section.select_haplotype: |
| 32 --haplotype "${section.select_haplotype}" | 33 --haplotype '${section.select_haplotype}' |
| 33 #end if | 34 #end if |
| 34 @SAMPLE@ | 35 @SAMPLE@ |
| 35 | 36 |
| 36 #if $chain: | 37 #if $chain: |
| 37 --chain "$chain_file" | 38 --chain '$chain_file' |
| 38 #end if | 39 #end if |
| 39 | 40 |
| 40 ## Primary Input/Outputs | 41 ## Primary Input/Outputs |
| 41 --output "$output_file" | 42 #if str($rename) == "no" |
| 43 --output '$output_file' | |
| 44 #end if | |
| 42 @INPUT_FILE@ | 45 @INPUT_FILE@ |
| 46 #if str($rename) == "yes": | |
| 47 #set basename=$input_file.element_identifier | |
| 48 | awk 'BEGIN {i=1} {if (match($0, /^>/)) {if (i==1) {name="${basename}"} else {name=sprintf("%s-%d","${basename}",i);} print(gensub(/>[^ ]+( ?.*)/, ">" name "\\1", 1)); i=i+1;} else {print}}' > '$output_file' | |
| 49 #end if | |
| 43 ]]> | 50 ]]> |
| 44 </command> | 51 </command> |
| 45 <inputs> | 52 <inputs> |
| 46 <expand macro="macro_input" /> | 53 <expand macro="macro_input" /> |
| 47 <expand macro="macro_fasta_ref" /> | 54 <expand macro="macro_fasta_ref" /> |
| 54 <option value="1">1</option> | 61 <option value="1">1</option> |
| 55 <option value="2">2</option> | 62 <option value="2">2</option> |
| 56 </param> | 63 </param> |
| 57 </section> | 64 </section> |
| 58 <param name="chain" type="boolean" truevalue="yes" falsevalue="no" label="Write a chain file for liftover" /> | 65 <param name="chain" type="boolean" truevalue="yes" falsevalue="no" label="Write a chain file for liftover" /> |
| 66 <param name="rename" type="boolean" truevalue="yes" falsevalue="no" label="Set output FASTA ID from name of VCF" /> | |
| 59 </inputs> | 67 </inputs> |
| 60 <outputs> | 68 <outputs> |
| 61 <data name="output_file" format="fasta" label="${tool.name} on ${on_string}: consensus fasta"/> | 69 <data name="output_file" format="fasta" label="${tool.name} on ${on_string}: consensus fasta"/> |
| 62 <data name="chain_file" format="txt" label="${tool.name} on ${on_string}: chain"> | 70 <data name="chain_file" format="txt" label="${tool.name} on ${on_string}: chain"> |
| 63 <filter>chain</filter> | 71 <filter>chain</filter> |
| 94 <assert_contents> | 102 <assert_contents> |
| 95 <has_text text="chain 497 1 501 + 1 501 1 502 + 1 502 1" /> | 103 <has_text text="chain 497 1 501 + 1 501 1 502 + 1 502 1" /> |
| 96 </assert_contents> | 104 </assert_contents> |
| 97 </output> | 105 </output> |
| 98 </test> | 106 </test> |
| 107 <test> | |
| 108 <expand macro="test_using_reference" ref="consensus.fa" /> | |
| 109 <param name="input_file" ftype="vcf" value="consensus.vcf" /> | |
| 110 <param name="mask" ftype="tabular" value="consensus.tab" /> | |
| 111 <param name="chain" value="False" /> | |
| 112 <param name="rename" value="True" /> | |
| 113 <output name="output_file"> | |
| 114 <assert_contents> | |
| 115 <has_text text=">consensus.vcf" /> | |
| 116 </assert_contents> | |
| 117 <assert_contents> | |
| 118 <has_text text=">consensus.vcf-2" /> | |
| 119 </assert_contents> | |
| 120 </output> | |
| 121 </test> | |
| 99 </tests> | 122 </tests> |
| 100 <help><![CDATA[ | 123 <help><![CDATA[ |
| 101 ===================================== | 124 ===================================== |
| 102 bcftools @EXECUTABLE@ plugin | 125 bcftools @EXECUTABLE@ plugin |
| 103 ===================================== | 126 ===================================== |
| 106 Create consensus sequence by applying VCF variants to a reference fasta file. | 129 Create consensus sequence by applying VCF variants to a reference fasta file. |
| 107 | 130 |
| 108 @BCFTOOLS_MANPAGE@#@EXECUTABLE@ | 131 @BCFTOOLS_MANPAGE@#@EXECUTABLE@ |
| 109 | 132 |
| 110 @BCFTOOLS_WIKI@ | 133 @BCFTOOLS_WIKI@ |
| 134 | |
| 135 The option to set the new consensus' FASTA ID from the name of the VCF is provided by post-processing | |
| 136 the bcftools consensus output. It is primarily intended for use when the VCF is coming from a list | |
| 137 collection where the elements of the list are named meaningfully (e.g. named after sample names). This | |
| 138 is useful when consensus sequences are being prepared for, for example, feeding a multiple sequence | |
| 139 alignment to a phylogeny program. | |
| 111 ]]> | 140 ]]> |
| 112 </help> | 141 </help> |
| 113 <expand macro="citations" /> | 142 <expand macro="citations" /> |
| 114 </tool> | 143 </tool> |
