Repository revision
19:4935320a59a8

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

bcftools convert to vcf tool metadata
Miscellaneous
Converts other formats to VCF/BCFk
bcftools_convert_to_vcf
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_convert_to_vcf/bcftools_convert_to_vcf/1.15.1+galaxy3
1.15.1+galaxy3
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_convert_to_vcf/bcftools_convert_to_vcf/1.15.1+galaxy3 (this tool)
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_convert_to_vcf/bcftools_convert_to_vcf/1.15.1+galaxy2
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_convert_to_vcf/bcftools_convert_to_vcf/1.15.1+galaxy1
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_convert_to_vcf/bcftools_convert_to_vcf/1.15.1+galaxy0
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_convert_to_vcf/bcftools_convert_to_vcf/1.10
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_convert_to_vcf/bcftools_convert_to_vcf/1.9+galaxy1
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_convert_to_vcf/bcftools_convert_to_vcf/1.9
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_convert_to_vcf/bcftools_convert_to_vcf/1.4.0
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_convert_to_vcf/bcftools_convert_to_vcf/1.3.1
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_convert_to_vcf/bcftools_convert_to_vcf/1.3.0
bcftools_convert_to_vcf
Requirements (dependencies defined in the <requirements> tag set)
name version type
bcftools 1.15.1 package
htslib 1.15.1 package
samtools 1.15.1 package
Additional information about this tool
export BCFTOOLS_PLUGINS=`which bcftools | sed 's,bin/bcftools,libexec/bcftools,'`;

  
#set $input_vcf = None
#if $convert.convert_from == 'gvcf':
  #set $input_vcf = 'input.vcf.gz'
  #if $convert.input_file.is_of_type('vcf')
    bgzip -c '$convert.input_file' > $input_vcf &&
    bcftools index $input_vcf &&
  #elif $convert.input_file.is_of_type('vcf_bgzip')
    ln -s '$convert.input_file' $input_vcf
  #elif $convert.input_file.is_of_type('bcf')
    #set $input_vcf = 'input.bcf'
    ln -s '$convert.input_file' $input_vcf &&
    bcftools index $input_vcf &&
  #elif $convert.input_file.is_of_type('bcf_bgzip')
    ln -s '$convert.input_file' $input_vcf &&
  #end if
#end if
#if $convert.convert_from == 'gvcf' or $convert.convert_from == 'tsv':
  #set $section = $convert.reference_source
  

#set $input_fa_ref = None
#if 'fasta_ref' in $section and $section.fasta_ref:
  #if 'reference_source_selector' in $section:
    #if str($section.reference_source_selector) == "history":
      #set $input_fa_ref = 'ref.fa'
      ln -s '$section.fasta_ref' $input_fa_ref &&
      samtools faidx $input_fa_ref &&
    #else:
      #set $input_fa_ref = str($section.fasta_ref.fields.path)
    #end if
  #end if
#end if

  
#end if

bcftools convert


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

#if $convert.convert_from == 'gen_sample':
  --gensample2vcf '$convert.input_file,$convert.input_sample'
#elif $convert.convert_from == 'hap_sample':
  --hapsample2vcf '$convert.input_file,$convert.input_sample'
#elif $convert.convert_from == 'hap_legend_sample':
  --haplegendsample2vcf '$convert.input_file,$convert.input_legend,$convert.input_sample'
#elif $convert.convert_from == 'gvcf':
   
#if $input_fa_ref is not None:
  --fasta-ref $input_fa_ref
#elif 'fasta_ref' in $section and $section.fasta_ref:
  --fasta-ref '${section.fasta_ref}'
#end if
  
   --gvcf2vcf $input_vcf
#elif $convert.convert_from == 'tsv':
   
#if $input_fa_ref is not None:
  --fasta-ref $input_fa_ref
#elif 'fasta_ref' in $section and $section.fasta_ref:
  --fasta-ref '${section.fasta_ref}'
#end if
  
   #set $section = $convert
   
#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
  
   
#if $section.columns != '':
  --columns '${section.columns}'
#end if
  
   --tsv2vcf '$convert.input_file'
#end if
> '$output_file'

    
None
False
Functional tests
name inputs outputs required files
Test-1 convert|input_file: convert.gs.gt.gen
convert|input_sample: convert.gs.gt.samples
convert|convert_from: gen_sample
output_type: v
name: value
convert.gs.gt.gen
convert.gs.gt.samples
value
Test-2 convert|input_file: convert.hs.gt.hap
convert|input_sample: convert.hs.gt.samples
convert|convert_from: hap_sample
output_type: v
name: value
convert.hs.gt.hap
convert.hs.gt.samples
value
Test-3 convert|input_file: convert.hls.gt.hap
convert|input_legend: convert.hls.gt.legend
convert|input_sample: convert.hls.gt.samples
convert|convert_from: hap_legend_sample
output_type: v
name: value
convert.hls.gt.hap
convert.hls.gt.legend
convert.hls.gt.samples
value
Test-4 convert|input_file: convert.gvcf.vcf
convert|reference_source|fasta_ref: gvcf.fa
convert|reference_source|reference_source_selector: history
convert|convert_from: gvcf
output_type: v
name: value
convert.gvcf.vcf
gvcf.fa
value
Test-5 convert|input_file: convert.gvcf.vcf
convert|reference_source|fasta_ref: gvcf
convert|reference_source|reference_source_selector: cached
convert|convert_from: gvcf
output_type: v
name: value
convert.gvcf.vcf
value
Test-6 convert|input_file: convert.23andme
convert|reference_source|fasta_ref: 23andme.fa
convert|reference_source|reference_source_selector: history
convert|samples: SAMPLE1
convert|columns: ID,CHROM,POS,AA
convert|convert_from: tsv
output_type: v
name: value
convert.23andme
23andme.fa
value
Test-7 convert|input_file: convert.23andme
convert|reference_source|fasta_ref: 23andme
convert|reference_source|reference_source_selector: cached
convert|samples: SAMPLE1
convert|columns: ID,CHROM,POS,AA
convert|convert_from: tsv
output_type: v
name: value
convert.23andme
value