Repository revision
17:22637b1a55bf

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

bcftools call tool metadata
Miscellaneous
SNP/indel variant calling from VCF/BCF
bcftools_call
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_call/bcftools_call/1.15.1+galaxy0
1.15.1+galaxy0
bcftools 2>&1 | grep 'Version:'
True
Version lineage of this tool (guids ordered most recent to oldest)
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_call/bcftools_call/1.15.1+galaxy1
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_call/bcftools_call/1.15.1+galaxy0 (this tool)
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_call/bcftools_call/1.10
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_call/bcftools_call/1.9+galaxy1
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_call/bcftools_call/1.9
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_call/bcftools_call/1.4.0
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_call/bcftools_call/1.3.2.0
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_call/bcftools_call/1.3.2
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_call/bcftools_call/1.3.0
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_call/bcftools_call/1.2.0
bcftools_call
Requirements (dependencies defined in the <requirements> tag set)
name version type
bcftools 1.15.1 package
htslib 1.15.1 package
Additional information about this tool
export BCFTOOLS_PLUGINS=`which bcftools | sed 's,bin/bcftools,libexec/bcftools,'`;

  


## May need to symlink input if there is an associated
#set $input_vcf = 'input.vcf.gz'
#if $input_file.is_of_type('vcf')
  bgzip -c '$input_file' > $input_vcf &&
  bcftools index $input_vcf &&
##elif $input_file.is_of_type('vcf_bgzip') or $input_file.is_of_type('vcf.gz')
#elif $input_file.is_of_type('vcf_bgzip')
  ln -s '$input_file' $input_vcf &&
  #if $input_file.metadata.tabix_index:
    ln -s '${input_file.metadata.tabix_index}' ${input_vcf}.tbi &&
  #else
    bcftools index $input_vcf &&
  #end if
#elif $input_file.is_of_type('bcf')
  #set $input_vcf = 'input.bcf'
  ln -s '$input_file' $input_vcf &&
  #if $input_file.metadata.bcf_index:
    ln -s '${input_file.metadata.bcf_index}' ${input_vcf}.csi &&
  #else
    bcftools index $input_vcf &&
  #end if
#end if

  
#set $section = $sec_consensus_variant_calling.variant_calling
#set $targets_path = None
#if $section.method == 'multiallelic':
    #if $section.genotypes.constrain == 'alleles':
        #set $section = $sec_consensus_variant_calling.variant_calling.genotypes
        

#set $targets_path = None
#if 'targets' in $section
  #if $section.targets.targets_src == 'targets_file':
    #set $targets_path = 'targets_file.tab.gz'
    bgzip -c "$section.targets.targets_file" > $targets_path &&
    tabix -s 1 -b 2 -e 2 $targets_path &&
  #end if
#elif $tgts_sec.targets_file:
  #set $targets_path = 'targets_file.tab.gz'
  bgzip -c "$section.targets_file" > $targets_path &&
  tabix -s 1 -b 2 -e 2 $targets_path &&
#end if

  
    #end if
#end if
#set $section = $sec_restrict


#set $regions_path = None
#if 'regions' in $section
  #if $section.regions.regions_src == 'regions_file' and $section.regions.regions_file:
    #if $section.regions.regions_file.ext.startswith('bed'):
      #set $regions_path = 'regions_file.bed'
      ln -s '$section.regions.regions_file' $regions_path &&
    #end if
  #end if
#end if

  

bcftools call

#set $section = $sec_consensus_variant_calling.variant_calling
#if $section.method == 'multiallelic':
    -m
    #if str($section.gvcf):
        --gvcf $section.gvcf
    #end if
    #if str($section.prior_freqs):
        --prior-freqs '$section.prior_freqs'
    #end if
    #if str($section.prior):
        --prior $section.prior
    #end if
    #if $section.genotypes.constrain == 'alleles':
        --constrain alleles $section.genotypes.insert_missed
        #set $section = $sec_consensus_variant_calling.variant_calling.genotypes
        

#if $targets_path is not None:
  --targets-file "${section.invert_targets_file}${targets_path}"
#elif $section.targets_file:
  --targets-file "${section.invert_targets_file}${section.targets_file}"
#end if

  
    #else
        #if $section.genotypes.constrain == 'trio':
            --constrain trio
            
            #set $novel_rate = []
            #if str($section.genotypes.novel_rate_snp):
              #silent $novel_rate.append(str($section.genotypes.novel_rate_snp))
            #end if
            #if str($section.genotypes.novel_rate_del):
              #silent $novel_rate.append(str($section.genotypes.novel_rate_del))
            #end if
            #if str($section.genotypes.novel_rate_ins):
              #silent $novel_rate.append(str($section.genotypes.novel_rate_ins))
            #end if
            #if len($novel_rate) > 0:
               --novel-rate '#echo ','.join($novel_rate)#'
            #end if
        
        #end if
        #set $section = $sec_consensus_variant_calling.variant_calling.genotypes
        

