<commit_before><tool id="fastqe" name="FASTQE" version="0.2.6">
    <description>visualize fastq files with emoji's 🧬😎</description>
    <requirements>
        <requirement type="package" version="0.2.6">fastqe</requirement>
    </requirements>
    <command detect_errors="exit_code">
    <![CDATA[

    #for i in $input:
        ln -s '$i' '$i.element_identifier' &&
    #end for

    echo "<html><head><title>FASTQE Report 🤔</title></head><body><h1>FASTQE Report 🤔</h1>" > '$output' &&

    fastqe
        --mean
        $bin
        --min
        --long $long
        --max
        #for i in $input:
            '$i.element_identifier'
        #end for
        | sed 's/$/<br>/;s/^\([^\t]*\)\t\([^\t]*\)\t/<h2>\1: \2<\/h2>\n/' >> '$output' &&

    echo "</body></html>" >> '$output'
    ]]></command>
    <inputs>
        <param label="FastQ data" name="input" type="data" format="fastq" multiple="true"/>
        <param label="Bin scores" name="bin" type="boolean" truevalue="--bin" falsevalue="" />
        <param label="Maximum read length" name="long" type="integer" help="Enable long reads up to this many bp long." min="1" value="500"/>
    </inputs>
    <outputs>
        <data format="html" name="output"/>
    </outputs>
    <tests>
        <test>
            <param name="input" value="test.fq,test2.fq" />
            <output name="output" file="out.html" />
        </test>
    </tests>
    <help><![CDATA[
FASTQ + Emoji = FASTQE 🤔
=========================

Compute quality stats for FASTQ files and print those stats as emoji... for some reason.

Scores can also be binned:

+-------+-------+
| Bin   | Emoji |
+=======+=======+
| N     | 🚫    |
+-------+-------+
| N     | 🚫    |
+-------+-------+
| 2-9   | 💀    |
+-------+-------+
| 10–19 | 💩    |
+-------+-------+
| 20–24 | ⚠️    |
+-------+-------+
| 25–29 | 😄    |
+-------+-------+
| 30–34 | 😆    |
+-------+-------+
| 35–39 | 😎    |
+-------+-------+
| ≥ 40  | 😍    |
+-------+-------+


]]></help>
    <citations>
    </citations>
</tool>
<commit_msg>Escape element identifier<commit_after><tool id="fastqe" name="FASTQE" version="0.2.6+galaxy0">
    <description>visualize fastq files with emoji's 🧬😎</description>
    <requirements>
        <requirement type="package" version="0.2.6">fastqe</requirement>
        <requirement type="package" version="4.7">sed</requirement>
    </requirements>
    <command detect_errors="exit_code">
    <![CDATA[

    #import re

    #set $filenames = [re.sub('[^\w\-\s.]', '_', $i.element_identifier) for $i in $input]
    #for $i, $filename in zip($input, $filenames):
        ln -s '$i' '$filename' &&
    #end for

    echo "<html><head><title>FASTQE Report 🤔</title></head><body><h1>FASTQE Report 🤔</h1>" > '$output' &&

    fastqe
        --mean
        $bin
        --min
        --long $long
        --max
        #for $filename in $filenames:
            '$filename'
        #end for
        | sed 's/$/<br>/;s/^\([^\t]*\)\t\([^\t]*\)\t/<h2>\1: \2<\/h2>\n/' >> '$output' &&

    echo "</body></html>" >> '$output'
    ]]></command>
    <inputs>
        <param label="FastQ data" name="input" type="data" format="fastq" multiple="true"/>
        <param label="Bin scores" name="bin" type="boolean" truevalue="--bin" falsevalue="" />
        <param label="Maximum read length" name="long" type="integer" help="Enable long reads up to this many bp long." min="1" value="500"/>
    </inputs>
    <outputs>
        <data format="html" name="output"/>
    </outputs>
    <tests>
        <test>
            <param name="input" value="test.fq,test2.fq" />
            <output name="output" file="out.html" />
        </test>
    </tests>
    <help><![CDATA[
FASTQ + Emoji = FASTQE 🤔
=========================

Compute quality stats for FASTQ files and print those stats as emoji... for some reason.

Scores can also be binned:

+-------+-------+
| Bin   | Emoji |
+=======+=======+
| N     | 🚫    |
+-------+-------+
| 2-9   | 💀    |
+-------+-------+
| 10–19 | 💩    |
+-------+-------+
| 20–24 | ⚠️    |
+-------+-------+
| 25–29 | 😄    |
+-------+-------+
| 30–34 | 😆    |
+-------+-------+
| 35–39 | 😎    |
+-------+-------+
| ≥ 40  | 😍    |
+-------+-------+


]]></help>
    <citations>
    </citations>
</tool>

{'fraction_non_alphanumeric': 0.2800094517958412, 'fraction_numerical': 0.02008506616257089, 'mean_word_length': 1.9498257839721254, 'pattern_counts': {'":': 0, '<': 91, '<?xml version=': 0, '>': 101, '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': '2724651', 'n_tokens_mistral': 1603, 'n_tokens_neox': 1533, 'n_words': 325}