Mercurial > repos > elixir-it > somaticsniper
changeset 0:70999d19997f draft
Uploaded
author | elixir-it |
---|---|
date | Mon, 02 Jul 2018 11:16:55 -0400 |
parents | |
children | 2ff18e84c946 |
files | somatic_sniper.xml test-data/sniper_results.vcf test-data/sniper_test_normal.bam test-data/sniper_test_tumoral.bam |
diffstat | 4 files changed, 142 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/somatic_sniper.xml Mon Jul 02 11:16:55 2018 -0400 @@ -0,0 +1,122 @@ +<tool id="somatic_sniper" name="SomaticSniper" version="1.0"> + <description>identify single nucleotide positions that are different between tumor and normal</description> + <requirements> + <requirement type="package" version="1.0.5.0">somatic-sniper</requirement> + </requirements> + <command detect_errors="aggressive"><![CDATA[ + + ## SYMLINK BAM FILES ALONGSIDE INDEX FILES + ln -s $normal normal.bam; + ln -s $normal.metadata.bam_index normal.bam.bai; + ln -s $tumor tumor.bam; + ln -s $tumor.metadata.bam_index tumor.bam.bai; + + #if $interval: + + for i in \$(cut -f1 $interval); do + + #end if + + + ## BUILD SOMATICSNIPER COMMAND LINE + \$CONDA_DEFAULT_ENV/bin/bam-somaticsniper + -F vcf + -q $advancedsettings.q + -Q $advancedsettings.Q + -T $advancedsettings.T + -N $advancedsettings.N + -r $advancedsettings.r + -n $advancedsettings.n + -t $advancedsettings.t + $advancedsettings.L + $advancedsettings.G + $advancedsettings.p + + #if $ref.ref_options == "cached" + -f ${ref.index.fields.path} + #else + -f ${ref.ownFile} + #end if + + #if $interval: + + <(samtools view -b tumor.bam \$i) + <(samtools view -b normal.bam \$i) + + #else: + tumor.bam + normal.bam + + #end if + + #if $interval: + tmp_\$i.txt + #else: + $variants + #end if + ; + + #if $interval: + + done; + + for i in \$(cut -f1 $interval); do + + if [ \$i == \$(cut -f1 $interval | head -n1) ] ; then + cat tmp_\$i.txt > $variants; + else + grep -v ^#.* tmp_\$i.txt >> $variants; + fi ; + + done; + + #end if + + + + ]]></command> + <inputs> + <conditional name="ref"> + <param name="ref_options" type="select" label="Choose the source for the reference genome"> + <option value="cached" selected="True">Use a built-in genome</option> + <option value="history">Use a genome from the history</option> + </param> + <when value="cached"> + <param name="index" type="select" label="Reference Genome File" > + <options from_data_table="all_fasta" /> + </param> + </when> + <when value="history"> + <param format="fasta" name="ownFile" type="data" metadata_name="dbkey" label="Reference Genome File" /> + </when> + </conditional> + <param format="bam" name="normal" type="data" label="Normal Alignment File" /> + <param format="bam" name="tumor" type="data" label="Tumour Alignment File" /> + <param type="data" format="txt" optional="true" name="interval" label="Specify Inteval"/> + <section name="advancedsettings" title="Advanced Settings" expanded="False" > + <param name="q" type="integer" value="0" label="Minimum read mapping quality"/> + <param name="Q" type="integer" value="15" label="Minimum somatic variant quality score"/> + <param name="T" type="float" value="0.850000" label="theta in maq consensus calling model (for -c/-g) [0.850000]"/> + <param name="N" type="integer" value="2" label="Ploidy (number of haplotypes)"/> + <param name="r" type="float" value="0.001000" label="Prior probability for differences between haplotypes"/> + <param name="n" type="text" value="NORMAL" label="Normal sample ID"/> + <param name="t" type="text" value="TUMOR" label="Tumour sample ID"/> + <param name="L" type="boolean" truevalue="-L" falsevalue="" checked="true" label="Exclude LOH variants from output" /> + <param name="G" type="boolean" truevalue="-G" falsevalue="" checked="true" label="Exclude gain of reference variants from output" /> + <param name="p" type="boolean" truevalue="-p" falsevalue="" checked="true" label="Disable priors in somatic calculation (improved sensitivity for solid tumours)" /> + </section> + </inputs> + <outputs> + <data name="variants" format="vcf" label="SomaticSniper SNVs" /> + </outputs> + <tests> + <test> + <param name="normal" file="sniper_test_normal.bam" /> + <param name="tumor" file="sniper_test_tumoral.bam" /> + <output name="variants" file="sniper_results.vcf" /> + </test> + </tests> + <help> + http://gmt.genome.wustl.edu/packages/somatic-sniper/ + </help> +</tool>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/sniper_results.vcf Mon Jul 02 11:16:55 2018 -0400 @@ -0,0 +1,20 @@ +##fileformat=VCFv4.1 +##fileDate=20180622 +##phasing=none +##reference=file:///export/gatkhg38pl/GRCh38.d1.vd1.fa +##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype"> +##FORMAT=<ID=IGT,Number=1,Type=String,Description="Genotype when called independently (only filled if called in joint prior mode)"> +##FORMAT=<ID=DP,Number=1,Type=Integer,Description="Total read depth"> +##FORMAT=<ID=DP4,Number=4,Type=Integer,Description="# high-quality ref-forward bases, ref-reverse, alt-forward and alt-reverse bases"> +##FORMAT=<ID=BCOUNT,Number=4,Type=Integer,Description="Occurrence count for each base at this site (A,C,G,T)"> +##FORMAT=<ID=GQ,Number=1,Type=Integer,Description="Genotype quality"> +##FORMAT=<ID=JGQ,Number=1,Type=Integer,Description="Joint genotype quality (only filled if called in join prior mode)"> +##FORMAT=<ID=VAQ,Number=1,Type=Integer,Description="Variant allele quality"> +##FORMAT=<ID=BQ,Number=.,Type=Integer,Description="Average base quality"> +##FORMAT=<ID=MQ,Number=1,Type=Integer,Description="Average mapping quality across all reads"> +##FORMAT=<ID=AMQ,Number=.,Type=Integer,Description="Average mapping quality for each allele present in the genotype"> +##FORMAT=<ID=SS,Number=1,Type=Integer,Description="Variant status relative to non-adjacent Normal, 0=wildtype,1=germline,2=somatic,3=LOH,4=unknown"> +##FORMAT=<ID=SSC,Number=1,Type=Integer,Description="Somatic Score"> +#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT NORMAL TUMOR +chr22 22714396 . G A . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:15:0,15,0,0:0,0,15,0:72:.:0:30:60:60:0:. 0/1:0/1:41:0,28,0,13:13,0,28,0:59:.:59:30,31:60:60,60:2:45 +chr22 22714411 . T C . . . GT:IGT:DP:DP4:BCOUNT:GQ:JGQ:VAQ:BQ:MQ:AMQ:SS:SSC 0/0:0/0:9:0,9,0,0:0,0,0,9:54:.:0:30:60:60:0:. 0/1:0/1:28:0,22,0,6:0,6,0,22:32:.:32:32,31:60:60,60:2:27