Skip to content

Commit

Permalink
add script to call
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiWaldrant committed Feb 5, 2024
1 parent 4f283b5 commit d42281a
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/lofreq/call/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ functionality:
Input BAM file.
required: true
example: "normal.bam"
- name: --ref
alternatives: -f
type: file
description: |
Indexed reference fasta file (gzip supported) [null].
required: true
example: "reference.fasta"
- name: Outputs
arguments:
- name: --output
Expand All @@ -37,13 +44,6 @@ functionality:
example: "output.vcf"
- name: Arguments
arguments:
- name: --ref
alternatives: -f
type: file
description: |
Indexed reference fasta file (gzip supported) [null].
required: false
example: "reference.fasta"
- name: --region
alternatives: -r
type: string
Expand Down Expand Up @@ -157,8 +157,6 @@ functionality:
description: |
Ignore variants in this vcf file for source quality computation. Multiple files can be given separated by commas.
required: false
multiple: true
separator: ","
example: "variants.vcf"
- name: --def_nm_q
alternatives: -T
Expand Down
58 changes: 58 additions & 0 deletions src/lofreq/call/script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/bash

## VIASH START
## VIASH END

# Unset all parameters that are set to "false"
[[ "$par_no_baq" == "false" ]] && unset par_no_baq
[[ "$par_no_idaq" == "false" ]] && unset par_no_idaq
[[ "$par_del_baq" == "false" ]] && unset par_del_baq
[[ "$par_no_ext_baq" == "false" ]] && unset par_no_ext_baq
[[ "$par_no_mq" == "false" ]] && unset par_no_mq
[[ "$par_call_indels" == "false" ]] && unset par_call_indels
[[ "$par_only_indels" == "false" ]] && unset par_only_indels
[[ "$par_src_qual" == "false" ]] && unset par_src_qual
[[ "$par_illumina_13" == "false" ]] && unset par_illumina_13
[[ "$par_use_orphan" == "false" ]] && unset par_use_orphan
[[ "$_plp_summary_only" == "false" ]] && unset _plp_summary_only
[[ "$par_no_default_filter" == "false" ]] && unset par_no_default_filter
[[ "$par_force_overwrite" == "false" ]] && unset par_force_overwrite
[[ "$par_verbose" == "false" ]] && unset par_verbose
[[ "$par_debug" == "false" ]] && unset par_debug

# Run lofreq call
lofreq call \
-f "$par_ref" \
-o "$par_output" \
${par_region:+-r "${par_region}"} \
${par_bed:+-l "${par_bed}"} \
${par_min_bq:+-q "${par_min_bq}"} \
${par_min_alt_bq:+-Q "${par_min_alt_bq}"} \
${par_def_alt_bq:+-R "${par_def_alt_bq}"} \
${par_min_jq:+-j "${par_min_jq}"} \
${par_alt_jq:+-K "${par_alt_jq}"} \
${par_no_baq:+-B} \
${par_no_idaq:+-A} \
${par_del_baq:+-D} \
${par_no_ext_baq:+-e} \
${par_min_mq:+-m "${par_min_mq}"} \
${par_max_mq:+-M "${par_max_mq}"} \
${par_no_mq:+-N} \
${par_call_indels:+--call-indels} \
${par_only_indels:+--only-indels} \
${par_src_qual:+-s} \
${par_ign_vcf:+-S "${par_ign_vcf}"} \
${par_def_nm_q:+-T "${par_def_nm_q}"} \
${par_sig:+-a "${par_sig}"} \
${par_bonf:+-b "${par_bonf}"} \
${par_min_cov:+-C "${par_min_cov}"} \
${par_max_depth:+-d "${par_max_depth}"} \
${par_illumina_13:+--illumina-1.3} \
${par_use_orphan:+--use-orphan} \
${par_plp_summary_only:+--plp-summary-only} \
${par_no_default_filter:+--no-default-filter} \
${par_force_overwrite:+--force-overwrite} \
${par_verbose:+--verbose} \
${par_debug:+--debug} \
"$par_input"

0 comments on commit d42281a

Please sign in to comment.