comparison nanopolish_variants.xml @ 0:639b3a5bb415 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/nanopolish commit 0e94011a4ea84bf4ae5c2079680a37540e022625
author bgruening
date Wed, 30 May 2018 11:56:35 -0400
parents
children 1ebed8b65752
comparison
equal deleted inserted replaced
-1:000000000000 0:639b3a5bb415
1 <tool id="nanopolish_variants" name="Nanopolish variants" version="0.1.0">
2 <description>- Find SNPs of basecalled merged Nanopore reads and polishes the consensus sequences</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="requirements" />
7 <command detect_errors="exit_code"><![CDATA[
8 ln -s '$input_merged' reads.fasta &&
9
10 #if $input_reads_raw.extension == 'fast5':
11 mkdir fast5_files && ln -s '$input_reads_raw' fast5_files/read1.fast5 &&
12 #else
13 ln -s '$input_reads_raw' fast5_files.tar.gz &&
14 mkdir fast5_files && tar -xzf fast5_files.tar.gz -C fast5_files &&
15 #end if
16
17 nanopolish index -d fast5_files/ reads.fasta &&
18 ln -s '$b' reads.bam &&
19 ln -s '${b.metadata.bam_index}' reads.bam.bai &&
20 ln -s '$g' genome.fa &&
21
22 nanopolish variants
23 -r reads.fasta
24 -b reads.bam
25 -g genome.fa
26 -o variants.vcf
27 #if $consensus:
28 --consensus polished.fa
29 #end if
30
31 $snps
32 $verbose
33 $homopolymer
34 $faster
35 $all_bases
36
37 -m $min_candidate_frequency
38 -d $min_candidate_depth
39 -x $max_haplotypes
40 --max-rounds $max_rounds
41 #if $ploidy != -1:
42 --ploidy $ploidy
43 #end if
44
45 #if $w and str($w).strip():
46 -w "${w}"
47 #end if
48 #if $methylation_aware and str($methylation_aware).strip():
49 -q "${methylation_aware}"
50 #end if
51
52 #if $adv.input_events_bam:
53 -e '$adv.input_events_bam'
54 #end if
55 #if $adv.input_genotype:
56 --genotype '$adv.input_genotype'
57 #end if
58 #if $adv.input_candidates:
59 -c '$adv.input_candidates'
60 #end if
61 #if $adv.input_alt_bc_bam:
62 -a '$adv.input_alt_bc_bam'
63 #end if
64 #if $adv.input_models_fofn:
65 --models-fofn '$input_models_fofn'
66 #end if
67
68
69
70 ]]></command>
71 <inputs>
72 <!-- index inputs -->
73 <param type="data" name="input_merged" format="fasta,fastq" label="Basecalled merged reads.fa"/>
74 <param type="data" name="input_reads_raw" format="h5,fast5.tar.gz" label="Flat archive file of raw fast5 files"/>
75
76 <!-- variants consensus inputs -->
77 <param type="data" argument="-b" format="bam" label="Reads aligned to the reference genome" />
78 <param type="data" argument="-g" format="fasta" label="The reference genome"/>
79
80 <section name="adv" title="Optional data inputs">
81 <!-- optional inputs -->
82 <param type="data" name="input_seq_summary" format="txt" optional="true" label="Sequencing summary file from albacore" help="(-s)"/>
83 <param type="data" name="input_events_bam" format="bam" optional="true" label="Events aligned to the reference genome" help="(-e)" />
84 <param type="data" name="input_genotype" format="vcf" optional="true" label="Call genotypes for the variants in the vcf file" help="(--genotype)" />
85 <param type="data" name="input_candidates" format="vcf" optional="true"
86 label="Use variant candidates, rather than discovering them from aligned reads" help="(-c)" />
87 <param type="data" name="input_alt_bc_bam" format="bam" optional="true" label="Alternative basecaller used that does not output event annotations" help="(-a)" />
88 <param type="data" name="input_models_fofn" format="txt" optional="true" label="Read alternative k-mer models" help="(--models-fofn)" />
89 </section>
90
91 <!-- optional params -->
92 <!-- optional params -->
93 <param argument="-w" type="text" optional="true"
94 label="find variants in window of region chromsome:start-end" />
95 <param name="methylation_aware" type="text" optional="true" label="methylation aware polishing and test motifs given" help="(-q)"/>
96 <param name="min_candidate_frequency" type="float" optional="true" value="0.2" label="Extarct if the variant frequency is at least F" help="(-m)"/>
97 <param name="min_candidate_depth" type="integer" optional="true" value="20" label="Extarct if the depth is at least D" help="(-d)"/>
98 <param name="max_haplotypes" type="integer" optional="true" value="1000" label="Consider at most N haplotype combinations" help="(-x)"/>
99 <param name="max_rounds" type="integer" optional="true" value="50" label="Perform N rounds of consensus sequence improvement" help="(--max_rounds)"/>
100 <param name="ploidy" type="integer" optional="true" value="-1" label="The ploidy level of the sequenced genome. -1:disabled" help="(-p)"/>
101
102 <!-- optional flags -->
103 <param argument="--consensus" type="boolean" truevalue="--consensus" falsevalue="" checked="true" label="Consensus calling mode and output polished sequence" />
104 <param argument="--snps" type="boolean" truevalue="--snps" falsevalue="" checked="false" label="only call SNPs"/>
105 <param argument="--verbose" type="boolean" truevalue="--verbose" falsevalue="" checked="false" label="verbose output"/>
106 <param name="homopolymer" type="boolean" argument="--fix-homopolymers" truevalue="--fix-homopolymers" falsevalue="" checked="false" label="homopolymer caller" />
107 <param argument="--faster" type="boolean" truevalue="--faster" falsevalue="" checked="false"
108 label="speedup while slightly reducing consensus accuracy"/>
109 <param name="all_bases" type="boolean" argument="--calculate-all-support" truevalue="--calculate-all-support" falsevalue="" checked="false"
110 label="calculate the support of the 3 other possible bases" />
111 </inputs>
112
113 <outputs>
114 <!-- variants consensus outputs -->
115 <data name="output_polished" format="fasta" from_work_dir="polished.fa" label="polished sequence by consensus calling mode" />
116 <data name="output_variants" format="vcf" from_work_dir="variants.vcf" label="Computed variants"/>
117 </outputs>
118 <tests>
119 <test>
120 <!-- index test -->
121 <param name="input_merged" ftype="fasta" value="reads.fasta" />
122 <param name="input_reads_raw" ftype="fast5.tar.gz" value="fast5_files.tar.gz" />
123
124 <!-- variants consensus test -->
125 <param name="b" value="reads.sorted.bam" />
126 <param name="g" value="draft.fa" />
127 <param name="w" value="tig00000001:200000-202000" />
128
129 <output name="output_polished" file="polished.fa" />
130 <output name="output_variants" file="variants.vcf"/>
131 </test>
132 <test>
133 <!-- index test -->
134 <param name="input_merged" ftype="fasta" value="reads.fasta" />
135 <param name="input_reads_raw" ftype="fast5.tar.gz" value="fast5_files.tar.gz" />
136
137 <!-- variants consensus test -->
138 <param name="b" value="reads.sorted.bam" />
139 <param name="g" value="draft.fa" />
140 <param name="w" value="tig00000001:200000-202000" />
141 <param name="ploidy" value="2" />
142 <param name="snps" value="true" />
143 <param name="faster" value="true" />
144 <param name="all_bases" value="true" />
145 <param name="consensus" value="false" />
146 <output name="output_polished" file="t2-polished.fa" />
147 <output name="output_variants" file="t2-variants.vcf"/>
148 </test>
149
150 </tests>
151 <help><![CDATA[
152
153 Build an index mapping from basecalled reads to the signals measured by the sequencer
154 and
155 Find SNPs using a signal-level HMM
156
157 Tutorial and manual available at:
158 http://nanopolish.readthedocs.io/en/latest/quickstart_consensus.html
159
160
161 ]]></help>
162 <expand macro="citations" />
163 </tool>