<commit_before><?xml version="1.0"?>
<tool id="idr_download_by_ids" name="IDR Download" version="0.9">
    <description>- download images from the Image Data Resource using image IDs</description>
    <macros>
        <xml name="region_spec" token_pos="upper-left corner">
            <param name="x_coord" type="integer" value="0" min="0"
            label="x-coordinate of region @POS@" />
            <param name="y_coord" type="integer" value="0" min="0"
            label="y-coordinate of region @POS@" />
            <param name="width" type="integer" value="0" min="0"
            label="Region width"
            help="Set to zero to extend the rectangle maximally along the x-axis of the image" />
            <param name="height" type="integer" value="0" min="0"
            label="Region height"
            help="Set to zero to extend the rectangle maximally along the y-axis of the image" />
        </xml>
    </macros>
    <requirements>
        <requirement type="package" version="5.6.0">python-omero</requirement>
        <requirement type="package" version="3.1.3">matplotlib</requirement>
    </requirements>
    <stdio>
        <exit_code range="1:" />
    </stdio>
    <command><![CDATA[
        mkdir downloads && cd downloads &&
        #if str($image_ids.source) == 'link':
            python -c 'print("${image_ids.id_spec}".replace(",", "|").split("?show=")[-1].replace("|", "\n"))'
            ## https://idr.openmicroscopy.org/webclient/?show=image-3426274|image-3426275|image-3426276|image-3426277
        #else:
            cat '${image_ids.id_spec}'
        #end if
        | python '$__tool_directory__/idr_download_by_ids.py' 
        #set $channel = str($channel).strip()
        #if $channel:
            -c '$channel'<commit_msg>use detect_errors<commit_after><?xml version="1.0"?>
<tool id="idr_download_by_ids" name="IDR Download" version="0.9">
    <description>- download images from the Image Data Resource using image IDs</description>
    <macros>
        <xml name="region_spec" token_pos="upper-left corner">
            <param name="x_coord" type="integer" value="0" min="0"
            label="x-coordinate of region @POS@" />
            <param name="y_coord" type="integer" value="0" min="0"
            label="y-coordinate of region @POS@" />
            <param name="width" type="integer" value="0" min="0"
            label="Region width"
            help="Set to zero to extend the rectangle maximally along the x-axis of the image" />
            <param name="height" type="integer" value="0" min="0"
            label="Region height"
            help="Set to zero to extend the rectangle maximally along the y-axis of the image" />
        </xml>
    </macros>
    <requirements>
        <requirement type="package" version="5.6.0">python-omero</requirement>
        <requirement type="package" version="3.1.3">matplotlib</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
        mkdir downloads && cd downloads &&
        #if str($image_ids.source) == 'link':
            python -c 'print("${image_ids.id_spec}".replace(",", "|").split("?show=")[-1].replace("|", "\n"))'
            ## https://idr.openmicroscopy.org/webclient/?show=image-3426274|image-3426275|image-3426276|image-3426277
        #else:
            cat '${image_ids.id_spec}'
        #end if
        | python '$__tool_directory__/idr_download_by_ids.py' 
        #set $channel = str($channel).strip()
        #if $channel:
            -c '$channel'
{'fraction_non_alphanumeric': 0.16067351598173515, 'fraction_numerical': 0.02711187214611872, 'mean_word_length': 2.728723404255319, 'pattern_counts': {'":': 0, '<': 46, '<?xml version=': 2, '>': 44, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7578308', 'n_tokens_mistral': 1122, 'n_tokens_neox': 1063, 'n_words': 247}