Miscellaneous |
Version lineage of this tool (guids ordered most recent to oldest) |
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_plugin_counts/bcftools_plugin_counts/1.15.1+galaxy3 (this tool) |
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_plugin_counts/bcftools_plugin_counts/1.15.1+galaxy2 |
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_plugin_counts/bcftools_plugin_counts/1.15.1+galaxy1 |
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_plugin_counts/bcftools_plugin_counts/1.15.1+galaxy0 |
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_plugin_counts/bcftools_plugin_counts/1.10+galaxy1 |
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_plugin_counts/bcftools_plugin_counts/1.10 |
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_plugin_counts/bcftools_plugin_counts/1.9+galaxy1 |
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_plugin_counts/bcftools_plugin_counts/1.9 |
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_plugin_counts/bcftools_plugin_counts/1.4.0 |
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_plugin_counts/bcftools_plugin_counts/1.3.1 |
toolshed.g2.bx.psu.edu/repos/iuc/bcftools_plugin_counts/bcftools_plugin_counts/1.3.0 |
bcftools_plugin_counts |
Requirements (dependencies defined in the <requirements> tag set) |
name | version | type |
bcftools | 1.15.1 | package |
htslib | 1.15.1 | package |
python | 3.7 | 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_restrict #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 #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 plugin counts ## VCF input section #set $section = $sec_restrict #if $section.include: --include '${section.include}' #end if #if $section.exclude: --exclude '${section.exclude}' #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 #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 ## Primary Input/Outputs $input_vcf | tee counts_file.txt && sed 's/^.* \([a-zA-Z]*\):[ ]*\([0-9]*\)$/\1 \2/' counts_file.txt | python $transform > '$output_file'
Functional tests |
name | inputs | outputs | required files |
Test-1 |
input_file: view.vcf |
name: value |
view.vcf value |