comparison lumpy.xml @ 0:ec43f38f18c2 draft

Uploaded
author morinlab
date Sun, 04 Dec 2016 14:29:45 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:ec43f38f18c2
1 <tool id="lumpy" name="LUMPY" version="0.2.9">
2 <description>
3 a probabilistic framework for structural variant discovery
4 </description>
5 <requirements>
6 <requirement type="package" version="0.1.19">samtools</requirement>
7 <requirement type="package" version="0.2.9">lumpy</requirement>
8 <requirement type="set_environment" version="0.2.9">LUMPY_SCRIPTS</requirement>
9 <requirement type="package" version="1.9">numpy</requirement>
10 </requirements>
11 <command>
12
13 <!-- Create Symbolic links to bam and bam indexes -->
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 <!-- EXTRACT DISCORDANT PAIRED END ALIGNMENTS -->
20 samtools view -F 1294 -b normal.bam | samtools sort - normal.pe;
21 samtools view -F 1294 -b tumour.bam | samtools sort - tumour.pe;
22
23 <!-- EXTRACT SPLIT-READ ALIGNMENTS -->
24 samtools view -h normal.bam |
25 \$LUMPY_SCRIPTS/extractSplitReads_BwaMem -i stdin |
26 samtools view -Sb - |
27 samtools sort - normal.sr;
28 samtools view -h tumour.bam |
29 \$LUMPY_SCRIPTS/extractSplitReads_BwaMem -i stdin |
30 samtools view -Sb - |
31 samtools sort - tumour.sr;
32
33 <!-- CREATE HISTO FILE -->
34 samtools view normal.bam |
35 tail -n+100000 |
36 \$LUMPY_SCRIPTS/pairend_distro.py -r 150 -X 4 -N 10000 -o normal.pe.histo > normal.stats;
37 samtools view tumour.bam |
38 tail -n+100000 |
39 \$LUMPY_SCRIPTS/pairend_distro.py -r 150 -X 4 -N 10000 -o tumour.pe.histo > tumour.stats;
40
41 <!-- Store MEAN and STD in nice format -->
42 cat -t normal.stats | sed s/\\^\\I/,/g > normal.stats.txt;
43 cat -t tumour.stats | sed s/\\^\\I/,/g > tumour.stats.txt;
44
45 <!-- RUN LUMPY -->
46
47 lumpy
48 -e
49 -tt $advancedsettings.tt
50 -mw $advancedsettings.mw
51 #if $x
52 -x $x
53 #end if
54
55 -pe
56 bam_file:normal.pe.sort.bam,
57 histo_file:normal.pe.histo,
58 \$(cat normal.stats.txt),
59 read_length:$advancedsettings.pe_read_length,
60 min_non_overlap:$advancedsettings.pe_min_non_overlap,
61 discordant_z:$advancedsettings.pe_discordant_z,
62 back_distance:$advancedsettings.pe_back_distance,
63 min_mapping_threshold:$advancedsettings.pe_min_mapping_threshold,
64 weight:$advancedsettings.pe_weight,
65 #if $sampleid_source.manual:
66 id:PE-$sampleid_source.idn
67 #else:
68 id:PE-\$(basename $normal)
69 #end if
70
71 -sr
72 bam_file:normal.sr.sort.bam,
73 back_distance:$advancedsettings.sr_back_distance,
74 min_mapping_threshold:$advancedsettings.sr_min_mapping_threshold,
75 weight:$advancedsettings.sr_weight,
76 min_clip:$advancedsettings.sr_min_clip,
77 #if $sampleid_source.manual:
78 id:SE-$sampleid_source.idn
79 #else
80 id:SE-\$(basename $normal)
81 #end if
82
83 -pe
84 bam_file:n=tumour.pe.sort.bam,
85 histo_file:tumour.pe.histo,
86 \$(cat tumour.stats.txt),
87 read_length:$advancedsettings.pe_read_length,
88 min_non_overlap:$advancedsettings.pe_min_non_overlap,
89 discordant_z:$advancedsettings.pe_discordant_z,
90 back_distance:$advancedsettings.pe_back_distance,
91 min_mapping_threshold:$advancedsettings.pe_min_mapping_threshold,
92 weight:$advancedsettings.pe_weight,
93 #if $sampleid_source.manual:
94 id:PE-$sampleid_source.idt
95 #else:
96 id:PE-\$(basename $tumour)
97 #end if
98
99 -sr
100 bam_file:tumour.sr.sort.bam,
101 back_distance:$advancedsettings.sr_back_distance,
102 min_mapping_threshold:$advancedsettings.sr_min_mapping_threshold,
103 weight:$advancedsettings.sr_weight,
104 min_clip:$advancedsettings.sr_min_clip,
105 #if $sampleid_source.manual:
106 id:SE-$sampleid_source.idt
107 #else
108 id:SE-\$(basename $tumour)
109 #end if
110
111 > $outfile;
112
113 </command>
114 <inputs>
115 <conditional name="sampleid_source">
116 <param label="Choose the source to fetch Sample Identifiers" name="sampleid_selector" type="select">
117 <option value="bamfile">BAM File Name</option>
118 <option value="manual">Manual</option>
119 </param>
120 <when value="manual">
121 <param name="idn" type="text" label="Tumour ID (Name)"/>
122 <param name="idt" type="text" label="Normal ID (Name)"/>
123 </when>
124 </conditional>
125 <param type="data" format="bam" name="normal" label="Normal Alignment File"/>
126 <param type="data" format="bam" name="tumour" label="Tumour Alignment File"/>
127 <param type="data" format="bed" name="x" label="Exluded Regions BED file" optional="true"/>
128 <section name="advancedsettings" title="Advanced Settings" expanded="false">
129 <param type="integer" value="5" name="mw" label="Minimum Weight for Call"/>
130 <param type="integer" value="3" name="tt" label="Trim Threshold"/>
131 <param type="integer" name="pe_back_distance" value="20" label="Paired End Back Distance" help="Distance into the read to add the breakpoint interval"/>
132 <param type="integer" name="pe_min_mapping_threshold" value="1" label="Paired End Min Mapping Threshold" help="Minimum mapping quality that a read must have to be considered"/>
133 <param type="integer" name="pe_weight" value="1" label="Paired End Weight" help="Weight of each piece of evidence from this sample"/>
134 <param type="integer" name="pe_discordant_z" value="4" label="Paired End Discordant Value" help="Number of standard deviations away from the mean to be considered as a normal library size"/>
135 <param type="integer" name="pe_read_length" value="150" label="Paired End Read Length" help="Length of sequenced reads"/>
136 <param type="integer" name="pe_min_non_overlap" value="150" label="Paired End Min Non Overlap" help="Number of base pair positions that must be unique to each end of a read pair"/>
137 <param type="integer" name="sr_back_distance" value="20" label="Split Read Back Distance" help="Distance into the read to add the breakpoint interval"/>
138 <param type="integer" name="sr_min_mapping_threshold" value="1" label="Split Read Min Mapping Threshold" help="Minimum mapping quality that a read must have to be considered"/>
139 <param type="integer" name="sr_weight" value="1" label="Split Read Weight" help="Weight of each piece of evidence from this sample"/>
140 <param type="integer" name="sr_min_clip" value="1" label="Spliy Read Min Clip" help="Minimum number of clipped bases to consider in a split read"/>
141 </section>
142 </inputs>
143 <outputs>
144 <data type="vcf" name="outfile"/>
145 </outputs>
146 </tool>