<commit_before><tool id="pygenomeTracks" name="@BINARY@" version="@WRAPPER_VERSION@.1">
    <description>plot genomic data tracks</description>
    <macros>
        <token name="@BINARY@">pyGenomeTracks</token>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command detect_errors="exit_code">
<![CDATA[
        #for $counter, $track in enumerate($tracks):
            #if $track.track_file_style_conditional.track_file_style_selector == "hic_matrix_option":
                #for $counter_matrix, $data_matrix in enumerate($track.track_file_style_conditional.matrix_h5_cooler_multiple):
                    #set ext = $data_matrix.extension
                    ln -s $data_matrix ${counter}_${counter_matrix}.'$ext' &&
                #end for
            #end if
        #end for
                

        sed '/^$/d' '$tracks_config' &&
        @BINARY@
            --tracks '$tracks_config'
            #if $region and $region is not None:
                --region '$region'
            #end if
            --outFileName plot.$image_file_format
        && mv plot.$image_file_format plot
]]>
    </command>
    <configfiles>
        <configfile name="tracks_config">
#if $x_axis.x_axis_select == "yes":
#if $x_axis.where == 'top':
[x-axis]
#if $x_axis.fontsize:
fontsize = $x_axis.fontsize
#end if
#if $x_axis.where:
where = $x_axis.where
#end if
#end if
#end if
#for $counter, $track in enumerate($tracks):
#if $track.track_file_style_conditional.track_file_style_selector == "hic_matrix_option":

#for $counter_matrix, $data_matrix in enumerate($track.track_file_style_conditional.matrix_h5_cooler_multiple):
[hic_section_$counter]
#set ext = $data_matrix.extension
file = ${counter}_${counter_matrix}.'$ext'
file_type = hic_matrix
#if $track.track_file_style_conditional.title:
title = $track.track_file_style_conditional.title
#else:
title = $data_matrix.name
#end if
#if $track.track_file_style_conditional.depth:
depth = $track.track_file_style_conditional.depth
#end if
#if $track.track_file_style_conditional.colormap:
colormap = $track.track_file_style_conditional.colormap
#end if
#if $track.track_file_style_conditional.min_value:
min_value = $track.track_file_style_conditional.min_value
#end if
#if $track.track_file_style_conditional.max_value:
max_value = $track.track_file_style_conditional.max_value
#end if
#if $track.track_file_style_conditional.transform != "":
transform = $track.track_file_style_conditional.transform
#end if
#if $track.track_file_style_conditional.height_matrix != "":
height = $track.track_file_style_conditional.height_matrix
#end if

#if str($track.track_file_style_conditional.boundaries_file[$counter_matrix]) != "None":
#set boundary_file = $track.track_file_style_conditional.boundaries_file[$counter_matrix]
boundaries_file = $boundary_file
#end if
<commit_msg>remove quotes around extension avoid failing when multiple input matrices are selected but not as much boundaries<commit_after><tool id="pygenomeTracks" name="@BINARY@" version="@WRAPPER_VERSION@.1">
    <description>plot genomic data tracks</description>
    <macros>
        <token name="@BINARY@">pyGenomeTracks</token>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command detect_errors="exit_code">
<![CDATA[
        #for $counter, $track in enumerate($tracks):
            #if $track.track_file_style_conditional.track_file_style_selector == "hic_matrix_option":
                #for $counter_matrix, $data_matrix in enumerate($track.track_file_style_conditional.matrix_h5_cooler_multiple):
                    #set ext = $data_matrix.extension
                    ln -s $data_matrix ${counter}_${counter_matrix}.$ext &&
                #end for
            #end if
        #end for
                

        sed '/^$/d' '$tracks_config' &&
        @BINARY@
            --tracks '$tracks_config'
            #if $region and $region is not None:
                --region '$region'
            #end if
            --outFileName plot.$image_file_format
        && mv plot.$image_file_format plot
]]>
    </command>
    <configfiles>
        <configfile name="tracks_config">
#if $x_axis.x_axis_select == "yes":
#if $x_axis.where == 'top':
[x-axis]
#if $x_axis.fontsize:
fontsize = $x_axis.fontsize
#end if
#if $x_axis.where:
where = $x_axis.where
#end if
#end if
#end if
#for $counter, $track in enumerate($tracks):
#if $track.track_file_style_conditional.track_file_style_selector == "hic_matrix_option":

#for $counter_matrix, $data_matrix in enumerate($track.track_file_style_conditional.matrix_h5_cooler_multiple):
[hic_section_$counter]
#set ext = $data_matrix.extension
file = ${counter}_${counter_matrix}.$ext
file_type = hic_matrix
#if $track.track_file_style_conditional.title:
title = $track.track_file_style_conditional.title
#else:
title = $data_matrix.name
#end if
#if $track.track_file_style_conditional.depth:
depth = $track.track_file_style_conditional.depth
#end if
#if $track.track_file_style_conditional.colormap:
colormap = $track.track_file_style_conditional.colormap
#end if
#if $track.track_file_style_conditional.min_value:
min_value = $track.track_file_style_conditional.min_value
#end if
#if $track.track_file_style_conditional.max_value:
max_value = $track.track_file_style_conditional.max_value
#end if
#if $track.track_file_style_conditional.transform != "":
transform = $track.track_file_style_conditional.transform
#end if
#if $track.track_file_style_conditional.height_matrix != "":
height = $track.track_file_style_conditional.height_matrix
#end if

#if str($track.track_file_style_conditional.boundaries_file) != "None":
#if len($track.track_file_style_conditional.boundaries_file)>$counter_matrix:
#set boundary_file = $track.track_file_style_conditional.boundaries_file[$counter_matrix]
#else:
#set boundary_file = $track.track_file_style_conditional.boundaries_file[0]
#end if
boundaries_file = $boundary_file
#end if

{'fraction_non_alphanumeric': 0.11883182275931521, 'fraction_numerical': 0.0011748909029875797, 'mean_word_length': 4.3491921005386, 'pattern_counts': {'":': 12, '<': 33, '<?xml version=': 0, '>': 34, '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': '7646034', 'n_tokens_mistral': 2007, 'n_tokens_neox': 1904, 'n_words': 362}