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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6
bb6cc994707d Uploaded
greg
parents: 2
diff changeset
1 <tool id="vsnp_add_zero_coverage" name="vSNP: add zero coverage" version="@WRAPPER_VERSION@.2+galaxy0" profile="@PROFILE@">
0
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
2 <description></description>
2
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
3 <macros>
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
4 <import>macros.xml</import>
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
5 </macros>
0
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
6 <requirements>
7
127a00fcd4a8 Uploaded
greg
parents: 6
diff changeset
7 <expand macro="biopython_requirement"/>
127a00fcd4a8 Uploaded
greg
parents: 6
diff changeset
8 <expand macro="openpyxl_requirement"/>
127a00fcd4a8 Uploaded
greg
parents: 6
diff changeset
9 <expand macro="pandas_requirement"/>
6
bb6cc994707d Uploaded
greg
parents: 2
diff changeset
10 <requirement type="package" version="0.16.0.1">pysam</requirement>
0
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
11 </requirements>
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
12 <command detect_errors="exit_code"><![CDATA[
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
13 #import re
2
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
14
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
15 ## The identifer for both of the following files is likely the same
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
16 ## string, so we append a file extension to allow for both links.
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
17 #set bam_identifier = re.sub('[^\s\w\-]', '_', str($bam_input.element_identifier)) + '.bam'
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
18 ln -s '${bam_input}' '${bam_identifier}' &&
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
19 #set vcf_identifier = re.sub('[^\s\w\-]', '_', str($vcf_input.element_identifier)) + '.vcf'
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
20 ln -s '${vcf_input}' '${vcf_identifier}' &&
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
21
0
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
22 python '$__tool_directory__/vsnp_add_zero_coverage.py'
2
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
23 --bam_input '$bam_identifier'
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
24 --vcf_input '$vcf_identifier'
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
25 #if str($reference_cond.reference_source) == 'cached'
0
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
26 --reference '$reference_cond.reference.fields.path'
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
27 #else:
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
28 --reference '$reference_cond.reference'
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
29 #end if
2
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
30 --output_metrics '$output_metrics'
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
31 --output_vcf '$output_vcf'
0
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
32 ]]></command>
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
33 <inputs>
2
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
34 <param name="bam_input" type="data" format="bam" label="BAM file"/>
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
35 <param name="vcf_input" type="data" format="vcf" label="VCF file"/>
0
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
36 <conditional name="reference_cond">
2
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
37 <expand macro="param_reference_source"/>
0
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
38 <when value="cached">
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
39 <param name="reference" type="select" label="Using reference genome">
2
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
40 <options from_data_table="fasta_indexes">
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
41 <filter type="data_meta" column="1" key="dbkey" ref="bam_input"/>
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
42 <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected BAM file"/>
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
43 </options>
0
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
44 </param>
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
45 </when>
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
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: 7
diff changeset
47 <param name="reference" type="data" format="fasta,fasta.gz" label="Using reference genome"/>
0
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
48 </when>
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
49 </conditional>
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
50 </inputs>
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
51 <outputs>
2
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
52 <data name="output_vcf" format="vcf" label="${tool.name} on ${on_string} (filtered VCF)"/>
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
53 <data name="output_metrics" format="tabular" label="${tool.name} on ${on_string} (metrics)"/>
0
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
54 </outputs>
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
55 <tests>
2
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
56 <test expect_num_outputs="2">
0
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
57 <param name="bam_input" value="bam_input.bam" ftype="bam" dbkey="89"/>
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
58 <param name="vcf_input" value="vcf_input.vcf" ftype="vcf" dbkey="89"/>
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
59 <param name="reference_source" value="history"/>
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
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: 11
diff 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: 11
diff 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: 11
diff 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: 11
diff 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: 11
diff 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: 11
diff 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: 11
diff 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: 11
diff 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: 11
diff 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: 11
diff changeset
70 </output>
2
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
71 </test>
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
72 <test expect_num_outputs="2">
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
73 <param name="bam_input" value="bam_input.bam" ftype="bam" dbkey="89"/>
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
74 <param name="vcf_input" value="vcf_input.vcf" ftype="vcf" dbkey="89"/>
01312f8a6ca9 Uploaded
greg
parents: 0
diff changeset
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: 11
diff 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: 11
diff 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: 11
diff 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: 11
diff 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: 11
diff 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: 11
diff 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: 11
diff 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: 11
diff 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: 11
diff 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: 11
diff changeset
85 </output>
0
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
86 </test>
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
87 </tests>
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
88 <help>
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
89 **What it does**
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
90
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
91 Accepts a combination of single BAM and associated VCF files (or associated collections of each) to produce a VCF file for each
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
92 combination whose positions with no coverage are represented as "N". These outputs are restricted to SNPs and those regions
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
93 along the reference with no coverage.
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
94
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
95 A metrics file is produced for each combination which provides the number of good SNPs, the average coverage and the genome
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
96 coverage percentage.
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
97
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
98 **Required Options**
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
99
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
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.
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
101 </help>
7
127a00fcd4a8 Uploaded
greg
parents: 6
diff changeset
102 <expand macro="citations"/>
0
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
103 </tool>
3cb0bf7e1b2d Uploaded
greg
parents:
diff changeset
104