Mercurial > repos > greg > vsnp_add_zero_coverage
annotate vsnp_add_zero_coverage.xml @ 13:fe12add47a23 draft default tip
"planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_add_zero_coverage commit 7f5ebaad2e650c53a8980e8567fe9943f9ccabb6"
| author | greg | 
|---|---|
| date | Mon, 15 Nov 2021 23:13:29 +0000 | 
| parents | 4f68ac34612d | 
| children | 
| rev | line source | 
|---|---|
| 6 | 1 <tool id="vsnp_add_zero_coverage" name="vSNP: add zero coverage" version="@WRAPPER_VERSION@.2+galaxy0" profile="@PROFILE@"> | 
| 0 | 2 <description></description> | 
| 2 | 3 <macros> | 
| 4 <import>macros.xml</import> | |
| 5 </macros> | |
| 0 | 6 <requirements> | 
| 7 | 7 <expand macro="biopython_requirement"/> | 
| 8 <expand macro="openpyxl_requirement"/> | |
| 9 <expand macro="pandas_requirement"/> | |
| 6 | 10 <requirement type="package" version="0.16.0.1">pysam</requirement> | 
| 0 | 11 </requirements> | 
| 12 <command detect_errors="exit_code"><![CDATA[ | |
| 13 #import re | |
| 2 | 14 | 
| 15 ## The identifer for both of the following files is likely the same | |
| 16 ## string, so we append a file extension to allow for both links. | |
| 17 #set bam_identifier = re.sub('[^\s\w\-]', '_', str($bam_input.element_identifier)) + '.bam' | |
| 18 ln -s '${bam_input}' '${bam_identifier}' && | |
| 19 #set vcf_identifier = re.sub('[^\s\w\-]', '_', str($vcf_input.element_identifier)) + '.vcf' | |
| 20 ln -s '${vcf_input}' '${vcf_identifier}' && | |
| 21 | |
| 0 | 22 python '$__tool_directory__/vsnp_add_zero_coverage.py' | 
| 2 | 23 --bam_input '$bam_identifier' | 
| 24 --vcf_input '$vcf_identifier' | |
| 25 #if str($reference_cond.reference_source) == 'cached' | |
| 0 | 26 --reference '$reference_cond.reference.fields.path' | 
| 27 #else: | |
| 28 --reference '$reference_cond.reference' | |
| 29 #end if | |
| 2 | 30 --output_metrics '$output_metrics' | 
| 31 --output_vcf '$output_vcf' | |
| 0 | 32 ]]></command> | 
| 33 <inputs> | |
| 2 | 34 <param name="bam_input" type="data" format="bam" label="BAM file"/> | 
| 35 <param name="vcf_input" type="data" format="vcf" label="VCF file"/> | |
| 0 | 36 <conditional name="reference_cond"> | 
| 2 | 37 <expand macro="param_reference_source"/> | 
| 0 | 38 <when value="cached"> | 
| 39 <param name="reference" type="select" label="Using reference genome"> | |
| 2 | 40 <options from_data_table="fasta_indexes"> | 
| 41 <filter type="data_meta" column="1" key="dbkey" ref="bam_input"/> | |
| 42 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected BAM file"/> | |
| 43 </options> | |
| 0 | 44 </param> | 
| 45 </when> | |
| 46 <when value="history"> | |
| 11 
fdfcdc9548ec
"planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_add_zero_coverage commit 4c7078b27931895d469b0e9663cc11a925eaf1bd"
 greg parents: 
7diff
changeset | 47 <param name="reference" type="data" format="fasta,fasta.gz" label="Using reference genome"/> | 
| 0 | 48 </when> | 
| 49 </conditional> | |
| 50 </inputs> | |
| 51 <outputs> | |
| 2 | 52 <data name="output_vcf" format="vcf" label="${tool.name} on ${on_string} (filtered VCF)"/> | 
| 53 <data name="output_metrics" format="tabular" label="${tool.name} on ${on_string} (metrics)"/> | |
| 0 | 54 </outputs> | 
| 55 <tests> | |
| 2 | 56 <test expect_num_outputs="2"> | 
| 0 | 57 <param name="bam_input" value="bam_input.bam" ftype="bam" dbkey="89"/> | 
| 58 <param name="vcf_input" value="vcf_input.vcf" ftype="vcf" dbkey="89"/> | |
| 59 <param name="reference_source" value="history"/> | |
| 60 <param name="reference" value="NC_002945v4.fasta" ftype="fasta"/> | |
| 12 
4f68ac34612d
"planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_add_zero_coverage commit 12290f30f18c10e0e74994b39bdee35ee3d6a726"
 greg parents: 
11diff
changeset | 61 <output name="output_vcf" ftype="vcf"> | 
| 
4f68ac34612d
"planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_add_zero_coverage commit 12290f30f18c10e0e74994b39bdee35ee3d6a726"
 greg parents: 
11diff
changeset | 62 <assert_contents> | 
| 
4f68ac34612d
"planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_add_zero_coverage commit 12290f30f18c10e0e74994b39bdee35ee3d6a726"
 greg parents: 
