view ct_downsample_cells.xml @ 0:51816af2f7ac draft default tip

"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/ commit a1ad1ddd9b8e4db5bb82c3accae8311e0e488b19"
author ebi-gxa
date Fri, 27 Nov 2020 13:37:59 +0000
parents
children
line wrap: on
line source

<tool id="ct_downsample_cells" name="Cell types - Downsample Cells" version="@TOOL_VERSION@+galaxy0" profile="@PROFILE@">
    <description>to avoid memory issues</description>
    <macros>
        <import>ct_macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command detect_errors="exit_code"><![CDATA[
        ln -s "${matrix}" matrix.mtx &&
        ln -s "${genes}" genes.tsv &&
        ln -s "${barcodes}" barcodes.tsv &&
        downsample_cells.R --expression-data . --metadata "${metadata}" --cell-id-field "${cell_id_field}" --cell-type-field "${cell_type_field}" --array-size-limit "${array_size_limit}" --output-dir "${output_dir}" --metadata-upd "${metadata_upd}"

        #if $exclusions
        --exclusions "${exclusions}"
        #end if

         ]]></command>
    <inputs>
        <param name="matrix" type="data" format="txt" label="Expression matrix in sparse matrix format (.mtx)"/>
        <param name="genes" type="data" format="tsv,tabular" label="Gene table"/>
        <param name="barcodes" type="data" format="tsv,tabular" label="Barcode/cell table"/>
        <param type="data" name="metadata" format="txt" label="Metadata Table" help="Metadata file mapping cells to cell types" />
        <param type="text" name="cell_id_field" label="Cell ID Field" optional="true" value="id" help="Cell ID field">
            <expand macro="sanitize_strings" />
        </param>
        <param type="text" name="cell_type_field" label="Cell Type Field" optional="true" value="inferred cell type" help="Name of cell type column in metada file">
            <expand macro="sanitize_strings" />
        </param>
        <param type="data" name="exclusions" label="Exclusions file" format="yml" optional="true" help="YAML file with trivial terms and unlabelled cells" />
        <param type="integer" name="array_size_limit" value='2000000000' label="Array Size Limit" help="Maximum matrix size (product of genes and cells), which will determine given the number of genes in the datasets how many cells to down-sample to. Warning: do not exceed the default value." />
        <param type="text" name="output_dir" value="10x_data_sampled" label="Sampled Data" help="Name of the directory for sampled data" />
    </inputs>
    <outputs>
        <data name="matrix_upd" from_work_dir="${output_dir}/matrix.mtx" />
        <data name="barcodes_upd" from_work_dir="${output_dir}/barcodes.tsv" />
        <data name="genes_upd" from_work_dir="${output_dir}/genes.tsv" />
        <data name="metadata_upd" format="txt" label="Updated metadata" />
    </outputs>
    <tests>
        <test>
            <param name="matrix" value="10x_data/matrix.mtx" />
            <param name="genes" value="10x_data/genes.tsv"  />
            <param name="array_size_limit" value='3955000' />
            <param name="cell_type_field" value="inferred cell type - authors labels"  />
            <param name="barcodes" value="10x_data/barcodes.tsv" />
            <param name="metadata" value="E-MTAB-7249_unmelted_sdrf.tsv"  />
            <output name="matrix_upd" file="10x_data_upd/matrix.mtx" compare="sim_size" delta="10000000" />
            <output name="barcodes_upd" file="10x_data_upd/barcodes.tsv" compare="sim_size" delta="10000000" />
            <output name="genes_upd" file="10x_data_upd/genes.tsv" compare="sim_size" delta="10000000" />
            <output name="metadata_upd" file="E-MTAB-7249_unmelted_sdrf_downsampled.tsv" compare="sim_size" delta="10000000"/>
        </test>
    </tests>

    <help><![CDATA[
    @HELP@
    
    @VERSION_HISTORY@
    ]]></help>
    <expand macro="citations" />
</tool>