Repository revision
4:971dc85e9441

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

Samtools depth tool metadata
Miscellaneous
compute the depth at each position or region
samtools_depth
toolshed.g2.bx.psu.edu/repos/iuc/samtools_depth/samtools_depth/1.15.1+galaxy2
1.15.1+galaxy2
samtools 2>&1 | grep Version
True
Version lineage of this tool (guids ordered most recent to oldest)
toolshed.g2.bx.psu.edu/repos/iuc/samtools_depth/samtools_depth/1.15.1+galaxy2 (this tool)
toolshed.g2.bx.psu.edu/repos/iuc/samtools_depth/samtools_depth/1.15.1+galaxy0
toolshed.g2.bx.psu.edu/repos/iuc/samtools_depth/samtools_depth/1.13
toolshed.g2.bx.psu.edu/repos/iuc/samtools_depth/samtools_depth/1.9
toolshed.g2.bx.psu.edu/repos/iuc/samtools_depth/samtools_depth/1.8
samtools_depth
Requirements (dependencies defined in the <requirements> tag set)
name version type
samtools 1.15.1 package
Additional information about this tool
## create symlinks to bams and index files (0,..., n-1 + 0.[bai|crai],...,n-1.[bai|crai] )

        ##prepare input and indices
        #for $i, $bam in enumerate( $input_bams ):
            ln -s '$bam' '${i}' &&
            #if $bam.is_of_type('bam'):
                #if str( $bam.metadata.bam_index ) != "None":
                    ln -s '${bam.metadata.bam_index}' '${i}.bai' &&
                #else:
                    samtools index '${i}' '${i}.bai' &&
                #end if
            #elif $bam.is_of_type('cram'):
                #if str( $bam.metadata.cram_index ) != "None":
                    ln -s '${bam.metadata.cram_index}' '${i}.crai' &&
                #else:
                    samtools index '${i}' '${i}.crai' &&
                #end if
            #end if
        #end for
    

samtools depth
$all
#if $cond_region.select_region == 'bed':
    -b '$cond_region.input_bed'
#else if $cond_region.select_region == 'text':
    -r $cond_region.region
#end if
#if str($minlength) != '':
    -l $minlength
#end if
#if str($maxdepth) != '':
    -m $maxdepth
#end if
#if str($basequality) != '':
    -q $basequality
#end if
#if str($mapquality) != '':
    -Q $mapquality
#end if
#for $i in range(len( $input_bams )):
    ${i}
#end for
#set $filter = $additional_options.required_flags

        #set $flags = 0
        #if $filter
            #set $flags = sum(map(int, str($filter).split(',')))
        #end if
    
-g $flags
#set $filter = $additional_options.skipped_flags

        #set $flags = 0
        #if $filter
            #set $flags = sum(map(int, str($filter).split(',')))
        #end if
    
-G $flags
$additional_options.deletions
$additional_options.single_read
$output_options.header
> '${output}'
    
None
False
Functional tests
name inputs outputs required files
Test-1 input_bams: eboVir3.bam
cond_region|input_bed: eboVir3.1.bed
cond_region|select_region: bed
name: value
eboVir3.bam
eboVir3.1.bed
value
Test-2 input_bams: eboVir3.bam
cond_region|region: eboVir3:500-1500
cond_region|select_region: text
name: value
eboVir3.bam
value
Test-3 input_bams: ['eboVir3.bam', 'eboVir3.2.bam']
all: -a
name: value
eboVir3.bam
eboVir3.2.bam
value
Test-4 input_bams: ['eboVir3.bam', 'eboVir3.2.bam']
minlength: 10
maxdepth: 4
basequality: 11
mapquality: 12
name: value
eboVir3.bam
eboVir3.2.bam
value
Test-5 input_bams: eboVir3.bam
cond_region|input_bed: eboVir3.1.bed
cond_region|select_region: bed
output_options|header: True
name: value
eboVir3.bam
eboVir3.1.bed
value
Test-6 input_bams: eboVir3.bam
additional_options|required_flags: ['2', '16', '64']
name: value
eboVir3.bam
value
Test-7 input_bams: eboVir3.bam
additional_options|skipped_flags: ['2', '16', '64']
name: value
eboVir3.bam
value