comparison nanopolish_eventalign.xml @ 0:bee42f615f28 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/nanopolish commit 0e94011a4ea84bf4ae5c2079680a37540e022625
author bgruening
date Wed, 30 May 2018 11:55:18 -0400
parents
children c8c5caecfacc
comparison
equal deleted inserted replaced
-1:000000000000 0:bee42f615f28
1 <tool id="nanopolish_eventalign" name="Nanopolish eventalign" version="0.1.0">
2 <description>- Align nanopore events to reference k-mers</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 eventalign
23 -r reads.fasta
24 -b reads.bam
25 -g genome.fa
26 $samples
27 $scale_events
28 $sam
29 $print_read_names
30 #if $w and str($w).strip():
31 -w "${w}"
32 #end if
33 #if $input_models_fofn:
34 --models-fofn '$input_models_fofn'
35 #end if
36 #if $summary:
37 --summary eventalign-summary.txt
38 #end if
39 > eventalign.out
40
41
42 ]]></command>
43 <inputs>
44 <!-- index inputs -->
45 <param type="data" name="input_merged" format="fasta,fastq" label="Basecalled merged reads.fa"/>
46 <param type="data" name="input_reads_raw" format="h5,fast5.tar.gz" label="Flat archive file of raw fast5 files"/>
47
48 <!-- variants consensus inputs -->
49 <param type="data" argument="-b" format="bam" label="Reads aligned to the reference genome" />
50 <param type="data" argument="-g" format="fasta" label="The reference genome"/>
51
52 <!-- optional inputs -->
53 <param type="data" name="input_models_fofn" argument="--models-fofn" format="txt" optional="true"
54 label="Read alternative k-mer models (optional)" />
55
56 <!-- optional params -->
57 <param argument="-w" type="text" optional="true"
58 label="find variants in window of region chromsome:start-end" />
59
60 <!-- optional flags -->
61 <param argument="--summary" type="boolean" truevalue="--summary" falsevalue="" checked="true"
62 label="Summarize the alignment of each read/strand" />
63 <param argument="--samples" type="boolean" truevalue="--samples" falsevalue="" checked="false"
64 label="Write the raw samples for the event to the tsv output" />
65 <param name="scale_events" argument="--scale-events" type="boolean" truevalue="--scale-events" falsevalue="" checked="false"
66 label="Scale events to the model, rather than vice-versa" />
67 <param argument="--sam" type="boolean" truevalue="--sam" falsevalue="" checked="false"
68 label="write output in SAM format" />
69 <param name="print_read_names" argument="--print-read-names" type="boolean" truevalue="--print-read-names" falsevalue="" checked="false"
70 label="Print read names instead of indexes" />
71
72 </inputs>
73
74 <outputs>
75 <!-- variants consensus outputs -->
76 <data name="output_summary" format="txt" from_work_dir="eventalign-summary.txt" label="eventalign summary of reads/strands" />
77 <data name="output_eventalign" format="txt" from_work_dir="eventalign.out" label="Computed variants"/>
78 </outputs>
79 <tests>
80 <test>
81 <!-- index test -->
82 <param name="input_merged" ftype="fasta" value="reads.fasta" />
83 <param name="input_reads_raw" ftype="fast5.tar.gz" value="fast5_files.tar.gz" />
84
85 <!-- variants consensus test -->
86 <param name="b" value="reads.sorted.bam" />
87 <param name="g" value="draft.fa" />
88 <param name="w" value="tig00000001:200000-200010" />
89 <param name="sam" value="true" />
90
91 <output name="output_summary" file="eventalign-summary.txt" />
92 <output name="output_eventalign" file="reads-draft.eventalign.sam"/>
93 </test>
94 <test>
95 <!-- index test -->
96 <param name="input_merged" ftype="fasta" value="reads.fasta" />
97 <param name="input_reads_raw" ftype="fast5.tar.gz" value="fast5_files.tar.gz" />
98
99 <!-- variants consensus test -->
100 <param name="b" value="reads.sorted.bam" />
101 <param name="g" value="draft.fa" />
102 <param name="w" value="tig00000001:200000-200010" />
103 <param name="sam" value="false" />
104 <param name="summary" value="false" />
105 <param name="scale_events" value="true" />
106 <param name="print_read_names" value="true" />
107
108 <output name="output_summary" file="t2-eventalign-summary.txt" />
109 <output name="output_eventalign">
110 <assert_contents>
111 <has_text text="contig" />
112 <has_text text="position" />
113 <has_text text="event_index" />
114 <has_text text="tig00000001" />
115 </assert_contents>
116 </output>
117 </test>
118 </tests>
119 <help><![CDATA[
120 Usage: nanopolish eventalign [OPTIONS] --reads reads.fa --bam alignments.bam --genome genome.fa
121 Align nanopore events to reference k-mers
122
123 Tutorial and manual available at:
124 http://nanopolish.readthedocs.io/en/latest/quickstart_eventalign.html
125
126 ]]></help>
127 <expand macro="citations" />
128 </tool>