Miscellaneous |
Version lineage of this tool (guids ordered most recent to oldest) |
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_annotate/bcftools_annotate/1.15.1+galaxy4 (this tool) |
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_annotate/bcftools_annotate/1.15.1+galaxy3 |
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_annotate/bcftools_annotate/1.15.1+galaxy2 |
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_annotate/bcftools_annotate/1.15.1+galaxy1 |
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_annotate/bcftools_annotate/1.15.1+galaxy0 |
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_annotate/bcftools_annotate/1.10+galaxy1 |
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_annotate/bcftools_annotate/1.10 |
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_annotate/bcftools_annotate/1.9+galaxy2 |
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_annotate/bcftools_annotate/1.9+galaxy1 |
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_annotate/bcftools_annotate/1.9 |
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_annotate/bcftools_annotate/1.4.0 |
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_annotate/bcftools_annotate/1.3.1 |
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_annotate/bcftools_annotate/1.3.0 |
bcftools_annotate |
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 $annotation_file = None #set $annotation_hdr = None #set $section = $sec_annofile #if $section.annofile.anno_fmt == 'vcf': #if $section.annofile.annotations.is_of_type('vcf') #set $annotation_file = 'annotations.vcf.gz' bgzip -c '$section.annofile.annotations' > $annotation_file && bcftools index $annotation_file && #elif $section.annofile.annotations.is_of_type('bcf') #set $annotation_file = 'annotations.bcf' ln -s '$section.annofile.annotations' $annotation_file && #if $section.annofile.annotations.metadata.bcf_index: ln -s '${section.annofile.annotations.metadata.bcf_index}' ${annotation_file}.csi && #else bcftools index $annotation_file && #end if #end if #elif $section.annofile.anno_fmt == 'tab': #if $section.annofile.annotations.is_of_type('bed') #set $annotation_file = 'annotations.bed.gz' bgzip -c '$section.annofile.annotations' > $annotation_file && tabix -s 1 -b 2 -e 3 $annotation_file && #else: #set $annotation_file = 'annotations.tab.gz' bgzip -c '$section.annofile.annotations' > $annotation_file && tabix -s 1 -b 2 -e 2 $annotation_file && #end if #if $section.annofile.header_file: #set $annotation_hdr = $section.annofile.header_file #elif $section.annofile.header_lines: #set $annotation_hdr = 'annotation.hdr' grep '^\#\#INFO' '${hdr_file}' > $annotation_hdr && #end if #end if #set $section = $sec_restrict bcftools annotate #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 #set $section = $sec_annofile #if $section.columns != '': --columns '${section.columns}' #end if #if $annotation_file: --annotations '${annotation_file}' #end if #if $annotation_hdr: --header-lines '${annotation_hdr}' #end if #if $section.set_id: --set-id '${section.set_id}' #end if #if $section.mark_sites: --mark-sites '${section.mark_sites}' #end if #if $section.min_overlap --min-overlap '$section.min_overlap' #end if #set $section = $sec_annotate #if $section.rename_chrs: --rename-chrs '${section.rename_chrs}' #end if #if $section.remove: --remove '${section.remove}' #end if #if $section.rename_annots --rename-annots '$section.rename_annots' #end if ## Default section #set $section = $sec_restrict #if $section.include: --include '${section.include}' #end if #if $section.exclude: --exclude '${section.exclude}' #end if #if $section.collapse: --collapse ${section.collapse} #end if #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 #if str($output_type) != "__none__": --output-type '${output_type}' #end if --threads \${GALAXY_SLOTS:-4} ## Primary Input/Outputs $input_vcf > '$output_file'
Functional tests |
name | inputs | outputs | required files |
Test-1 |
input_file: annotate.vcf sec_annofile|columns: CHROM,POS,REF,ALT,ID,QUAL,INFO/T_INT,INFO/T_FLOAT,INDEL sec_annofile|annofile|annotations: annotate.tab sec_annofile|annofile|header_file: annotate.hdr sec_annofile|annofile|anno_fmt: tab output_type: v |
name: value |
annotate.vcf annotate.tab annotate.hdr value |
Test-2 |
input_file: annotate.vcf sec_annofile|columns: CHROM,FROM,TO,T_STR sec_annofile|annofile|annotations: annotate2.tab sec_annofile|annofile|header_file: annotate.hdr sec_annofile|annofile|anno_fmt: tab sec_annofile|set_id: %CHROM\_%POS\_%REF\_%FIRST_ALT output_type: v |
name: value |
annotate.vcf annotate2.tab annotate.hdr value |
Test-3 |
input_file: annotate.vcf sec_annofile|columns: STR,ID,QUAL,FILTER sec_annofile|annofile|annotations: annots.vcf sec_annofile|annofile|anno_fmt: vcf output_type: v |
name: value |
annotate.vcf annots.vcf value |
Test-4 |
input_file: annotate.vcf sec_annofile|columns: STR,ID,QUAL,FILTER sec_annofile|annofile|annotations: annots.bcf sec_annofile|annofile|anno_fmt: vcf output_type: v |
name: value |
annotate.vcf annots.bcf value |
Test-5 |
input_file: annotate2.vcf sec_annofile|columns: ID,QUAL,FILTER,INFO,FMT sec_annofile|annofile|annotations: annots2.vcf sec_annofile|annofile|anno_fmt: vcf output_type: v |
name: value |
annotate2.vcf annots2.vcf value |
Test-6 |
input_file: annotate2.vcf sec_annofile|columns: ID,QUAL,FILTER,INFO,FMT sec_annofile|annofile|annotations: annots2.vcf sec_annofile|annofile|anno_fmt: vcf sec_restrict|samples: A output_type: v |
name: value |
annotate2.vcf annots2.vcf value |
Test-7 |
input_file: annotate3.vcf sec_annofile|annofile|anno_fmt: none sec_annotate|remove: ID,QUAL,^FILTER/fltA,FILTER/fltB,^INFO/AA,INFO/BB,^FMT/GT,FMT/PL output_type: v |
name: value |
annotate3.vcf value |
Test-8 |
input_file: annotate3.vcf sec_annofile|annofile|anno_fmt: none sec_annotate|remove: FORMAT output_type: v |
name: value |
annotate3.vcf value |
Test-9 |
input_file: annotate3.vcf sec_annofile|annofile|anno_fmt: none sec_annotate|remove: FORMAT sec_restrict|regions_overlap: 1 output_type: v |
name: value |
annotate3.vcf value |
Test-10 |
input_file: annotate3.vcf sec_annofile|annofile|anno_fmt: none sec_annofile|min_overlap: 0.5 sec_annotate|remove: FORMAT output_type: v |
name: value |
annotate3.vcf value |