<commit_before><tool id="vardict" name="VarDict" version="@WRAPPER_VERSION@">
    <description>calls SNVs and indels for tumour-normal pairs</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <requirements>
        <requirement type="package" version="5.0.1">gawk</requirement>
        <!--<requirement type="package" version="3.2.1">R</requirement>-->
        <requirement type="package" version="1.10">samtools</requirement>
        <requirement type="package" version="@TOOL_VERSION@">vardict-java</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
        ## LINK BAM INDEX
        ln -s '$normal' ./normal.bam &&
        ln -s '$normal.metadata.bam_index' ./normal.bam.bai &&
        ln -s '$tumour' ./tumor.bam &&
        ln -s '$tumour.metadata.bam_index' ./tumor.bam.bai &&

        ## INDEX REFERENCE FASTA FILE IF FROM HISTORY
        #if $reference_source.reference_source_selector == "history":
            ln -s '$reference_source.ref_file' ./ref.fa &&
            samtools faidx ./ref.fa 2>&1 || echo 'Error running samtools faidx for indexing fasta reference for vardict' >&2 &&
        #else if $reference_source.reference_source_selector == "cached"
            ln -s '$reference_source.ref_file.fields.path' ./ref.fa &&
            ln -s '${reference_source.ref_file.fields.path}.fai' ./ref.fa.fai &&
        #end if

        ## BUILD BED FILE FROM CHROMOSOME LIST
        #if $interval_file:
            grep -w -f '$interval_file' ./ref.fa.fai > ./chromosomes.fa.fai &&
        #else
            ln -s ./ref.fa.fai ./chromosomes.fa.fai &&
        #end if
        awk 'BEGIN {FS=OFS="\t"} {print $1, "1", $2}' ./chromosomes.fa.fai > ./regions.bed &&

        ## BUILD VARDICT COMMAND
        vardictjava
        -b "./tumor.bam|./normal.bam"
        -G ./ref.fa
        -z
        -th \${GALAXY_SLOTS:-1}

        ## ADVANCED OPTIONS
        -f '$advancedsettings.f'
        -k '$advancedsettings.k'
        -r '$advancedsettings.r'
        -B '$advancedsettings.B'
        -Q '$advancedsettings.Q'
        -q '$advancedsettings.q'
        -m '$advancedsettings.m'
        -T '$advancedsettings.T'
        -X '$advancedsettings.X'
        -P '$advancedsettings.P'
        -o '$advancedsettings.o'
        -O '$advancedsettings.O'
        -V '$advancedsettings.V'
<commit_msg>Fix typo<commit_after><tool id="vardict" name="VarDict" version="@WRAPPER_VERSION@">
    <description>calls SNVs and indels for tumour-normal pairs</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <requirements>
        <requirement type="package" version="5.0.1">gawk</requirement>
        <!--<requirement type="package" version="3.2.1">R</requirement>-->
        <requirement type="package" version="1.10">samtools</requirement>
        <requirement type="package" version="@TOOL_VERSION@">vardict-java</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
        ## LINK BAM INDEX
        ln -s '$normal' ./normal.bam &&
        ln -s '$normal.metadata.bam_index' ./normal.bam.bai &&
        ln -s '$tumour' ./tumor.bam &&
        ln -s '$tumour.metadata.bam_index' ./tumor.bam.bai &&

        ## INDEX REFERENCE FASTA FILE IF FROM HISTORY
        #if $reference_source.reference_source_selector == "history":
            ln -s '$reference_source.ref_file' ./ref.fa &&
            samtools faidx ./ref.fa 2>&1 || echo 'Error running samtools faidx for indexing fasta reference for vardict' >&2 &&
        #else if $reference_source.reference_source_selector == "cached"
            ln -s '$reference_source.ref_file.fields.path' ./ref.fa &&
            ln -s '${reference_source.ref_file.fields.path}.fai' ./ref.fa.fai &&
        #end if

        ## BUILD BED FILE FROM CHROMOSOME LIST
        #if $interval_file:
            grep -w -f '$interval_file' ./ref.fa.fai > ./chromosomes.fa.fai &&
        #else
            ln -s ./ref.fa.fai ./chromosomes.fa.fai &&
        #end if
        awk 'BEGIN {FS=OFS="\t"} {print $1, "1", $2}' ./chromosomes.fa.fai > ./regions.bed &&

        ## BUILD VARDICT COMMAND
        vardict-java
        -b "./tumor.bam|./normal.bam"
        -G ./ref.fa
        -z
        -th \${GALAXY_SLOTS:-1}

        ## ADVANCED OPTIONS
        -f '$advancedsettings.f'
        -k '$advancedsettings.k'
        -r '$advancedsettings.r'
        -B '$advancedsettings.B'
        -Q '$advancedsettings.Q'
        -q '$advancedsettings.q'
        -m '$advancedsettings.m'
        -T '$advancedsettings.T'
        -X '$advancedsettings.X'
        -P '$advancedsettings.P'
        -o '$advancedsettings.o'
        -O '$advancedsettings.O'
        -V '$advancedsettings.V'

{'fraction_non_alphanumeric': 0.15781648258283773, 'fraction_numerical': 0.006796941376380629, 'mean_word_length': 2.214334470989761, 'pattern_counts': {'":': 2, '<': 43, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4594334', 'n_tokens_mistral': 1652, 'n_tokens_neox': 1531, 'n_words': 325}