Mercurial > repos > nml > quasitools
comparison distance.xml @ 4:8cdffc02d2e2 draft
planemo upload for repository https://github.com/phac-nml/quasitools commit 19e0f266ee455b82432e2d7b987b35de8c7a14d5
author | nml |
---|---|
date | Wed, 25 Apr 2018 10:38:00 -0400 |
parents | |
children | b69e898b8109 |
comparison
equal
deleted
inserted
replaced
3:8dacd75ca8f1 | 4:8cdffc02d2e2 |
---|---|
1 <tool id="distance" name="Quasispecies Distance" version="0.1.0"> | |
2 <description>Calculate the evolutionary distance between viral quasispecies.</description> | |
3 <requirements> | |
4 <requirement type="package" version="0.3.1">quasitools</requirement> | |
5 </requirements> | |
6 <command detect_errors="exit_code"><![CDATA[ | |
7 | |
8 #for $bam_file in $bam_files | |
9 ln -s $bam_file '${bam_file.name}' && | |
10 ln -s $bam_file.metadata.bam_index '${bam_file.name}.bai' && | |
11 #end for | |
12 | |
13 quasitools distance $ref_file | |
14 | |
15 #for $bam_file in $bam_files | |
16 '${bam_file.name}' | |
17 #end for | |
18 | |
19 -o matrix.csv | |
20 | |
21 $normalize | |
22 | |
23 #if $low_coverage.coverage_selector == 'keep': | |
24 -k | |
25 #else if $low_coverage.coverage_selector == 'remove': | |
26 -r | |
27 #else if $low_coverage.coverage_selector == 'truncate': | |
28 -t | |
29 #end if | |
30 | |
31 #if $select_range.manual_input == 'select_range': | |
32 -s $select_range.start | |
33 -e $select_range.end | |
34 #end if | |
35 | |
36 $output_similarity | |
37 | |
38 ]]></command> | |
39 <inputs> | |
40 <param name="ref_file" type="data" format="fasta" optional="false" label="Reference file" /> | |
41 <param name="bam_files" type="data" format="bam" optional="false" multiple="true" label="BAM files" min="2" help="At least two BAM files are required to perform quasispecies distance comparison."/> | |
42 <param name="normalize" type="boolean" truevalue="-n" falsevalue="-dn" checked="True" label="Normalize pileups" help="Normalize read count data so that the read counts per 4-tuple (A, C, T, G) sum to one."/> | |
43 <param name="output_similarity" type="boolean" truevalue="-os" falsevalue="-od" checked="False" label="Output cosine similarity instead of angular cosine distance." help="Cosine similarity is not a distance metric." /> | |
44 <conditional name="low_coverage"> | |
45 <param name="coverage_selector" type="select" label="Choose how to treat zero coverage positions."> | |
46 <option value="remove" selected = "true">Remove all zero coverage positions.</option> | |
47 <option value="keep">Keep all zero coverage positions.</option> | |
48 <option value="truncate">Truncate zero coverage positions at start and end of pileup.</option> | |
49 </param> | |
50 <when value="remove"> | |
51 </when> | |
52 <when value="keep"> | |
53 </when> | |
54 <when value="truncate"> | |
55 </when> | |
56 </conditional> | |
57 <conditional name="select_range"> | |
58 <param name="manual_input" type="select" label="Select pileup range." help="Currently only supports selection of custom start and end position for one single reference."> | |
59 <option value="keep_range" selected = "true">Use original pileup for distance calculation.</option> | |
60 <option value="select_range">Manually select pileup's start and end position for distance calculation.</option> | |
61 </param> | |
62 <when value="select_range"> | |
63 <param name="start" type="integer" optional="false" min="1" value="1" label="Select one-indexed start base position." help="Positions before start position will be ignored in the distance calculation." /> | |
64 <param name="end" type="integer" optional="false" min="1" value="1" label="Select one-indexed end base position." help="Positions after end position will be ignored in the distance calculation." /> | |
65 </when> | |
66 <when value="keep_range"> | |
67 </when> | |
68 </conditional> | |
69 </inputs> | |
70 <outputs> | |
71 <data format="csv" name="matrix" from_work_dir="matrix.csv" /> | |
72 </outputs> | |
73 <tests> | |
74 <test> | |
75 <param name="ref_file" value="hxb2_pol.fas" /> | |
76 <param name="bam_files" value="quasi1.bam,quasi2.bam" /> | |
77 <param name="normalize" value="-n" /> | |
78 <param name="coverage_selector" value="truncate" /> | |
79 <param name="manual_input" value="keep_range" /> | |
80 <param name="output_similarity" value="-od" /> | |
81 <output name="matrix" ftype="csv" > | |
82 <assert_contents> | |
83 <has_text_matching expression="Quasispecies"/> | |
84 </assert_contents> | |
85 </output> | |
86 </test> | |
87 </tests> | |
88 <help><![CDATA[ | |
89 | |
90 Quasispecies Distance | |
91 ===================== | |
92 | |
93 Determines the evolutionary distance between viral quasispecies. | |
94 Uses the angular cosine distance function by default. | |
95 | |
96 ------ | |
97 Inputs | |
98 ------ | |
99 | |
100 1. FASTA Consensus file | |
101 2. Two or more BAM files (otherwise tool will throw an error) | |
102 | |
103 ---------- | |
104 Parameters | |
105 ---------- | |
106 1. Normalize pileup (True or False) | |
107 2. Select custom start and end position. Currently only supports selection of custom start and end position for one single reference. | |
108 3. Choose how to treat zero coverage regions (keep, remove all, or truncate) | |
109 | |
110 ------- | |
111 Outputs | |
112 ------- | |
113 | |
114 CSV containing distance matrix. | |
115 | |
116 ]]></help> | |
117 <citations> | |
118 <citation type="bibtex"> | |
119 @misc{GitHubquasitoolsdistance, | |
120 title = {quasitools distance}, | |
121 publisher = {phac-nml}, | |
122 journal = {GitHub repository}, | |
123 url = {https://github.com/phac-nml/quasitools}, | |
124 } | |
125 </citation> | |
126 </citations> | |
127 </tool> |