|
0
|
1 <tool id="preprocess" name="preprocess" version="0.0.1">
|
|
|
2 <description>
|
|
|
3 Preprocess Tumour Normal Pairs for Cancer Genomic Workflows
|
|
|
4 </description>
|
|
|
5 <requirements>
|
|
|
6 <requirement type="package" version="1.0.13">bamutil</requirement>
|
|
|
7 </requirements>
|
|
|
8 <command>
|
|
|
9 <![CDATA[
|
|
|
10
|
|
|
11 ln -s $input_bam input.bam;
|
|
|
12 ln -s $input_bam.metadata.bam_index input.bam.bai;
|
|
|
13
|
|
|
14 #if not $interval
|
|
|
15 i="";
|
|
|
16 #end if
|
|
|
17
|
|
|
18 {
|
|
|
19 samtools view -H input.bam;
|
|
|
20
|
|
|
21 #if $interval
|
|
|
22 for i in \$( cat $interval ); do
|
|
|
23 #end if
|
|
|
24
|
|
|
25 samtools view -q $filter_qual input.bam \$i
|
|
|
26
|
|
|
27 #if $interval
|
|
|
28 ; done
|
|
|
29 #end if
|
|
|
30 ;
|
|
|
31 }
|
|
|
32
|
|
|
33 #if $clip_overlap
|
|
|
34 | bam clipOverlap --in -.sam --out -.sam
|
|
|
35 #end if
|
|
|
36
|
|
|
37 | samtools view -Sb - > $output;
|
|
|
38
|
|
|
39 ]]>
|
|
|
40 </command>
|
|
|
41 <inputs>
|
|
|
42 <param type="data" format="bam" name="input_bam" label="Specify BAM Alignment File"/>
|
|
|
43 <param type="data" format="bed,txt" name="interval" label="Specify Interval" optional="true"/>
|
|
|
44 <param type="boolean" checked="true" name="clip_overlap" label="Clip Overlaps" help="Clips overlapping region between paired reads with lowest mean quality"/>
|
|
|
45 <param type="integer" value="0" min="0" max="255" name="filter_qual" label="Minimum Mapping Quality" help="Filter reads with quality strictly less than MMQ"/>
|
|
|
46 </inputs>
|
|
|
47 <outputs>
|
|
|
48 <data format="bam" name="output"/>
|
|
|
49 </outputs>
|
|
|
50 <stdio>
|
|
|
51 <exit_code range="0" level="warning" description="Normal" />
|
|
|
52 <exit_code range="1" level="fatal" description="Error in overclipping" />
|
|
|
53 </stdio>
|
|
|
54 </tool>
|