<commit_before><tool id="bam_to_scidx" name="Convert BAM to ScIdx" version="1.0.1">
    <description></description>
    <requirements>
        <requirement type="package" version="8.0.112">openjdk</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
ln -s '${input_bam}' localbam.bam &&
ln -f -s '${input_bam.metadata.bam_index}' localbam.bam.bai &&
java -jar '$__tool_directory__/BAMtoscIDX.jar' -b localbam.bam -i localbam.bam.bai -p $require_proper_mate_pairing -r $read -m $min_insert_size -M $max_insert_size -o '$output' 1>/dev/null
    ]]></command>
    <inputs>
        <param name="input_bam" type="data" format="bam" label="BAM file" />
        <param name="require_proper_mate_pairing" type="select" label="Require proper mate-pairing?" help="Required if filtering by insert size for single-end Reqd 1 (below)." >
            <option value="1" selected="True">Yes</option>
            <option value="0">No</option>
        </param>
        <param name="read" type="select" label="Read to output">
            <option value="0" selected="True">Read1</option>
            <option value="1">Read2</option>
            <option value="2">Combined</option>
        </param>
        <param name="min_insert_size" type="integer" value="" optional="True" min="0" label="Minimum insert size to output" help="Will not filter out single-end Read 1 unless proper mate-pairing is required (above)."/>
        <param name="max_insert_size" type="integer" value="" optional="True" min="0" label="Maximum insert size to output" help="Will not filter out single-end Read 1 unless proper mate-pairing is required (above)." />
    </inputs>
    <outputs>
        <data name="output" format="scidx" />
    </outputs>
    <tests>
        <test>
            <param name="input_bam" value="input.bam" ftype="bam" />
            <param name="require_proper_mate_pairing" value="1" />
            <param name="read" value="0" />
            <output name="output" file="output.scidx" lines_diff="1" ftype="scidx" compare="contains" />
        </test><commit_msg>Fix checks for min, max and improve readability<commit_after><tool id="bam_to_scidx" name="Convert BAM to ScIdx" version="1.0.1">
    <description></description>
    <requirements>
        <requirement type="package" version="8.0.112">openjdk</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
ln -s '${input_bam}' localbam.bam &&
ln -f -s '${input_bam.metadata.bam_index}' localbam.bam.bai &&
java -jar '$__tool_directory__/BAMtoscIDX.jar'
-b localbam.bam
-i localbam.bam.bai
-p $require_proper_mate_pairing
-r $read
#if str($min_insert_size):
    -m $min_insert_size
#end if
#if str($max_insert_size):
    -M $max_insert_size
#end if
-o '$output'
1>/dev/null
    ]]></command>
    <inputs>
        <param name="input_bam" type="data" format="bam" label="BAM file" />
        <param name="require_proper_mate_pairing" type="select" label="Require proper mate-pairing?" help="Required if filtering by insert size for single-end Reqd 1 (below)." >
            <option value="1" selected="True">Yes</option>
            <option value="0">No</option>
        </param>
        <param name="read" type="select" label="Read to output">
            <option value="0" selected="True">Read1</option>
            <option value="1">Read2</option>
            <option value="2">Combined</option>
        </param>
        <param name="min_insert_size" type="integer" value="" optional="True" min="0" label="Minimum insert size to output" help="Will not filter out single-end Read 1 unless proper mate-pairing is required (above)."/>
        <param name="max_insert_size" type="integer" value="" optional="True" min="0" label="Maximum insert size to output" help="Will not filter out single-end Read 1 unless proper mate-pairing is required (above)." />
    </inputs>
    <outputs>
        <data name="output" format="scidx" />
    </outputs>
    <tests>
        <test>
            <param name="input_bam" value="input.bam" ftype="bam" />
            <param name="require_proper_mate_pairing" value="1" />
            <param name="read" value="0" />
            <output name="output" file="output.scidx" lines_diff="1" ftype="scidx" compare="contains" />
        </test>
{'fraction_non_alphanumeric': 0.15970919324577862, 'fraction_numerical': 0.01125703564727955, 'mean_word_length': 3.470649895178197, 'pattern_counts': {'":': 0, '<': 81, '<?xml version=': 0, '>': 83, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '5508049', 'n_tokens_mistral': 1396, 'n_tokens_neox': 1358, 'n_words': 334}