<commit_before><macros>
    <import>read_group_macros.xml</import>

    <token name="@VERSION@">0.7.17</token>

    <token name="@set_rg_string@">
        #set $rg_string = "@RG\\tID:" + str($rg_id)
        #set $rg_string += $format_read_group("\\tSM:", $rg_sm)
        #set $rg_string += $format_read_group("\\tPL:", $rg_pl)
        #set $rg_string += $format_read_group("\\tLB:", $rg_lb)
        #set $rg_string += $format_read_group("\\tCN:", $rg_cn)
        #set $rg_string += $format_read_group("\\tDS:", $rg_ds)
        #set $rg_string += $format_read_group("\\tDT:", $rg_dt)
        #set $rg_string += $format_read_group("\\tFO:", $rg_fo)
        #set $rg_string += $format_read_group("\\tKS:", $rg_ks)
        #set $rg_string += $format_read_group("\\tPG:", $rg_pg)
        #set $rg_string += $format_read_group("\\tPI:", $rg_pi)
        #set $rg_string += $format_read_group("\\tPU:", $rg_pu)
    </token>

    <token name="@set_reference_fasta_filename@"><![CDATA[
    #if str( $reference_source.reference_source_selector ) == "history":
        #set $reference_fasta_filename = "localref.fa"
        ln -s '${reference_source.ref_file}' '${reference_fasta_filename}' &&
        bwa index
        #if str($reference_source.index_a) != 'auto'
            -a ${reference_source.index_a}
        #end if
        '${reference_fasta_filename}' &&
    #else:
        #set $reference_fasta_filename = str( $reference_source.ref_file.fields.path )
    #end if
  ]]></token>

    <xml name="requirements">
        <requirements>
            <requirement type="package" version="@VERSION@">bwa</requirement>
            <requirement type="package" version="1.6">samtools</requirement>
        </requirements>
    </xml>

    <xml name="stdio">
        <stdio>
            <exit_code range="1:" />
            <exit_code range=":-1" />
            <regex match="Error:" />
            <regex match="Exception:" />
            <regex match="[bns_restore_core] Parse error reading" />
        </stdio>
    </xml>

    <macro name="reference_source_conditional">
        <conditional name="reference_source">
            <param name="reference_source_selector" type="select" label="Will you select a reference genome from your history or use a built-in index?" help="Built-ins were indexed using default options. See `Indexes` section of help below">
                <option value="cached">Use a built-in genome index</option>
                <option value="history">Use a genome from history and build index</option>
            </param>
            <when value="cached">
                <param name="ref_file" type="select" label="Using reference genome" help="Select genome from the list">
                    <options from_data_table="bwa_mem_indexes">
                        <filter type="sort_by" column="2" />
                        <validator type="no_options" message="No indexes are available" />
                    </options>
                    <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
                </param>
            </when>
            <when value="history">
                <param name="ref_file" type="data" format="fasta" label="Use the following dataset as the reference sequence" help="You can upload a FASTA sequence to the history and use it as reference" /><commit_msg>added escaping of braces<commit_after><macros>
    <import>read_group_macros.xml</import>

    <token name="@VERSION@">0.7.17</token>

    <token name="@set_rg_string@">
        #set $rg_string = "@RG\\tID:" + str($rg_id)
        #set $rg_string += $format_read_group("\\tSM:", $rg_sm)
        #set $rg_string += $format_read_group("\\tPL:", $rg_pl)
        #set $rg_string += $format_read_group("\\tLB:", $rg_lb)
        #set $rg_string += $format_read_group("\\tCN:", $rg_cn)
        #set $rg_string += $format_read_group("\\tDS:", $rg_ds)
        #set $rg_string += $format_read_group("\\tDT:", $rg_dt)
        #set $rg_string += $format_read_group("\\tFO:", $rg_fo)
        #set $rg_string += $format_read_group("\\tKS:", $rg_ks)
        #set $rg_string += $format_read_group("\\tPG:", $rg_pg)
        #set $rg_string += $format_read_group("\\tPI:", $rg_pi)
        #set $rg_string += $format_read_group("\\tPU:", $rg_pu)
    </token>

    <token name="@set_reference_fasta_filename@"><![CDATA[
    #if str( $reference_source.reference_source_selector ) == "history":
        #set $reference_fasta_filename = "localref.fa"
        ln -s '${reference_source.ref_file}' '${reference_fasta_filename}' &&
        bwa index
        #if str($reference_source.index_a) != 'auto'
            -a ${reference_source.index_a}
        #end if
        '${reference_fasta_filename}' &&
    #else:
        #set $reference_fasta_filename = str( $reference_source.ref_file.fields.path )
    #end if
  ]]></token>

    <xml name="requirements">
        <requirements>
            <requirement type="package" version="@VERSION@">bwa</requirement>
            <requirement type="package" version="1.6">samtools</requirement>
        </requirements>
    </xml>

    <xml name="stdio">
        <stdio>
            <exit_code range="1:" />
            <exit_code range=":-1" />
            <regex match="Error:" />
            <regex match="Exception:" />
            <regex match="\[bns_restore_core\] Parse error reading" />
        </stdio>
    </xml>

    <macro name="reference_source_conditional">
        <conditional name="reference_source">
            <param name="reference_source_selector" type="select" label="Will you select a reference genome from your history or use a built-in index?" help="Built-ins were indexed using default options. See `Indexes` section of help below">
                <option value="cached">Use a built-in genome index</option>
                <option value="history">Use a genome from history and build index</option>
            </param>
            <when value="cached">
                <param name="ref_file" type="select" label="Using reference genome" help="Select genome from the list">
                    <options from_data_table="bwa_mem_indexes">
                        <filter type="sort_by" column="2" />
                        <validator type="no_options" message="No indexes are available" />
                    </options>
                    <validator type="no_options" message="A built-in reference genome is not available for the build associated with the selected input file"/>
                </param>
            </when>
            <when value="history">
                <param name="ref_file" type="data" format="fasta" label="Use the following dataset as the reference sequence" help="You can upload a FASTA sequence to the history and use it as reference" />
{'fraction_non_alphanumeric': 0.14816992503307364, 'fraction_numerical': 0.0026458915184477435, 'mean_word_length': 2.6463022508038585, 'pattern_counts': {'":': 4, '<': 95, '<?xml version=': 0, '>': 95, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 10}, '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': '1172831', 'n_tokens_mistral': 2082, 'n_tokens_neox': 2003, 'n_words': 477}