11diff
changeset | 63 <has_size value="259726"/> | 
| 
4f68ac34612d
"planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_add_zero_coverage commit 12290f30f18c10e0e74994b39bdee35ee3d6a726"
 greg parents: 
11diff
changeset | 64 </assert_contents> | 
| 
4f68ac34612d
"planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_add_zero_coverage commit 12290f30f18c10e0e74994b39bdee35ee3d6a726"
 greg parents: 
11diff
changeset | 65 </output> | 
| 
4f68ac34612d
"planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_add_zero_coverage commit 12290f30f18c10e0e74994b39bdee35ee3d6a726"
 greg parents: 
11diff
changeset | 66 <output name="output_metrics" ftype="tabular"> | 
| 
4f68ac34612d
"planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_add_zero_coverage commit 12290f30f18c10e0e74994b39bdee35ee3d6a726"
 greg parents: 
11diff
changeset | 67 <assert_contents> | 
| 
4f68ac34612d
"planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_add_zero_coverage commit 12290f30f18c10e0e74994b39bdee35ee3d6a726"
 greg parents: 
11diff
changeset | 68 <has_size value="109"/> | 
| 
4f68ac34612d
"planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_add_zero_coverage commit 12290f30f18c10e0e74994b39bdee35ee3d6a726"
 greg parents: 
11diff
changeset | 69 </assert_contents> | 
| 
4f68ac34612d
"planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_add_zero_coverage commit 12290f30f18c10e0e74994b39bdee35ee3d6a726"
 greg parents: 
11diff
changeset | 70 </output> | 
| 2 | 71 </test> | 
| 72 <test expect_num_outputs="2"> | |
| 73 <param name="bam_input" value="bam_input.bam" ftype="bam" dbkey="89"/> | |
| 74 <param name="vcf_input" value="vcf_input.vcf" ftype="vcf" dbkey="89"/> | |
| 75 <param name="reference_source" value="cached"/> | |
| 12 
4f68ac34612d
"planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_add_zero_coverage commit 12290f30f18c10e0e74994b39bdee35ee3d6a726"
 greg parents: 
11diff
changeset | 76 <output name="output_vcf" ftype="vcf"> | 
| 
4f68ac34612d
"planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_add_zero_coverage commit 12290f30f18c10e0e74994b39bdee35ee3d6a726"
 greg parents: 
11diff
changeset | 77 <assert_contents> | 
| 
4f68ac34612d
"planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_add_zero_coverage commit 12290f30f18c10e0e74994b39bdee35ee3d6a726"
 greg parents: 
11diff
changeset | 78 <has_size value="259726"/> | 
| 
4f68ac34612d
"planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_add_zero_coverage commit 12290f30f18c10e0e74994b39bdee35ee3d6a726"
 greg parents: 
11diff
changeset | 79 </assert_contents> | 
| 
4f68ac34612d
"planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_add_zero_coverage commit 12290f30f18c10e0e74994b39bdee35ee3d6a726"
 greg parents: 
11diff
changeset | 80 </output> | 
| 
4f68ac34612d
"planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_add_zero_coverage commit 12290f30f18c10e0e74994b39bdee35ee3d6a726"
 greg parents: 
11diff
changeset | 81 <output name="output_metrics" ftype="tabular"> | 
| 
4f68ac34612d
"planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_add_zero_coverage commit 12290f30f18c10e0e74994b39bdee35ee3d6a726"
 greg parents: 
11diff
changeset | 82 <assert_contents> | 
| 
4f68ac34612d
"planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_add_zero_coverage commit 12290f30f18c10e0e74994b39bdee35ee3d6a726"
 greg parents: 
11diff
changeset | 83 <has_size value="109"/> | 
| 
4f68ac34612d
"planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_add_zero_coverage commit 12290f30f18c10e0e74994b39bdee35ee3d6a726"
 greg parents: 
11diff
changeset | 84 </assert_contents> | 
| 
4f68ac34612d
"planemo upload for repository https://github.com/gregvonkuster/galaxy_tools/tree/master/tools/sequence_analysis/vsnp/vsnp_add_zero_coverage commit 12290f30f18c10e0e74994b39bdee35ee3d6a726"
 greg parents: 
11diff
changeset | 85 </output> | 
| 0 | 86 </test> | 
| 87 </tests> | |
| 88 <help> | |
| 89 **What it does** | |
| 90 | |
| 91 Accepts a combination of single BAM and associated VCF files (or associated collections of each) to produce a VCF file for each | |
| 92 combination whose positions with no coverage are represented as "N". These outputs are restricted to SNPs and those regions | |
| 93 along the reference with no coverage. | |
| 94 | |
| 95 A metrics file is produced for each combination which provides the number of good SNPs, the average coverage and the genome | |
| 96 coverage percentage. | |
| 97 | |
| 98 **Required Options** | |
| 99 | |
| 100 * **Choose the source for the reference genome** - select "locally cached" if the reference associated with the BAM and VCF files is available within the Galaxy environment or "from history" to select the reference from the current history. | |
| 101 </help> | |
| 7 | 102 <expand macro="citations"/> | 
| 0 | 103 </tool> | 
| 104 | 
