Skip to content

Commit

Permalink
Update script.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
tgaspe committed Aug 28, 2024
1 parent b8ba65a commit 9dc8fde
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions src/bcftools/bcftools_annotate/script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/bash

## VIASH START
## VIASH END

# Exit on error
set -eo pipefail

# Unset parameters
unset_if_false=(

)

for par in ${unset_if_false[@]}; do
test_val="${!par}"
[[ "$test_val" == "false" ]] && unset $par
done

# Create input array
IFS=";" read -ra input <<< $par_input

# Execute bcftools annotate with the provided arguments
bcftools annotate \
${par_first_allele_only:+--1st-allele-only} \
${par_split_by_ID:+--split-by-ID} \
${par_verbose:+--verbose} \
${par_allele_frequency_bins:+--af-bins "${par_allele_frequency_bins}"} \
${par_allele_frequency_tag:+--af-tag "${par_allele_frequency_tag}"} \
${par_collapse:+-c "${par_collapse}"} \
${par_depth:+-d "${par_depth}"} \
${par_exclude:+-e "${par_exclude}"} \
${par_exons:+-E "${par_exons}"} \
${par_apply_filters:+-f "${par_apply_filters}"} \
${par_fasta_reference:+-F "${par_fasta_reference}"} \
${par_include:+-i "${par_include}"} \
${par_regions:+-r "${par_regions}"} \
${par_regions_file:+-R "${par_regions_file}"} \
${par_regions_overlap:+--regions-overlap "${par_regions_overlap}"} \
${par_samples:+-s "${par_samples}"} \
${par_samples_file:+-S "${par_samples_file}"} \
${par_targets:+-t "${par_targets}"} \
${par_targets_file:+-T "${par_targets_file}"} \
${par_targets_overlaps:+--targets-overlap "${par_targets_overlaps}"} \
${par_user_tstv:+-u "${par_user_tstv}"} \
"${input[@]}" \
> $par_output

0 comments on commit 9dc8fde

Please sign in to comment.