Repository revision
0:edbdbc64b397

Repository 'strelka_somatic'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/strelka_somatic

Strelka Somatic tool metadata
Miscellaneous
small variant caller for somatic variation in tumor/normal sample pairs
strelka_somatic
toolshed.g2.bx.psu.edu/repos/iuc/strelka_somatic/strelka_somatic/2.9.10+galaxy0
2.9.10+galaxy0
None
True
Version lineage of this tool (guids ordered most recent to oldest)
toolshed.g2.bx.psu.edu/repos/iuc/strelka_somatic/strelka_somatic/2.9.10+galaxy0 (this tool)
strelka_somatic
Requirements (dependencies defined in the <requirements> tag set)
name version type
strelka 2.9.10 package
samtools 1.9 package
Additional information about this tool
## initialize
        #if $normalBam.is_of_type('bam')
            ln -s '$normalBam' './input_normal.bam' &&
            ln -s '$normalBam.metadata.bam_index' './input_normal.bam.bai' &&
        #elif $normalBam.is_of_type('cram')
            ln -s '$normalBam' './input_normal.cram' &&
            ln -s '$normalBam.metadata.cram_index' './input_normal.cram.crai' &&
        #end if
        #if $tumorBam.is_of_type('bam')
            ln -s '$tumorBam' './input_tumor.bam' &&
            ln -s '$tumorBam.metadata.bam_index' './input_tumor.bam.bai' &&
        #elif $tumorBam.is_of_type('cram')
            ln -s '$tumorBam' './input_tumor.cram' &&
            ln -s '$tumorBam.metadata.cram_index' './input_tumor.cram.crai' &&
        #end if
        
        ##ln -s '$referenceFasta' './input_ref.fasta' &&
        ##samtools faidx './input_ref.fasta' &&

        ## Make all optional regions files available
        ## Note: all of these must be tabixed
        #set $reg_options = []
        #for $i, $sites in enumerate($forced_regions):
            #set $target_file = 'input_forcedgt_%d.vcf.gz' % $i
            #if $sites.whitelist.ext == 'vcf':
                bgzip -c '${sites.whitelist}' > $target_file &&
                tabix -p vcf $target_file &&
            #else:
                ln -s '${sites.whitelist}' $target_file &&
                ln -s '${sites.whitelist.metadata.tabix_index}' ${target_file}.tbi' &&
            #end if
            #if str($sites.use_whitelist_as) == 'indel_candidates':
                #silent $reg_options.extend(['--indelCandidates', $target_file])
            #else:
                #silent $reg_options.extend(['--forcedGT', $target_file])
            #end if
        #end for
        #if str($regions.restrict_to_region) == 'regions_from_file':
            #silent $reg_options.append('--callRegions')
            #set $target_file = 'input_callregions.bed.gz'
            #if $regions.callRegions.ext == 'bed':
                bgzip -c '$regions.callRegions' $target_file &&
                tabix -p bed $target_file &&
            else:
                ln -s '$regions.callRegions' $target_file &&
                ln -s '$regions.callRegions.tabix_index' ${target_file}.tbi &&
            #end if
            #silent $reg_options.append($target_file)
        #end if
        #set $region_spec = ' '.join($reg_options)
        #if str($ref_cond.ref_sel) == 'history':
            #set $reference_fasta_fn = 'input_ref.fasta'
            ln -s '$ref_cond.ref' $reference_fasta_fn &&
            samtools faidx $reference_fasta_fn &&
        #else
            #set $reference_fasta_fn = str($ref_cond.ref.fields.path)
        #end if
    

        ## create workflow
        configureStrelkaSomaticWorkflow.py
            #if $normalBam.is_of_type('bam')
                --normalBam ./input_normal.bam
            #elif $normalBam.is_of_type('cram')
                --normalBam ./input_normal.cram
            #end if
            #if $tumorBam.is_of_type('bam')
                --tumorBam ./input_tumor.bam
            #elif $tumorBam.is_of_type('cram')
                --tumorBam ./input_tumor.cram
            #end if
            $oo.outputCallableRegions
            
        --config='$config_file'
        $optimization
        #if str($expert_settings.evs.selector) == "disableEVS"
            --disableEVS
        #else
            #if $expert_settings.evs.snvScoringModelFile
                --snvScoringModelFile '$expert_settings.evs.snvScoringModelFile'
            #end if
            #if $expert_settings.evs.indelScoringModelFile
                --indelScoringModelFile '$expert_settings.evs.indelScoringModelFile'
            #end if
            $expert_settings.evs.reportEVSFeatures
        #end if
        $region_spec
        --referenceFasta '${reference_fasta_fn}'
        --runDir results &&
    

        ## run workflow
        
        results/runWorkflow.py
            -m local
            -j \${GALAXY_SLOTS:-2}
            -g \${GALAXY_MEMORY_MB:-8192}
    

        ## decompress results if needed and move everything to final destinations
        #if $oo.vcf_type == "decompressed"
            && bgzip -d results/results/variants/somatic.indels.vcf.gz
            && bgzip -d results/results/variants/somatic.snvs.vcf.gz
            && mv results/results/variants/somatic.indels.vcf '$out_indels'
            && mv results/results/variants/somatic.snvs.vcf '$out_snvs'
        #else
            && mv results/results/variants/somatic.indels.vcf.gz '$out_indels'
            && mv results/results/variants/somatic.snvs.vcf.gz '$out_snvs'
        #end if
        #if $oo.outputCallableRegions
            && bgzip -d results/results/regions/somatic.callable.regions.bed.gz
            && mv results/results/regions/somatic.callable.regions.bed '$out_callable'
        #end if

    
None
False
Functional tests
name inputs outputs required files
Test-1 normalBam: sample1.bam
tumorBam: sample2.bam
ref_cond|ref: hg98.fa
ref_cond|ref_sel: history
oo|vcf_type: False
name: value
name: value
sample1.bam
sample2.bam
hg98.fa
value
Test-2 normalBam: sample1.cram
tumorBam: sample2.cram
ref_cond|ref: hg98.fa
ref_cond|ref_sel: history
oo|vcf_type: True
name: value
name: value
sample1.cram
sample2.cram
hg98.fa
value
Test-3 normalBam: sample1.bam
tumorBam: sample2.bam
ref_cond|ref: hg98.fa
ref_cond|ref_sel: history
optimization: --exome
oo|vcf_type: False
oo|outputCallableRegions: True
strelka|maxIndelSize: 50
strelka|depthFilterMultiple: 2.8
strelka|snvMaxFilteredBasecallFrac: 0.5
strelka|snvMaxSpanningDeletionFrac: 0.76
strelka|indelMaxWindowFilteredBasecallFrac: 0.4
strelka|ssnvPrior: 0.0002
strelka|sindelPrior: 0.000002
strelka|ssnvNoise: 0.0000000004
strelka|sindelNoiseFactor: 2.1
strelka|ssnvNoiseStrandBiasFrac: 0.1
strelka|minTier1Mapq: 21
strelka|minTier2Mapq: 1
strelka|ssnvQuality_LowerBound: 14
strelka|sindelQuality_LowerBound: 41
strelka|ssnvContamTolerance: 0.16
strelka|indelContamTolerance: 0.16
name: value
name: value
name: value
sample1.bam
sample2.bam
hg98.fa
value
Test-4 normalBam: sample1.bam
tumorBam: sample2.bam
ref_cond|ref: hg19
ref_cond|ref_sel: cached
oo|vcf_type: False
name: value
name: value
sample1.bam
sample2.bam
value