|
0
|
1 <tool id="pindel" name="Pindel" version="0.2.5b8">
|
|
|
2
|
|
|
3 <description>
|
|
|
4 a pattern growth approach to detect break points of large deletions and medium sized insertions from paired-end short reads
|
|
|
5 </description>
|
|
|
6
|
|
|
7 <requirements>
|
|
|
8 <requirement type="package" version="1.3.2">htslib</requirement>
|
|
|
9 <requirement type="package" version="0.2.5b8">pindel</requirement>
|
|
|
10 </requirements>
|
|
|
11
|
|
|
12 <command detect_errors="aggressive">
|
|
|
13
|
|
|
14 ln -s $normal normal.bam;
|
|
|
15 ln -s $normal.metadata.bam_index normal.bam.bai;
|
|
|
16 ln -s $tumour tumour.bam;
|
|
|
17 ln -s $tumour.metadata.bam_index tumour.bam.bai;
|
|
|
18
|
|
|
19 touch pindel.txt;
|
|
|
20 #if $sampleid_source.sampleid_selector.value == "bamfile":
|
|
|
21 echo -e \$(pwd)/tumour.bam\\t$normal_insert\\t\$(basename $tumour | rev | cut -c 5- | rev) >> pindel.txt;
|
|
|
22 echo -e \$(pwd)/normal.bam\\t$tumour_insert\\t\$(basename $normal | rev | cut -c 5- | rev) >> pindel.txt;
|
|
|
23 #else:
|
|
|
24 echo -e \$(pwd)/tumour.bam\\t$normal_insert\\t$sampleid_source.idt >> pindel.txt;
|
|
|
25 echo -e \$(pwd)/normal.bam\\t$tumour_insert\\t$sampleid_source.idn >> pindel.txt;
|
|
|
26 #end if
|
|
|
27
|
|
|
28 mkdir outputs;
|
|
|
29
|
|
|
30 #if $reference_source.reference_source_selector.value == "cached":
|
|
|
31 ln -s ${reference_source.ref_file.fields.path} ref.fa;
|
|
|
32 #else:
|
|
|
33 ln -s $reference_source.ref_file ref.fa;
|
|
|
34 samtools faidx ref.fa;
|
|
|
35 #end if
|
|
|
36
|
|
|
37 pindel
|
|
|
38 -f ref.fa
|
|
|
39 -i pindel.txt
|
|
|
40 -o \$(pwd)/outputs/here
|
|
|
41 $advancedsettings.R
|
|
|
42 -x $advancedsettings.x
|
|
|
43 -e $advancedsettings.e
|
|
|
44 -E $advancedsettings.E
|
|
|
45 -u $advancedsettings.u
|
|
|
46 -n $advancedsettings.n
|
|
|
47 $advancedsettings.r
|
|
|
48 $advancedsettings.t
|
|
|
49 $advancedsettings.l
|
|
|
50 $advancedsettings.k
|
|
|
51 $advancedsettings.s
|
|
|
52 $advancedsettings.S
|
|
|
53 $advancedsettings.I
|
|
|
54 #if $advancedsettings.include:
|
|
|
55 -j $advancedsettings.include
|
|
|
56 #end if
|
|
|
57 #if $advancedsettings.exclude:
|
|
|
58 -J $advancedsettings.exclude
|
|
|
59 #end if
|
|
|
60 ;
|
|
|
61
|
|
|
62 first="true";
|
|
|
63 for i in \$( ls \$(pwd)/outputs/here* ); do
|
|
|
64 pindel2vcf -p \$i -r ref.fa -R CHECK_GALAXY_HISTORY -d CHECK_GALAXY_HISTORY -v tmp.vcf;
|
|
|
65 if [ \$first -eq "true" ] ; then
|
|
|
66 cat tmp.vcf >> $output;
|
|
|
67 first="false";
|
|
|
68 else
|
|
|
69 grep -v "^#.*" tmp.vcf >> $output;
|
|
|
70 fi;
|
|
|
71 done;
|
|
|
72
|
|
|
73 </command>
|
|
|
74
|
|
|
75 <inputs>
|
|
|
76
|
|
|
77 <conditional name="reference_source">
|
|
|
78 <param label="Choose the source for the reference genome" name="reference_source_selector" type="select">
|
|
|
79 <option value="cached">Use a built-in genome</option>
|
|
|
80 <option value="history">Use a genome from the history</option>
|
|
|
81 </param>
|
|
|
82 <when value="cached">
|
|
|
83 <param label="Reference Genome File" name="ref_file" type="select">
|
|
|
84 <options from_data_table="fasta_indexes"/>
|
|
|
85 </param>
|
|
|
86 </when>
|
|
|
87 <when value="history">
|
|
|
88 <param label="Reference Genome File" name="ref_file" type="data" format="fasta"/>
|
|
|
89 </when>
|
|
|
90 </conditional>
|
|
|
91
|
|
|
92 <conditional name="sampleid_source">
|
|
|
93 <param label="Choose the source to open the Sample Id" name="sampleid_selector" type="select">
|
|
|
94 <option value="bamfile">BAM File Name</option>
|
|
|
95 <option value="manual">Manual</option>
|
|
|
96 </param>
|
|
|
97 <when value="manual">
|
|
|
98 <param name="idt" type="text" label="Tumour ID (Name)"/>
|
|
|
99 <param name="idn" type="text" label="Normal ID (Name)"/>
|
|
|
100 </when>
|
|
|
101 </conditional>
|
|
|
102
|
|
|
103 <param type="data" format="bam" name="tumour" label="Tumour Alignment File"/>
|
|
|
104 <param type="data" format="bam" name="normal" label="Normal Alignment File"/>
|
|
|
105 <param type="integer" name="tumour_insert" value="250" label="Tumour Insert Size" help="suggest running picards collect insert size metrics"/>
|
|
|
106 <param type="integer" name="normal_insert" value="250" label="Normal Insert Size" help="suggest running picards collect insert size metrics"/>
|
|
|
107
|
|
|
108 <section name="advancedsettings" title="Advanced Settings" expanded="false">
|
|
|
109 <param type="boolean" name="R" checked="true" truevalue="-R true" falsevalue="-R false" label="Search for Discordant Pairs"/>
|
|
|
110 <param type="integer" name="x" value="2" min="1" max="9" label="Maximum size of structural variations to be detected" help="size = 128 ^ (val - 1)"/>
|
|
|
111 <param type="float" name="e" value="0.01" max="1.0" label="Expected faraction of sequencing errors"/>
|
|
|
112 <param type="float" name="E" value="0.95" max="1.0" label="Sensitivity"/>
|
|
|
113 <param type="float" name="u" value="0.02" max="1.0" label="Maximum allowed mismatch rate"/>
|
|
|
114 <param type="integer" name="n" value="2" label="Minimum Edit Distance between reads and reference"/>
|
|
|
115 <param type="boolean" name="r" checked="true" truevalue="-r true" falsevalue="-r false" label="Report Inversions"/>
|
|
|
116 <param type="boolean" name="t" checked="true" truevalue="-t true" falsevalue="-t false" label="Report Duplications"/>
|
|
|
117 <param type="boolean" name="l" checked="false" truevalue="-l true" falsevalue="-l false" label="Report Long Insertions"/>
|
|
|
118 <param type="boolean" name="k" checked="false" truevalue="-k true" falsevalue="-k false" label="Report Breakpoints"/>
|
|
|
119 <param type="boolean" name="s" checked="false" truevalue="-s true" falsevalue="-s false" label="Report Close Mapped Reads"/>
|
|
|
120 <param type="boolean" name="S" checked="false" truevalue="-S true" falsevalue="-S false" label="Report Only Close Mapped Reads"/>
|
|
|
121 <param type="boolean" name="I" checked="false" truevalue="-I true" falsevalue="-I false" label="Report Interchromosomal Events"/>
|
|
|
122 <param type="data" format="bed" name="include" label="Include Regions" optional="true"/>
|
|
|
123 <param type="data" format="bed" name="exclude" label="Exclude Regions" optional="true"/>
|
|
|
124 </section>
|
|
|
125
|
|
|
126 </inputs>
|
|
|
127
|
|
|
128 <outputs>
|
|
|
129 <data format="vcf" name="output" />
|
|
|
130 </outputs>
|
|
|
131
|
|
|
132 </tool>
|