<commit_before><tool id="control_freec" name="Control-FREEC" version="@WRAPPER_VERSION@">
    <description>detects copy-number changes and allelic imbalances</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <requirements>
        <requirement type="package" version="5.0.1">gawk</requirement>
        <requirement type="package" version="@TOOL_VERSION@">control-freec</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
        #set $genome_fasta_fn = 'genome.fa'
        #set $chr_dn = 'chromosomes'
        #set $out_dn = 'output'
        #set $input_control_file_fn = 'control.bam'
        #set $input_sample_file_fn = 'sample.bam'

        ln -s '$reference_source.ref' '$genome_fasta_fn' &&

        #if str($reference_source.ref_selector) == 'history':
            #set $chrLenFile = $genome_fasta_fn + '.fai'
            samtools faidx '$genome_fasta_fn' 2>&1 || echo 'Error running samtools faidx for indexing fasta reference for control-freec' >&2 &&
        #else
            #set $chrLenFile = $reference_source.ref.index.fields.path
        #end if

        mkdir '$chr_dn' &&
        mkdir '$out_dn' &&

        awk -F " " '/^>/ {close(F); F="$chr_dn/chr"substr($1,2)".fa"} {print >> F}' '$genome_fasta_fn' &&

        ln -s '$input_sample_file' '$input_sample_file_fn' &&
        #if $input_control_file
            ln -s '$input_control_file' '$input_control_file_fn' &&
        #end if

        freec
            -conf '$script_file'
            -sample '$input_sample_file_fn'
            #if $input_control_file
                -control $'input_control_file_fn'
            #end if

        #if $WGS_WES.advanced_settings.makeGraph
            && R -f `which makeGraph.R` '$WGS_WES.advanced_settings.ploidy' 'output/sample.bam_ratio.txt'
        #end if
    ]]></command>
    <configfiles>
        <configfile name="script_file"><![CDATA[
#import os
#set galaxy_slots = os.getenv("GALAXY_SLOTS", 4)
[general]
chrFiles = chromosomes
outputDir = output
chrLenFile = genome.fa.fai
maxThreads = $galaxy_slots

#if $WGS_WES.advanced_settings.degree == "34"
    #set $degree_val = "3&amp;4"
degree = $degree_val
#else
degree = $WGS_WES.advanced_settings.degree
#end if
forceGCcontentNormalization = $WGS_WES.advanced_settings.forceGCcontentNormalization
minCNAlength = $WGS_WES.advanced_settings.minCNAlength
minimalSubclonePresence = $WGS_WES.advanced_settings.minimalSubclonePresence
readCountThreshold = $WGS_WES.advanced_settings.readCountThreshold
window = $WGS_WES.advanced_settings.window_section.window<commit_msg>Add CDATA section to configfile<commit_after><tool id="control_freec" name="Control-FREEC" version="@WRAPPER_VERSION@">
    <description>detects copy-number changes and allelic imbalances</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <requirements>
        <requirement type="package" version="5.0.1">gawk</requirement>
        <requirement type="package" version="@TOOL_VERSION@">control-freec</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
        #set $genome_fasta_fn = 'genome.fa'
        #set $chr_dn = 'chromosomes'
        #set $out_dn = 'output'
        #set $input_control_file_fn = 'control.bam'
        #set $input_sample_file_fn = 'sample.bam'

        ln -s '$reference_source.ref' '$genome_fasta_fn' &&

        #if str($reference_source.ref_selector) == 'history':
            #set $chrLenFile = $genome_fasta_fn + '.fai'
            samtools faidx '$genome_fasta_fn' 2>&1 || echo 'Error running samtools faidx for indexing fasta reference for control-freec' >&2 &&
        #else
            #set $chrLenFile = $reference_source.ref.index.fields.path
        #end if

        mkdir '$chr_dn' &&
        mkdir '$out_dn' &&

        awk -F " " '/^>/ {close(F); F="$chr_dn/chr"substr($1,2)".fa"} {print >> F}' '$genome_fasta_fn' &&

        ln -s '$input_sample_file' '$input_sample_file_fn' &&
        #if $input_control_file
            ln -s '$input_control_file' '$input_control_file_fn' &&
        #end if

        freec
            -conf '$script_file'
            -sample '$input_sample_file_fn'
            #if $input_control_file
                -control $'input_control_file_fn'
            #end if

        #if $WGS_WES.advanced_settings.makeGraph
            && R -f `which makeGraph.R` '$WGS_WES.advanced_settings.ploidy' 'output/sample.bam_ratio.txt'
        #end if
    ]]></command>
    <configfiles>
        <configfile name="script_file"><![CDATA[
#import os
#set galaxy_slots = os.getenv("GALAXY_SLOTS", 4)
[general]
chrFiles = chromosomes
outputDir = output
chrLenFile = genome.fa.fai
maxThreads = $galaxy_slots

#if $WGS_WES.advanced_settings.degree == "34"
    #set $degree_val = "3&4"
degree = $degree_val
#else
degree = $WGS_WES.advanced_settings.degree
#end if
forceGCcontentNormalization = $WGS_WES.advanced_settings.forceGCcontentNormalization
minCNAlength = $WGS_WES.advanced_settings.minCNAlength
minimalSubclonePresence = $WGS_WES.advanced_settings.minimalSubclonePresence
readCountThreshold = $WGS_WES.advanced_settings.readCountThreshold
window = $WGS_WES.advanced_settings.window_section.window
{'fraction_non_alphanumeric': 0.12884024577572964, 'fraction_numerical': 0.0049923195084485405, 'mean_word_length': 3.33721898417985, 'pattern_counts': {'":': 0, '<': 41, '<?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': '3687417', 'n_tokens_mistral': 1821, 'n_tokens_neox': 1724, 'n_words': 317}