comparison somatic_sniper.xml @ 0:70999d19997f draft

Uploaded
author elixir-it
date Mon, 02 Jul 2018 11:16:55 -0400
parents
children f7d69881bdec
comparison
equal deleted inserted replaced
-1:000000000000 0:70999d19997f
1 <tool id="somatic_sniper" name="SomaticSniper" version="1.0">
2 <description>identify single nucleotide positions that are different between tumor and normal</description>
3 <requirements>
4 <requirement type="package" version="1.0.5.0">somatic-sniper</requirement>
5 </requirements>
6 <command detect_errors="aggressive"><![CDATA[
7
8 ## SYMLINK BAM FILES ALONGSIDE INDEX FILES
9 ln -s $normal normal.bam;
10 ln -s $normal.metadata.bam_index normal.bam.bai;
11 ln -s $tumor tumor.bam;
12 ln -s $tumor.metadata.bam_index tumor.bam.bai;
13
14 #if $interval:
15
16 for i in \$(cut -f1 $interval); do
17
18 #end if
19
20
21 ## BUILD SOMATICSNIPER COMMAND LINE
22 \$CONDA_DEFAULT_ENV/bin/bam-somaticsniper
23 -F vcf
24 -q $advancedsettings.q
25 -Q $advancedsettings.Q
26 -T $advancedsettings.T
27 -N $advancedsettings.N
28 -r $advancedsettings.r
29 -n $advancedsettings.n
30 -t $advancedsettings.t
31 $advancedsettings.L
32 $advancedsettings.G
33 $advancedsettings.p
34
35 #if $ref.ref_options == "cached"
36 -f ${ref.index.fields.path}
37 #else
38 -f ${ref.ownFile}
39 #end if
40
41 #if $interval:
42
43 <(samtools view -b tumor.bam \$i)
44 <(samtools view -b normal.bam \$i)
45
46 #else:
47 tumor.bam
48 normal.bam
49
50 #end if
51
52 #if $interval:
53 tmp_\$i.txt
54 #else:
55 $variants
56 #end if
57 ;
58
59 #if $interval:
60
61 done;
62
63 for i in \$(cut -f1 $interval); do
64
65 if [ \$i == \$(cut -f1 $interval | head -n1) ] ; then
66 cat tmp_\$i.txt > $variants;
67 else
68 grep -v ^#.* tmp_\$i.txt >> $variants;
69 fi ;
70
71 done;
72
73 #end if
74
75
76
77 ]]></command>
78 <inputs>
79 <conditional name="ref">
80 <param name="ref_options" type="select" label="Choose the source for the reference genome">
81 <option value="cached" selected="True">Use a built-in genome</option>
82 <option value="history">Use a genome from the history</option>
83 </param>
84 <when value="cached">
85 <param name="index" type="select" label="Reference Genome File" >
86 <options from_data_table="all_fasta" />
87 </param>
88 </when>
89 <when value="history">
90 <param format="fasta" name="ownFile" type="data" metadata_name="dbkey" label="Reference Genome File" />
91 </when>
92 </conditional>
93 <param format="bam" name="normal" type="data" label="Normal Alignment File" />
94 <param format="bam" name="tumor" type="data" label="Tumour Alignment File" />
95 <param type="data" format="txt" optional="true" name="interval" label="Specify Inteval"/>
96 <section name="advancedsettings" title="Advanced Settings" expanded="False" >
97 <param name="q" type="integer" value="0" label="Minimum read mapping quality"/>
98 <param name="Q" type="integer" value="15" label="Minimum somatic variant quality score"/>
99 <param name="T" type="float" value="0.850000" label="theta in maq consensus calling model (for -c/-g) [0.850000]"/>
100 <param name="N" type="integer" value="2" label="Ploidy (number of haplotypes)"/>
101 <param name="r" type="float" value="0.001000" label="Prior probability for differences between haplotypes"/>
102 <param name="n" type="text" value="NORMAL" label="Normal sample ID"/>
103 <param name="t" type="text" value="TUMOR" label="Tumour sample ID"/>
104 <param name="L" type="boolean" truevalue="-L" falsevalue="" checked="true" label="Exclude LOH variants from output" />
105 <param name="G" type="boolean" truevalue="-G" falsevalue="" checked="true" label="Exclude gain of reference variants from output" />
106 <param name="p" type="boolean" truevalue="-p" falsevalue="" checked="true" label="Disable priors in somatic calculation (improved sensitivity for solid tumours)" />
107 </section>
108 </inputs>
109 <outputs>
110 <data name="variants" format="vcf" label="SomaticSniper SNVs" />
111 </outputs>
112 <tests>
113 <test>
114 <param name="normal" file="sniper_test_normal.bam" />
115 <param name="tumor" file="sniper_test_tumoral.bam" />
116 <output name="variants" file="sniper_results.vcf" />
117 </test>
118 </tests>
119 <help>
120 http://gmt.genome.wustl.edu/packages/somatic-sniper/
121 </help>
122 </tool>