#if $targets_path:
  --targets-file "${section.targets.invert_targets_file}${targets_path}"
#elif $section.targets.targets_src == 'targets':
  #set $intervals = $section.targets.targets
  

#set $components = []
#for $i in $intervals:
  #set $chrom = str($i.chrom).strip()
  #set $start = str($i.start).strip()
  #set $stop = str($i.stop).strip()
  #if $start or $stop:
    $components.append($chrom + ':' + ($start or '0') + '-' + $stop)
  #else:
    $components.append($chrom)
  #end if
#end for
#set $intervals_spec = ','.join($components)

  
  --targets '${section.targets.invert_targets_file}$intervals_spec'
#elif $section.targets.targets_src == 'targets_file' and $section.targets.targets_file:
  --targets-file "${section.targets.invert_targets_file}${section.targets.targets_file}"
#end if
#if $section.targets_overlap
  --targets-overlap $section.targets_overlap
#end if

  
    #end if
#else
    -c
    #if str($section.pval_threshold):
        --pval-threshold $section.pval_threshold
    #end if
#end if

#set $section = $sec_restrict


#if $section.regions.regions_src == 'regions':
  #set $intervals = $section.regions.regions
  

#set $components = []
#for $i in $intervals:
  #set $chrom = str($i.chrom).strip()
  #set $start = str($i.start).strip()
  #set $stop = str($i.stop).strip()
  #if $start or $stop:
    $components.append($chrom + ':' + ($start or '0') + '-' + $stop)
  #else:
    $components.append($chrom)
  #end if
#end for
#set $intervals_spec = ','.join($components)

  
  --regions '$intervals_spec'
#elif $section.regions.regions_src == 'regions_file' and $section.regions.regions_file:
  #if $regions_path is not None:
    --regions-file '$regions_path'
  #else:
    --regions-file '$section.regions.regions_file'
  #end if
#end if
#if $section.regions_overlap
  --regions-overlap $section.regions_overlap
#end if


  

#set $samples_defined = False
#if str($section.samples) != '':
  #set $samples_defined = True
  --samples '${section.invert_samples}${section.samples}'
#end if
#if $section.samples_file:
  #set $samples_defined = True
  --samples-file "${section.invert_samples_file}${section.samples_file}"
#end if
  

## File format section
#set $section = $sec_file_format
#if $section.ploidy:
    --ploidy ${section.ploidy}
#end if
#if $section.ploidy_file:
    --ploidy-file '${section.ploidy_file}'
#end if

## Input/output section
#set $section = $sec_input_output
${section.group_samples}
${section.keep_alts}
#if $section.format_fields:
    --format-fields '${section.format_fields}'
#end if
${section.keep_masked_ref}
#if $section.skip_variants:
    --skip-variants ${section.skip_variants}
#end if
${section.variants_only}

#if $section.output_tags
    --annotate $section.output_tags
#end if


#if str($output_type) != "__none__":
  --output-type '${output_type}'
#end if
  

  --threads \${GALAXY_SLOTS:-4}
  

## Primary Input/Outputs

$input_vcf
  
> '$output_file'
    
None
False
Functional tests
name inputs outputs required files
Test-1 input_file: mpileup.vcf
sec_consensus_variant_calling|variant_calling|method: multiallelic
sec_input_output|variants_only: True
output_type: v
name: value
mpileup.vcf
value
Test-2 input_file: mpileup.vcf
sec_consensus_variant_calling|variant_calling|gvcf: 0
sec_consensus_variant_calling|variant_calling|method: multiallelic
output_type: v
name: value
mpileup.vcf
value
Test-3 input_file: mpileup.X.vcf
sec_restrict|samples_file: mpileup.samples
sec_consensus_variant_calling|variant_calling|method: multiallelic
sec_file_format|ploidy_file: mpileup.ploidy
output_type: v
name: value
mpileup.X.vcf
mpileup.samples
mpileup.ploidy
value
Test-4 input_file: mpileup.X.vcf
sec_consensus_variant_calling|variant_calling|method: consensus
sec_file_format|ploidy_file: mpileup.ploidy
output_type: v
name: value
mpileup.X.vcf
mpileup.ploidy
value
Test-5 input_file: mpileup.X.vcf
sec_consensus_variant_calling|variant_calling|method: consensus
sec_file_format|ploidy_file: mpileup.ploidy
sec_input_output|output_tags: INFO/PV4
output_type: v
name: value
mpileup.X.vcf
mpileup.ploidy
value
Test-6 input_file: mpileup.vcf
sec_restrict|regions_overlap: 1
sec_consensus_variant_calling|variant_calling|method: multiallelic
sec_input_output|variants_only: True
output_type: v
name: value
mpileup.vcf
value
Test-7 input_file: mpileup.AD.vcf
sec_consensus_variant_calling|variant_calling|method: multiallelic
sec_input_output|group_samples: True
output_type: v
name: value
mpileup.AD.vcf
value